Skip to content

Latest commit

 

History

History
3902 lines (2144 loc) · 105 KB

model_descr_v0-5.md

File metadata and controls

3902 lines (2144 loc) · 105 KB

Specification of the fields used in a bioimage.io-compliant RDF to describe AI models with pretrained weights. These fields are typically stored in a YAML file which we call a model resource description file (model RDF).

General notes on this documentation:

symbol explanation
fieldtype hint A fields's expected type may be shortened. If so, the abbreviated or full type is displayed below the field's description and can expanded to view further (nested) details if available.
Union[A, B, ...] indicates that a field value may be of type A or B, etc.
Literal[a, b, ...] indicates that a field value must be the specific value a or b, etc.
Type* := Type (restrictions) A field Type* followed by an asterisk indicates that annotations, e.g. value restriction apply. These are listed in parentheses in the expanded type description. They are not always intuitively understandable and merely a hint at more complex validation.
<type>.v<major>_<minor>.<sub spec> Subparts of a spec might be taken from another spec type or format version.
fielddefault Default field values are indicated after '≝' and make a field optional. However, type and format_version alwyas need to be set for resource descriptions written as YAML files and determine which bioimage.io specification applies. They are optional only when creating a resource description in Python code using the appropriate, type and format_version specific class.
field ≝ 🡇 Default field value is not displayed in-line, but in the code block below.
∈📦 Files referenced in fields which are marked with '∈📦 ' are included when packaging the resource to a .zip archive. The resource description YAML file (RDF) is always included well as 'rdf.yaml'.

type Literal[model]model

Specialized resource type 'model'

format_version Literal[0.5.3]0.5.3

Version of the bioimage.io model description specification used. When creating a new model always use the latest micro/patch version described here. The format_version is important for any consumer software to understand how to parse the fields.

authors Sequence[generic.v0_3.Author]

The authors are the creators of the model RDF and the primary points of contact.

Sequence[generic.v0_3.Author]

generic.v0_3.Author:

authors.i.affiliation Optional[str]None

Affiliation

authors.i.email Optional[Email]None

Email

authors.i.orcid OptionalNone

An ORCID iD in hyphenated groups of 4 digits, (and valid as per ISO 7064 11,2.) Example: '0000-0001-2345-6789'

Optional[_internal.types.OrcidId]

authors.i.name str

authors.i.github_user Optional[str]None

cite Sequence[generic.v0_3.CiteEntry]

citations

Sequence[generic.v0_3.CiteEntry]

generic.v0_3.CiteEntry:

cite.i.text str

free text description

cite.i.doi Optional[_internal.types.Doi]None

A digital object identifier (DOI) is the prefered citation reference. See https://www.doi.org/ for details. (alternatively specify url)

cite.i.url Optional[_internal.url.HttpUrl]None

URL to cite (preferably specify a doi instead)

description str

A string containing a brief description.

documentation Union

∈📦 URL or relative path to a markdown file with additional documentation. The recommended documentation file name is README.md. An .md suffix is mandatory. The documentation should include a '#[#] Validation' (sub)section with details on how to quantitatively validate the model on unseen data. Examples: ['https://raw.githubusercontent.com/bioimage-io/spec-bioimage-io/main/example_descriptions/models/unet2d_nuclei_broad/README.md', '…']

Union[Path (PathType(path_type='file'); Predicate(is_absolute); ), _internal.io.RelativeFilePath, _internal.url.HttpUrl]

inputs Sequence

Describes the input tensors expected by this model.

Sequence[bioimageio.spec.model.v0_5.InputTensorDescr]

InputTensorDescr:

inputs.id TensorIdinput

Input tensor id. No duplicates are allowed across all inputs and outputs.

inputs.description str ≝ ``

free text description

inputs.axes Sequence

tensor axes

Sequence[typing.Annotated[typing.Union[bioimageio.spec.model.v0_5.BatchAxis, bioimageio.spec.model.v0_5.ChannelAxis, bioimageio.spec.model.v0_5.IndexInputAxis, bioimageio.spec.model.v0_5.TimeInputAxis, bioimageio.spec.model.v0_5.SpaceInputAxis], Discriminator(discriminator='type', custom_error_type=None, custom_error_message=None, custom_error_context=None)]]

Sequence[typing.Annotated[typing.Union[bioimageio.spec.model.v0_5.BatchAxis, bioimageio.spec.model.v0_5.ChannelAxis, bioimageio.spec.model.v0_5.IndexInputAxis, bioimageio.spec.model.v0_5.TimeInputAxis, bioimageio.spec.model.v0_5.SpaceInputAxis], Discriminator(discriminator='type', custom_error_type=None, custom_error_message=None, custom_error_context=None)]]

BatchAxis:

inputs.axes.id AxisIdbatch

inputs.axes.description str ≝ ``

inputs.axes.type Literal[batch]batch

inputs.axes.size Optional[Literal[1]]None

The batch size may be fixed to 1, otherwise (the default) it may be chosen arbitrarily depending on available memory

ChannelAxis:

inputs.axes.id AxisIdchannel

inputs.axes.description str ≝ ``

inputs.axes.type Literal[channel]channel

inputs.axes.channel_names Sequence

Sequence[_internal.types.Identifier]

IndexInputAxis:

inputs.axes.size Union

The size/length of this axis can be specified as

  • fixed integer
  • parameterized series of valid sizes (ParameterizedSize)
  • reference to another axis with an optional offset (SizeReference) Examples: [10, {'min': 32, 'step': 16}, {'tensor_id': 't', 'axis_id': 'a', 'offset': 5}]
Union[int (Gt(gt=0)), ParameterizedSize, SizeReference]

ParameterizedSize:

inputs.axes.size.min int
inputs.axes.size.step int

SizeReference:

inputs.axes.size.tensor_id TensorId

tensor id of the reference axis

inputs.axes.size.axis_id AxisId

axis id of the reference axis

inputs.axes.size.offset int0

inputs.axes.id AxisIdindex

inputs.axes.description str ≝ ``

inputs.axes.type Literal[index]index

inputs.axes.concatenable boolFalse

If a model has a concatenable input axis, it can be processed blockwise, splitting a longer sample axis into blocks matching its input tensor description. Output axes are concatenable if they have a SizeReference to a concatenable input axis.

TimeInputAxis:

inputs.axes.size Union

The size/length of this axis can be specified as

  • fixed integer
  • parameterized series of valid sizes (ParameterizedSize)
  • reference to another axis with an optional offset (SizeReference) Examples: [10, {'min': 32, 'step': 16}, {'tensor_id': 't', 'axis_id': 'a', 'offset': 5}]
Union[int (Gt(gt=0)), ParameterizedSize, SizeReference]

ParameterizedSize:

inputs.axes.size.min int
inputs.axes.size.step int

SizeReference:

inputs.axes.size.tensor_id TensorId

tensor id of the reference axis

inputs.axes.size.axis_id AxisId

axis id of the reference axis

inputs.axes.size.offset int0

inputs.axes.id AxisIdtime

inputs.axes.description str ≝ ``

inputs.axes.type Literal[time]time

inputs.axes.unit OptionalNone

Optional[Literal[attosecond, ..., zettasecond]]

Optional[Literal of

  • attosecond
  • centisecond
  • day
  • decisecond
  • exasecond
  • femtosecond
  • gigasecond
  • hectosecond
  • hour
  • kilosecond
  • megasecond
  • microsecond
  • millisecond
  • minute
  • nanosecond
  • petasecond
  • picosecond
  • second
  • terasecond
  • yoctosecond
  • yottasecond
  • zeptosecond
  • zettasecond ]

inputs.axes.scale float1.0

inputs.axes.concatenable boolFalse

If a model has a concatenable input axis, it can be processed blockwise, splitting a longer sample axis into blocks matching its input tensor description. Output axes are concatenable if they have a SizeReference to a concatenable input axis.

SpaceInputAxis:

inputs.axes.size Union

The size/length of this axis can be specified as

  • fixed integer
  • parameterized series of valid sizes (ParameterizedSize)
  • reference to another axis with an optional offset (SizeReference) Examples: [10, {'min': 32, 'step': 16}, {'tensor_id': 't', 'axis_id': 'a', 'offset': 5}]
Union[int (Gt(gt=0)), ParameterizedSize, SizeReference]

ParameterizedSize:

inputs.axes.size.min int
inputs.axes.size.step int

SizeReference:

inputs.axes.size.tensor_id TensorId

tensor id of the reference axis

inputs.axes.size.axis_id AxisId

axis id of the reference axis

inputs.axes.size.offset int0

inputs.axes.id AxisIdx

Examples: ['x', 'y', 'z']

inputs.axes.description str ≝ ``

inputs.axes.type Literal[space]space

inputs.axes.unit OptionalNone

Optional[Literal[attometer, ..., zettameter]]

Optional[Literal of

  • attometer
  • angstrom
  • centimeter
  • decimeter
  • exameter
  • femtometer
  • foot
  • gigameter
  • hectometer
  • inch
  • kilometer
  • megameter
  • meter
  • micrometer
  • mile
  • millimeter
  • nanometer
  • parsec
  • petameter
  • picometer
  • terameter
  • yard
  • yoctometer
  • yottameter
  • zeptometer
  • zettameter ]

inputs.axes.scale float1.0

inputs.axes.concatenable boolFalse

If a model has a concatenable input axis, it can be processed blockwise, splitting a longer sample axis into blocks matching its input tensor description. Output axes are concatenable if they have a SizeReference to a concatenable input axis.

inputs.test_tensor _internal.io.FileDescr

An example tensor to use for testing. Using the model with the test input tensors is expected to yield the test output tensors. Each test tensor has be a an ndarray in the numpy.lib file format. The file extension must be '.npy'.

_internal.io.FileDescr

_internal.io.FileDescr:

inputs.test_tensor.source Union

∈📦 file source

Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )]

inputs.test_tensor.sha256 OptionalNone

SHA256 checksum of the source file

Optional[_internal.io_basics.Sha256]

inputs.sample_tensor Optional[_internal.io.FileDescr]None

A sample tensor to illustrate a possible input/output for the model, The sample image primarily serves to inform a human user about an example use case and is typically stored as .hdf5, .png or .tiff. It has to be readable by the imageio library (numpy's .npy format is not supported). The image dimensionality has to match the number of axes specified in this tensor description.

Optional[_internal.io.FileDescr]

_internal.io.FileDescr:

inputs.sample_tensor.source Union

∈📦 file source

Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )]

inputs.sample_tensor.sha256 OptionalNone

SHA256 checksum of the source file

Optional[_internal.io_basics.Sha256]

inputs.data Uniontype='float32' range=(None, None) unit='arbitrary unit' scale=1.0 offset=None

Description of the tensor's data values, optionally per channel. If specified per channel, the data type needs to match across channels.

Union[NominalOrOrdinalDataDescr, IntervalOrRatioDataDescr, Sequence[typing.Union[bioimageio.spec.model.v0_5.NominalOrOrdinalDataDescr, bioimageio.spec.model.v0_5.IntervalOrRatioDataDescr]]*]

Union of

  • NominalOrOrdinalDataDescr
  • IntervalOrRatioDataDescr
  • Sequence[typing.Union[bioimageio.spec.model.v0_5.NominalOrOrdinalDataDescr, bioimageio.spec.model.v0_5.IntervalOrRatioDataDescr]] (MinLen(min_length=1))

NominalOrOrdinalDataDescr:

inputs.data.values Union

A fixed set of nominal or an ascending sequence of ordinal values. In this case data_type is required to be an unsigend integer type, e.g. 'uint8'. String values are interpreted as labels for tensor values 0, ..., N. Note: as YAML 1.2 does not natively support a "set" datatype, nominal values should be given as a sequence (aka list/array) as well.

Union[Sequence[int]*, Sequence[float]*, Sequence[bool]*, Sequence[str]*]

Union of

  • Sequence[int] (MinLen(min_length=1))
  • Sequence[float] (MinLen(min_length=1))
  • Sequence[bool] (MinLen(min_length=1))
  • Sequence[str] (MinLen(min_length=1))

inputs.data.type Literaluint8

Examples: ['float32', 'uint8', 'uint16', 'int64', 'bool']

Literal[float32, float64, uint8, int8, uint16, int16, uint32, int32, uint64, int64, bool]

inputs.data.unit UnionNone

Union[Literal[arbitrary unit], _internal.types.SiUnit, None]

IntervalOrRatioDataDescr:

inputs.data.type Literalfloat32

Examples: ['float32', 'float64', 'uint8', 'uint16']

Literal[float32, float64, uint8, int8, uint16, int16, uint32, int32, uint64, int64]

inputs.data.range Sequence(None, None)

Tuple (minimum, maximum) specifying the allowed range of the data in this tensor. None corresponds to min/max of what can be expressed by data_type.

Sequence[Optional[float], Optional[float]]

inputs.data.unit Unionarbitrary unit

Union[Literal[arbitrary unit], _internal.types.SiUnit]

inputs.data.scale float1.0

Scale for data on an interval (or ratio) scale.

inputs.data.offset Optional[float]None

Offset for data on a ratio scale.

NominalOrOrdinalDataDescr:

inputs.data.values Union

A fixed set of nominal or an ascending sequence of ordinal values. In this case data_type is required to be an unsigend integer type, e.g. 'uint8'. String values are interpreted as labels for tensor values 0, ..., N. Note: as YAML 1.2 does not natively support a "set" datatype, nominal values should be given as a sequence (aka list/array) as well.

Union[Sequence[int]*, Sequence[float]*, Sequence[bool]*, Sequence[str]*]

Union of

  • Sequence[int] (MinLen(min_length=1))
  • Sequence[float] (MinLen(min_length=1))
  • Sequence[bool] (MinLen(min_length=1))
  • Sequence[str] (MinLen(min_length=1))

inputs.data.type Literaluint8

Examples: ['float32', 'uint8', 'uint16', 'int64', 'bool']

Literal[float32, float64, uint8, int8, uint16, int16, uint32, int32, uint64, int64, bool]

inputs.data.unit UnionNone

Union[Literal[arbitrary unit], _internal.types.SiUnit, None]

IntervalOrRatioDataDescr:

inputs.data.type Literalfloat32

Examples: ['float32', 'float64', 'uint8', 'uint16']

Literal[float32, float64, uint8, int8, uint16, int16, uint32, int32, uint64, int64]

inputs.data.range Sequence(None, None)

Tuple (minimum, maximum) specifying the allowed range of the data in this tensor. None corresponds to min/max of what can be expressed by data_type.

Sequence[Optional[float], Optional[float]]

inputs.data.unit Unionarbitrary unit

Union[Literal[arbitrary unit], _internal.types.SiUnit]

inputs.data.scale float1.0

Scale for data on an interval (or ratio) scale.

inputs.data.offset Optional[float]None

Offset for data on a ratio scale.

inputs.optional boolFalse

indicates that this tensor may be None

inputs.preprocessing Sequence[]

Description of how this input should be preprocessed.

notes:

  • If preprocessing does not start with an 'ensure_dtype' entry, it is added to ensure an input tensor's data type matches the input tensor's data description.
  • If preprocessing does not end with an 'ensure_dtype' or 'binarize' entry, an 'ensure_dtype' step is added to ensure preprocessing steps are not unintentionally changing the data type.
Sequence[Union[BinarizeDescr, ..., ScaleRangeDescr]*]

Sequence of Union of

  • BinarizeDescr
  • ClipDescr
  • EnsureDtypeDescr
  • ScaleLinearDescr
  • SigmoidDescr
  • FixedZeroMeanUnitVarianceDescr
  • ZeroMeanUnitVarianceDescr
  • ScaleRangeDescr

(Discriminator(discriminator='id', custom_error_type=None, custom_error_message=None, custom_error_context=None))

BinarizeDescr:

inputs.preprocessing.i.id Literal[binarize]binarize

inputs.preprocessing.i.kwargs Union

Union[BinarizeKwargs, BinarizeAlongAxisKwargs]

BinarizeKwargs:

inputs.preprocessing.i.kwargs.threshold float

The fixed threshold

BinarizeAlongAxisKwargs:

inputs.preprocessing.i.kwargs.threshold Sequence[float]

The fixed threshold values along axis

inputs.preprocessing.i.kwargs.axis AxisId

The threshold axis Example: 'channel'

ClipDescr:

inputs.preprocessing.i.id Literal[clip]clip

inputs.preprocessing.i.kwargs model.v0_4.ClipKwargs

model.v0_4.ClipKwargs

model.v0_4.ClipKwargs:

inputs.preprocessing.i.kwargs.min float

minimum value for clipping

inputs.preprocessing.i.kwargs.max float

maximum value for clipping

EnsureDtypeDescr:

inputs.preprocessing.i.id Literal[ensure_dtype]ensure_dtype

inputs.preprocessing.i.kwargs EnsureDtypeKwargs

EnsureDtypeKwargs

EnsureDtypeKwargs:

inputs.preprocessing.i.kwargs.dtype Literal

Literal[float32, float64, uint8, int8, uint16, int16, uint32, int32, uint64, int64, bool]

ScaleLinearDescr:

inputs.preprocessing.i.id Literal[scale_linear]scale_linear

inputs.preprocessing.i.kwargs Union

Union[ScaleLinearKwargs, ScaleLinearAlongAxisKwargs]

ScaleLinearKwargs:

inputs.preprocessing.i.kwargs.gain float1.0

multiplicative factor

inputs.preprocessing.i.kwargs.offset float0.0

additive term

ScaleLinearAlongAxisKwargs:

inputs.preprocessing.i.kwargs.axis AxisId

The axis of of gains/offsets values. Example: 'channel'

inputs.preprocessing.i.kwargs.gain Union1.0

multiplicative factor

Union[float, Sequence[float] (MinLen(min_length=1))]

inputs.preprocessing.i.kwargs.offset Union0.0

additive term

Union[float, Sequence[float] (MinLen(min_length=1))]

SigmoidDescr:

inputs.preprocessing.i.id Literal[sigmoid]sigmoid

FixedZeroMeanUnitVarianceDescr:

inputs.preprocessing.i.id Literalfixed_zero_mean_unit_variance

Literal[fixed_zero_mean_unit_variance]

inputs.preprocessing.i.kwargs Union

Union[FixedZeroMeanUnitVarianceKwargs, FixedZeroMeanUnitVarianceAlongAxisKwargs]

FixedZeroMeanUnitVarianceKwargs:

inputs.preprocessing.i.kwargs.mean float

The mean value to normalize with.

inputs.preprocessing.i.kwargs.std float

The standard deviation value to normalize with.

FixedZeroMeanUnitVarianceAlongAxisKwargs:

inputs.preprocessing.i.kwargs.mean Sequence[float]

The mean value(s) to normalize with.

inputs.preprocessing.i.kwargs.std Sequence[float (Ge(ge=1e-06))]

The standard deviation value(s) to normalize with. Size must match mean values.

inputs.preprocessing.i.kwargs.axis AxisId

The axis of the mean/std values to normalize each entry along that dimension separately. Examples: ['channel', 'index']

ZeroMeanUnitVarianceDescr:

inputs.preprocessing.i.id Literal[zero_mean_unit_variance]zero_mean_unit_variance

inputs.preprocessing.i.kwargs ZeroMeanUnitVarianceKwargsaxes=None eps=1e-06

ZeroMeanUnitVarianceKwargs

ZeroMeanUnitVarianceKwargs:

inputs.preprocessing.i.kwargs.axes OptionalNone

The subset of axes to normalize jointly, i.e. axes to reduce to compute mean/std. For example to normalize 'batch', 'x' and 'y' jointly in a tensor ('batch', 'channel', 'y', 'x') resulting in a tensor of equal shape normalized per channel, specify axes=('batch', 'x', 'y'). To normalize each sample independently leave out the 'batch' axis. Default: Scale all axes jointly. Example: ('batch', 'x', 'y')

Optional[Sequence[bioimageio.spec.model.v0_5.AxisId]]

inputs.preprocessing.i.kwargs.eps float1e-06

epsilon for numeric stability: out = (tensor - mean) / (std + eps).

ScaleRangeDescr:

inputs.preprocessing.i.id Literal[scale_range]scale_range

inputs.preprocessing.i.kwargs ScaleRangeKwargs

ScaleRangeKwargs

ScaleRangeKwargs:

inputs.preprocessing.i.kwargs.axes OptionalNone

The subset of axes to normalize jointly, i.e. axes to reduce to compute the min/max percentile value. For example to normalize 'batch', 'x' and 'y' jointly in a tensor ('batch', 'channel', 'y', 'x') resulting in a tensor of equal shape normalized per channel, specify axes=('batch', 'x', 'y'). To normalize samples independently, leave out the "batch" axis. Default: Scale all axes jointly. Example: ('batch', 'x', 'y')

Optional[Sequence[bioimageio.spec.model.v0_5.AxisId]]

inputs.preprocessing.i.kwargs.min_percentile float0.0

The lower percentile used to determine the value to align with zero.

inputs.preprocessing.i.kwargs.max_percentile float100.0

The upper percentile used to determine the value to align with one. Has to be bigger than min_percentile. The range is 1 to 100 instead of 0 to 100 to avoid mistakenly accepting percentiles specified in the range 0.0 to 1.0.

inputs.preprocessing.i.kwargs.eps float1e-06

Epsilon for numeric stability. out = (tensor - v_lower) / (v_upper - v_lower + eps); with v_lower,v_upper values at the respective percentiles.

inputs.preprocessing.i.kwargs.reference_tensor Optional[TensorId]None

Tensor ID to compute the percentiles from. Default: The tensor itself. For any tensor in inputs only input tensor references are allowed.

license Union

A SPDX license identifier. We do not support custom license beyond the SPDX license list, if you need that please open a GitHub issue to discuss your intentions with the community. Examples: ['CC0-1.0', 'MIT', 'BSD-2-Clause']

Union[_internal.license_id.LicenseId, _internal.license_id.DeprecatedLicenseId]

name str

A human-readable name of this model. It should be no longer than 64 characters and may only contain letter, number, underscore, minus, parentheses and spaces. We recommend to chose a name that refers to the model's task and image modality.

outputs Sequence

Describes the output tensors.

Sequence[bioimageio.spec.model.v0_5.OutputTensorDescr]

OutputTensorDescr:

outputs.id TensorIdoutput

Output tensor id. No duplicates are allowed across all inputs and outputs.

outputs.description str ≝ ``

free text description

outputs.axes Sequence

tensor axes

Sequence[typing.Annotated[typing.Union[bioimageio.spec.model.v0_5.BatchAxis, bioimageio.spec.model.v0_5.ChannelAxis, bioimageio.spec.model.v0_5.IndexOutputAxis, typing.Annotated[typing.Union[typing.Annotated[bioimageio.spec.model.v0_5.TimeOutputAxis, Tag(tag='wo_halo')], typing.Annotated[bioimageio.spec.model.v0_5.TimeOutputAxisWithHalo, Tag(tag='with_halo')]], Discriminator(discriminator=, custom_error_type=None, custom_error_message=None, custom_error_context=None)], typing.Annotated[typing.Union[typing.Annotated[bioimageio.spec.model.v0_5.SpaceOutputAxis, Tag(tag='wo_halo')], typing.Annotated[bioimageio.spec.model.v0_5.SpaceOutputAxisWithHalo, Tag(tag='with_halo')]], Discriminator(discriminator=, custom_error_type=None, custom_error_message=None, custom_error_context=None)]], Discriminator(discriminator='type', custom_error_type=None, custom_error_message=None, custom_error_context=None)]]

Sequence[typing.Annotated[typing.Union[bioimageio.spec.model.v0_5.BatchAxis, bioimageio.spec.model.v0_5.ChannelAxis, bioimageio.spec.model.v0_5.IndexOutputAxis, typing.Annotated[typing.Union[typing.Annotated[bioimageio.spec.model.v0_5.TimeOutputAxis, Tag(tag='wo_halo')], typing.Annotated[bioimageio.spec.model.v0_5.TimeOutputAxisWithHalo, Tag(tag='with_halo')]], Discriminator(discriminator=<function _get_halo_axis_discriminator_value at 0x7fd8d1f8f560>, custom_error_type=None, custom_error_message=None, custom_error_context=None)], typing.Annotated[typing.Union[typing.Annotated[bioimageio.spec.model.v0_5.SpaceOutputAxis, Tag(tag='wo_halo')], typing.Annotated[bioimageio.spec.model.v0_5.SpaceOutputAxisWithHalo, Tag(tag='with_halo')]], Discriminator(discriminator=<function _get_halo_axis_discriminator_value at 0x7fd8d1f8f560>, custom_error_type=None, custom_error_message=None, custom_error_context=None)]], Discriminator(discriminator='type', custom_error_type=None, custom_error_message=None, custom_error_context=None)]]

BatchAxis:

outputs.axes.id AxisIdbatch

outputs.axes.description str ≝ ``

outputs.axes.type Literal[batch]batch

outputs.axes.size Optional[Literal[1]]None

The batch size may be fixed to 1, otherwise (the default) it may be chosen arbitrarily depending on available memory

ChannelAxis:

outputs.axes.id AxisIdchannel

outputs.axes.description str ≝ ``

outputs.axes.type Literal[channel]channel

outputs.axes.channel_names Sequence

Sequence[_internal.types.Identifier]

IndexOutputAxis:

outputs.axes.id AxisIdindex

outputs.axes.description str ≝ ``

outputs.axes.type Literal[index]index

outputs.axes.size Union

The size/length of this axis can be specified as

  • fixed integer
  • reference to another axis with an optional offset (SizeReference)
  • data dependent size using DataDependentSize (size is only known after model inference) Examples: [10, {'tensor_id': 't', 'axis_id': 'a', 'offset': 5}]
Union[int (Gt(gt=0)), SizeReference, DataDependentSize]

SizeReference:

outputs.axes.size.tensor_id TensorId

tensor id of the reference axis

outputs.axes.size.axis_id AxisId

axis id of the reference axis

outputs.axes.size.offset int0

DataDependentSize:

outputs.axes.size.min int1
outputs.axes.size.max Optional[int]None

TimeOutputAxis:

outputs.axes.size Union

The size/length of this axis can be specified as

  • fixed integer
  • reference to another axis with an optional offset (see SizeReference) Examples: [10, {'tensor_id': 't', 'axis_id': 'a', 'offset': 5}]
Union[int (Gt(gt=0)), SizeReference]

SizeReference:

outputs.axes.size.tensor_id TensorId

tensor id of the reference axis

outputs.axes.size.axis_id AxisId

axis id of the reference axis

outputs.axes.size.offset int0

outputs.axes.id AxisIdtime

outputs.axes.description str ≝ ``

outputs.axes.type Literal[time]time

outputs.axes.unit OptionalNone

Optional[Literal[attosecond, ..., zettasecond]]

Optional[Literal of

  • attosecond
  • centisecond
  • day
  • decisecond
  • exasecond
  • femtosecond
  • gigasecond
  • hectosecond
  • hour
  • kilosecond
  • megasecond
  • microsecond
  • millisecond
  • minute
  • nanosecond
  • petasecond
  • picosecond
  • second
  • terasecond
  • yoctosecond
  • yottasecond
  • zeptosecond
  • zettasecond ]

outputs.axes.scale float1.0

TimeOutputAxisWithHalo:

outputs.axes.halo int

The halo should be cropped from the output tensor to avoid boundary effects. It is to be cropped from both sides, i.e. size_after_crop = size - 2 * halo. To document a halo that is already cropped by the model use size.offset instead.

outputs.axes.size SizeReference

reference to another axis with an optional offset (see SizeReference) Examples: [10, {'tensor_id': 't', 'axis_id': 'a', 'offset': 5}]

SizeReference

SizeReference:

outputs.axes.size.tensor_id TensorId

tensor id of the reference axis

outputs.axes.size.axis_id AxisId

axis id of the reference axis

outputs.axes.size.offset int0

outputs.axes.id AxisIdtime

outputs.axes.description str ≝ ``

outputs.axes.type Literal[time]time

outputs.axes.unit OptionalNone

Optional[Literal[attosecond, ..., zettasecond]]

Optional[Literal of

  • attosecond
  • centisecond
  • day
  • decisecond
  • exasecond
  • femtosecond
  • gigasecond
  • hectosecond
  • hour
  • kilosecond
  • megasecond
  • microsecond
  • millisecond
  • minute
  • nanosecond
  • petasecond
  • picosecond
  • second
  • terasecond
  • yoctosecond
  • yottasecond
  • zeptosecond
  • zettasecond ]

outputs.axes.scale float1.0

SpaceOutputAxis:

outputs.axes.size Union

The size/length of this axis can be specified as

  • fixed integer
  • reference to another axis with an optional offset (see SizeReference) Examples: [10, {'tensor_id': 't', 'axis_id': 'a', 'offset': 5}]
Union[int (Gt(gt=0)), SizeReference]

SizeReference:

outputs.axes.size.tensor_id TensorId

tensor id of the reference axis

outputs.axes.size.axis_id AxisId

axis id of the reference axis

outputs.axes.size.offset int0

outputs.axes.id AxisIdx

Examples: ['x', 'y', 'z']

outputs.axes.description str ≝ ``

outputs.axes.type Literal[space]space

outputs.axes.unit OptionalNone

Optional[Literal[attometer, ..., zettameter]]

Optional[Literal of

  • attometer
  • angstrom
  • centimeter
  • decimeter
  • exameter
  • femtometer
  • foot
  • gigameter
  • hectometer
  • inch
  • kilometer
  • megameter
  • meter
  • micrometer
  • mile
  • millimeter
  • nanometer
  • parsec
  • petameter
  • picometer
  • terameter
  • yard
  • yoctometer
  • yottameter
  • zeptometer
  • zettameter ]

outputs.axes.scale float1.0

SpaceOutputAxisWithHalo:

outputs.axes.halo int

The halo should be cropped from the output tensor to avoid boundary effects. It is to be cropped from both sides, i.e. size_after_crop = size - 2 * halo. To document a halo that is already cropped by the model use size.offset instead.

outputs.axes.size SizeReference

reference to another axis with an optional offset (see SizeReference) Examples: [10, {'tensor_id': 't', 'axis_id': 'a', 'offset': 5}]

SizeReference

SizeReference:

outputs.axes.size.tensor_id TensorId

tensor id of the reference axis

outputs.axes.size.axis_id AxisId

axis id of the reference axis

outputs.axes.size.offset int0

outputs.axes.id AxisIdx

Examples: ['x', 'y', 'z']

outputs.axes.description str ≝ ``

outputs.axes.type Literal[space]space

outputs.axes.unit OptionalNone

Optional[Literal[attometer, ..., zettameter]]

Optional[Literal of

  • attometer
  • angstrom
  • centimeter
  • decimeter
  • exameter
  • femtometer
  • foot
  • gigameter
  • hectometer
  • inch
  • kilometer
  • megameter
  • meter
  • micrometer
  • mile
  • millimeter
  • nanometer
  • parsec
  • petameter
  • picometer
  • terameter
  • yard
  • yoctometer
  • yottameter
  • zeptometer
  • zettameter ]

outputs.axes.scale float1.0

outputs.test_tensor _internal.io.FileDescr

An example tensor to use for testing. Using the model with the test input tensors is expected to yield the test output tensors. Each test tensor has be a an ndarray in the numpy.lib file format. The file extension must be '.npy'.

_internal.io.FileDescr

_internal.io.FileDescr:

outputs.test_tensor.source Union

∈📦 file source

Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )]

outputs.test_tensor.sha256 OptionalNone

SHA256 checksum of the source file

Optional[_internal.io_basics.Sha256]

outputs.sample_tensor Optional[_internal.io.FileDescr]None

A sample tensor to illustrate a possible input/output for the model, The sample image primarily serves to inform a human user about an example use case and is typically stored as .hdf5, .png or .tiff. It has to be readable by the imageio library (numpy's .npy format is not supported). The image dimensionality has to match the number of axes specified in this tensor description.

Optional[_internal.io.FileDescr]

_internal.io.FileDescr:

outputs.sample_tensor.source Union

∈📦 file source

Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )]

outputs.sample_tensor.sha256 OptionalNone

SHA256 checksum of the source file

Optional[_internal.io_basics.Sha256]

outputs.data Uniontype='float32' range=(None, None) unit='arbitrary unit' scale=1.0 offset=None

Description of the tensor's data values, optionally per channel. If specified per channel, the data type needs to match across channels.

Union[NominalOrOrdinalDataDescr, IntervalOrRatioDataDescr, Sequence[typing.Union[bioimageio.spec.model.v0_5.NominalOrOrdinalDataDescr, bioimageio.spec.model.v0_5.IntervalOrRatioDataDescr]]*]

Union of

  • NominalOrOrdinalDataDescr
  • IntervalOrRatioDataDescr
  • Sequence[typing.Union[bioimageio.spec.model.v0_5.NominalOrOrdinalDataDescr, bioimageio.spec.model.v0_5.IntervalOrRatioDataDescr]] (MinLen(min_length=1))

NominalOrOrdinalDataDescr:

outputs.data.values Union

A fixed set of nominal or an ascending sequence of ordinal values. In this case data_type is required to be an unsigend integer type, e.g. 'uint8'. String values are interpreted as labels for tensor values 0, ..., N. Note: as YAML 1.2 does not natively support a "set" datatype, nominal values should be given as a sequence (aka list/array) as well.

Union[Sequence[int]*, Sequence[float]*, Sequence[bool]*, Sequence[str]*]

Union of

  • Sequence[int] (MinLen(min_length=1))
  • Sequence[float] (MinLen(min_length=1))
  • Sequence[bool] (MinLen(min_length=1))
  • Sequence[str] (MinLen(min_length=1))

outputs.data.type Literaluint8

Examples: ['float32', 'uint8', 'uint16', 'int64', 'bool']

Literal[float32, float64, uint8, int8, uint16, int16, uint32, int32, uint64, int64, bool]

outputs.data.unit UnionNone

Union[Literal[arbitrary unit], _internal.types.SiUnit, None]

IntervalOrRatioDataDescr:

outputs.data.type Literalfloat32

Examples: ['float32', 'float64', 'uint8', 'uint16']

Literal[float32, float64, uint8, int8, uint16, int16, uint32, int32, uint64, int64]

outputs.data.range Sequence(None, None)

Tuple (minimum, maximum) specifying the allowed range of the data in this tensor. None corresponds to min/max of what can be expressed by data_type.

Sequence[Optional[float], Optional[float]]

outputs.data.unit Unionarbitrary unit

Union[Literal[arbitrary unit], _internal.types.SiUnit]

outputs.data.scale float1.0

Scale for data on an interval (or ratio) scale.

outputs.data.offset Optional[float]None

Offset for data on a ratio scale.

NominalOrOrdinalDataDescr:

outputs.data.values Union

A fixed set of nominal or an ascending sequence of ordinal values. In this case data_type is required to be an unsigend integer type, e.g. 'uint8'. String values are interpreted as labels for tensor values 0, ..., N. Note: as YAML 1.2 does not natively support a "set" datatype, nominal values should be given as a sequence (aka list/array) as well.

Union[Sequence[int]*, Sequence[float]*, Sequence[bool]*, Sequence[str]*]

Union of

  • Sequence[int] (MinLen(min_length=1))
  • Sequence[float] (MinLen(min_length=1))
  • Sequence[bool] (MinLen(min_length=1))
  • Sequence[str] (MinLen(min_length=1))

outputs.data.type Literaluint8

Examples: ['float32', 'uint8', 'uint16', 'int64', 'bool']

Literal[float32, float64, uint8, int8, uint16, int16, uint32, int32, uint64, int64, bool]

outputs.data.unit UnionNone

Union[Literal[arbitrary unit], _internal.types.SiUnit, None]

IntervalOrRatioDataDescr:

outputs.data.type Literalfloat32

Examples: ['float32', 'float64', 'uint8', 'uint16']

Literal[float32, float64, uint8, int8, uint16, int16, uint32, int32, uint64, int64]

outputs.data.range Sequence(None, None)

Tuple (minimum, maximum) specifying the allowed range of the data in this tensor. None corresponds to min/max of what can be expressed by data_type.

Sequence[Optional[float], Optional[float]]

outputs.data.unit Unionarbitrary unit

Union[Literal[arbitrary unit], _internal.types.SiUnit]

outputs.data.scale float1.0

Scale for data on an interval (or ratio) scale.

outputs.data.offset Optional[float]None

Offset for data on a ratio scale.

outputs.postprocessing Sequence[]

Description of how this output should be postprocessed.

note: postprocessing always ends with an 'ensure_dtype' operation. If not given this is added to cast to this tensor's data.type.

Sequence[Union[BinarizeDescr, ..., ScaleMeanVarianceDescr]*]

Sequence of Union of

  • BinarizeDescr
  • ClipDescr
  • EnsureDtypeDescr
  • ScaleLinearDescr
  • SigmoidDescr
  • FixedZeroMeanUnitVarianceDescr
  • ZeroMeanUnitVarianceDescr
  • ScaleRangeDescr
  • ScaleMeanVarianceDescr

(Discriminator(discriminator='id', custom_error_type=None, custom_error_message=None, custom_error_context=None))

BinarizeDescr:

outputs.postprocessing.i.id Literal[binarize]binarize

outputs.postprocessing.i.kwargs Union

Union[BinarizeKwargs, BinarizeAlongAxisKwargs]

BinarizeKwargs:

outputs.postprocessing.i.kwargs.threshold float

The fixed threshold

BinarizeAlongAxisKwargs:

outputs.postprocessing.i.kwargs.threshold Sequence[float]

The fixed threshold values along axis

outputs.postprocessing.i.kwargs.axis AxisId

The threshold axis Example: 'channel'

ClipDescr:

outputs.postprocessing.i.id Literal[clip]clip

outputs.postprocessing.i.kwargs model.v0_4.ClipKwargs

model.v0_4.ClipKwargs

model.v0_4.ClipKwargs:

outputs.postprocessing.i.kwargs.min float

minimum value for clipping

outputs.postprocessing.i.kwargs.max float

maximum value for clipping

EnsureDtypeDescr:

outputs.postprocessing.i.id Literal[ensure_dtype]ensure_dtype

outputs.postprocessing.i.kwargs EnsureDtypeKwargs

EnsureDtypeKwargs

EnsureDtypeKwargs:

outputs.postprocessing.i.kwargs.dtype Literal

Literal[float32, float64, uint8, int8, uint16, int16, uint32, int32, uint64, int64, bool]

ScaleLinearDescr:

outputs.postprocessing.i.id Literal[scale_linear]scale_linear

outputs.postprocessing.i.kwargs Union

Union[ScaleLinearKwargs, ScaleLinearAlongAxisKwargs]

ScaleLinearKwargs:

outputs.postprocessing.i.kwargs.gain float1.0

multiplicative factor

outputs.postprocessing.i.kwargs.offset float0.0

additive term

ScaleLinearAlongAxisKwargs:

outputs.postprocessing.i.kwargs.axis AxisId

The axis of of gains/offsets values. Example: 'channel'

outputs.postprocessing.i.kwargs.gain Union1.0

multiplicative factor

Union[float, Sequence[float] (MinLen(min_length=1))]

outputs.postprocessing.i.kwargs.offset Union0.0

additive term

Union[float, Sequence[float] (MinLen(min_length=1))]

SigmoidDescr:

outputs.postprocessing.i.id Literal[sigmoid]sigmoid

FixedZeroMeanUnitVarianceDescr:

outputs.postprocessing.i.id Literalfixed_zero_mean_unit_variance

Literal[fixed_zero_mean_unit_variance]

outputs.postprocessing.i.kwargs Union

Union[FixedZeroMeanUnitVarianceKwargs, FixedZeroMeanUnitVarianceAlongAxisKwargs]

FixedZeroMeanUnitVarianceKwargs:

outputs.postprocessing.i.kwargs.mean float

The mean value to normalize with.

outputs.postprocessing.i.kwargs.std float

The standard deviation value to normalize with.

FixedZeroMeanUnitVarianceAlongAxisKwargs:

outputs.postprocessing.i.kwargs.mean Sequence[float]

The mean value(s) to normalize with.

outputs.postprocessing.i.kwargs.std Sequence[float (Ge(ge=1e-06))]

The standard deviation value(s) to normalize with. Size must match mean values.

outputs.postprocessing.i.kwargs.axis AxisId

The axis of the mean/std values to normalize each entry along that dimension separately. Examples: ['channel', 'index']

ZeroMeanUnitVarianceDescr:

outputs.postprocessing.i.id Literal[zero_mean_unit_variance]zero_mean_unit_variance

outputs.postprocessing.i.kwargs ZeroMeanUnitVarianceKwargsaxes=None eps=1e-06

ZeroMeanUnitVarianceKwargs

ZeroMeanUnitVarianceKwargs:

outputs.postprocessing.i.kwargs.axes OptionalNone

The subset of axes to normalize jointly, i.e. axes to reduce to compute mean/std. For example to normalize 'batch', 'x' and 'y' jointly in a tensor ('batch', 'channel', 'y', 'x') resulting in a tensor of equal shape normalized per channel, specify axes=('batch', 'x', 'y'). To normalize each sample independently leave out the 'batch' axis. Default: Scale all axes jointly. Example: ('batch', 'x', 'y')

Optional[Sequence[bioimageio.spec.model.v0_5.AxisId]]

outputs.postprocessing.i.kwargs.eps float1e-06

epsilon for numeric stability: out = (tensor - mean) / (std + eps).

ScaleRangeDescr:

outputs.postprocessing.i.id Literal[scale_range]scale_range

outputs.postprocessing.i.kwargs ScaleRangeKwargs

ScaleRangeKwargs

ScaleRangeKwargs:

outputs.postprocessing.i.kwargs.axes OptionalNone

The subset of axes to normalize jointly, i.e. axes to reduce to compute the min/max percentile value. For example to normalize 'batch', 'x' and 'y' jointly in a tensor ('batch', 'channel', 'y', 'x') resulting in a tensor of equal shape normalized per channel, specify axes=('batch', 'x', 'y'). To normalize samples independently, leave out the "batch" axis. Default: Scale all axes jointly. Example: ('batch', 'x', 'y')

Optional[Sequence[bioimageio.spec.model.v0_5.AxisId]]

outputs.postprocessing.i.kwargs.min_percentile float0.0

The lower percentile used to determine the value to align with zero.

outputs.postprocessing.i.kwargs.max_percentile float100.0

The upper percentile used to determine the value to align with one. Has to be bigger than min_percentile. The range is 1 to 100 instead of 0 to 100 to avoid mistakenly accepting percentiles specified in the range 0.0 to 1.0.

outputs.postprocessing.i.kwargs.eps float1e-06

Epsilon for numeric stability. out = (tensor - v_lower) / (v_upper - v_lower + eps); with v_lower,v_upper values at the respective percentiles.

outputs.postprocessing.i.kwargs.reference_tensor Optional[TensorId]None

Tensor ID to compute the percentiles from. Default: The tensor itself. For any tensor in inputs only input tensor references are allowed.

ScaleMeanVarianceDescr:

outputs.postprocessing.i.id Literal[scale_mean_variance]scale_mean_variance

outputs.postprocessing.i.kwargs ScaleMeanVarianceKwargs

ScaleMeanVarianceKwargs

ScaleMeanVarianceKwargs:

outputs.postprocessing.i.kwargs.reference_tensor TensorId

Name of tensor to match.

outputs.postprocessing.i.kwargs.axes OptionalNone

The subset of axes to normalize jointly, i.e. axes to reduce to compute mean/std. For example to normalize 'batch', 'x' and 'y' jointly in a tensor ('batch', 'channel', 'y', 'x') resulting in a tensor of equal shape normalized per channel, specify axes=('batch', 'x', 'y'). To normalize samples independently, leave out the 'batch' axis. Default: Scale all axes jointly. Example: ('batch', 'x', 'y')

Optional[Sequence[bioimageio.spec.model.v0_5.AxisId]]

outputs.postprocessing.i.kwargs.eps float1e-06

Epsilon for numeric stability: out = (tensor - mean) / (std + eps) * (ref_std + eps) + ref_mean.

weights WeightsDescr

The weights for this model. Weights can be given for different formats, but should otherwise be equivalent. The available weight formats determine which consumers can use this model.

WeightsDescr

WeightsDescr:

weights.keras_hdf5 Optional[KerasHdf5WeightsDescr]None

Optional[KerasHdf5WeightsDescr]

KerasHdf5WeightsDescr:

weights.keras_hdf5.source Union

∈📦 The weights file.

Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )]

weights.keras_hdf5.sha256 OptionalNone

SHA256 checksum of the source file

Optional[_internal.io_basics.Sha256]

weights.keras_hdf5.authors OptionalNone

Authors Either the person(s) that have trained this model resulting in the original weights file. (If this is the initial weights entry, i.e. it does not have a parent) Or the person(s) who have converted the weights to this weights format. (If this is a child weight, i.e. it has a parent field)

Optional[Sequence[generic.v0_3.Author]]

generic.v0_3.Author:

weights.keras_hdf5.authors.i.affiliation Optional[str]None

Affiliation

weights.keras_hdf5.authors.i.email Optional[Email]None

Email

weights.keras_hdf5.authors.i.orcid OptionalNone

An ORCID iD in hyphenated groups of 4 digits, (and valid as per ISO 7064 11,2.) Example: '0000-0001-2345-6789'

Optional[_internal.types.OrcidId]

weights.keras_hdf5.authors.i.name str
weights.keras_hdf5.authors.i.github_user Optional[str]None

weights.keras_hdf5.parent OptionalNone

The source weights these weights were converted from. For example, if a model's weights were converted from the pytorch_state_dict format to torchscript, The pytorch_state_dict weights entry has no parent and is the parent of the torchscript weights. All weight entries except one (the initial set of weights resulting from training the model), need to have this field. Example: 'pytorch_state_dict'

Optional[Literal[keras_hdf5, onnx, pytorch_state_dict, tensorflow_js, tensorflow_saved_model_bundle, torchscript]]

weights.keras_hdf5.tensorflow_version _internal.version_type.Version

TensorFlow version used to create these weights.

weights.onnx Optional[OnnxWeightsDescr]None

Optional[OnnxWeightsDescr]

OnnxWeightsDescr:

weights.onnx.source Union

∈📦 The weights file.

Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )]

weights.onnx.sha256 OptionalNone

SHA256 checksum of the source file

Optional[_internal.io_basics.Sha256]

weights.onnx.authors OptionalNone

Authors Either the person(s) that have trained this model resulting in the original weights file. (If this is the initial weights entry, i.e. it does not have a parent) Or the person(s) who have converted the weights to this weights format. (If this is a child weight, i.e. it has a parent field)

Optional[Sequence[generic.v0_3.Author]]

generic.v0_3.Author:

weights.onnx.authors.i.affiliation Optional[str]None

Affiliation

weights.onnx.authors.i.email Optional[Email]None

Email

weights.onnx.authors.i.orcid OptionalNone

An ORCID iD in hyphenated groups of 4 digits, (and valid as per ISO 7064 11,2.) Example: '0000-0001-2345-6789'

Optional[_internal.types.OrcidId]

weights.onnx.authors.i.name str
weights.onnx.authors.i.github_user Optional[str]None

weights.onnx.parent OptionalNone

The source weights these weights were converted from. For example, if a model's weights were converted from the pytorch_state_dict format to torchscript, The pytorch_state_dict weights entry has no parent and is the parent of the torchscript weights. All weight entries except one (the initial set of weights resulting from training the model), need to have this field. Example: 'pytorch_state_dict'

Optional[Literal[keras_hdf5, onnx, pytorch_state_dict, tensorflow_js, tensorflow_saved_model_bundle, torchscript]]

weights.onnx.opset_version int

ONNX opset version

weights.pytorch_state_dict OptionalNone

Optional[PytorchStateDictWeightsDescr]

PytorchStateDictWeightsDescr:

weights.pytorch_state_dict.source Union

∈📦 The weights file.

Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )]

weights.pytorch_state_dict.sha256 OptionalNone

SHA256 checksum of the source file

Optional[_internal.io_basics.Sha256]

weights.pytorch_state_dict.authors OptionalNone

Authors Either the person(s) that have trained this model resulting in the original weights file. (If this is the initial weights entry, i.e. it does not have a parent) Or the person(s) who have converted the weights to this weights format. (If this is a child weight, i.e. it has a parent field)

Optional[Sequence[generic.v0_3.Author]]

generic.v0_3.Author:

weights.pytorch_state_dict.authors.i.affiliation Optional[str]None

Affiliation

weights.pytorch_state_dict.authors.i.email Optional[Email]None

Email

weights.pytorch_state_dict.authors.i.orcid OptionalNone

An ORCID iD in hyphenated groups of 4 digits, (and valid as per ISO 7064 11,2.) Example: '0000-0001-2345-6789'

Optional[_internal.types.OrcidId]

weights.pytorch_state_dict.authors.i.name str
weights.pytorch_state_dict.authors.i.github_user Optional[str]None

weights.pytorch_state_dict.parent OptionalNone

The source weights these weights were converted from. For example, if a model's weights were converted from the pytorch_state_dict format to torchscript, The pytorch_state_dict weights entry has no parent and is the parent of the torchscript weights. All weight entries except one (the initial set of weights resulting from training the model), need to have this field. Example: 'pytorch_state_dict'

Optional[Literal[keras_hdf5, onnx, pytorch_state_dict, tensorflow_js, tensorflow_saved_model_bundle, torchscript]]

weights.pytorch_state_dict.architecture Union

Union[ArchitectureFromFileDescr, ArchitectureFromLibraryDescr]

ArchitectureFromFileDescr:

weights.pytorch_state_dict.architecture.source Union

∈📦 file source

Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )]

weights.pytorch_state_dict.architecture.sha256 OptionalNone

SHA256 checksum of the source file

Optional[_internal.io_basics.Sha256]

weights.pytorch_state_dict.architecture.callable _internal.types.Identifier

Identifier of the callable that returns a torch.nn.Module instance. Examples: ['MyNetworkClass', 'get_my_model']

weights.pytorch_state_dict.architecture.kwargs Dict[str, YamlValue]{}

key word arguments for the callable

ArchitectureFromLibraryDescr:

weights.pytorch_state_dict.architecture.callable _internal.types.Identifier

Identifier of the callable that returns a torch.nn.Module instance. Examples: ['MyNetworkClass', 'get_my_model']

weights.pytorch_state_dict.architecture.kwargs Dict[str, YamlValue]{}

key word arguments for the callable

weights.pytorch_state_dict.architecture.import_from str

Where to import the callable from, i.e. from <import_from> import <callable>

weights.pytorch_state_dict.pytorch_version _internal.version_type.Version

Version of the PyTorch library used. If architecture.depencencies is specified it has to include pytorch and any version pinning has to be compatible.

weights.pytorch_state_dict.dependencies Optional[EnvironmentFileDescr]None

Custom depencies beyond pytorch. The conda environment file should include pytorch and any version pinning has to be compatible with pytorch_version.

Optional[EnvironmentFileDescr]

EnvironmentFileDescr:

weights.pytorch_state_dict.dependencies.source Union

∈📦 Conda environment file. Allows to specify custom dependencies, see conda docs:

Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )]

weights.pytorch_state_dict.dependencies.sha256 OptionalNone

SHA256 checksum of the source file

Optional[_internal.io_basics.Sha256]

weights.tensorflow_js OptionalNone

Optional[TensorflowJsWeightsDescr]

TensorflowJsWeightsDescr:

weights.tensorflow_js.source Union

∈📦 The multi-file weights. All required files/folders should be a zip archive.

Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )]

weights.tensorflow_js.sha256 OptionalNone

SHA256 checksum of the source file

Optional[_internal.io_basics.Sha256]

weights.tensorflow_js.authors OptionalNone

Authors Either the person(s) that have trained this model resulting in the original weights file. (If this is the initial weights entry, i.e. it does not have a parent) Or the person(s) who have converted the weights to this weights format. (If this is a child weight, i.e. it has a parent field)

Optional[Sequence[generic.v0_3.Author]]

generic.v0_3.Author:

weights.tensorflow_js.authors.i.affiliation Optional[str]None

Affiliation

weights.tensorflow_js.authors.i.email Optional[Email]None

Email

weights.tensorflow_js.authors.i.orcid OptionalNone

An ORCID iD in hyphenated groups of 4 digits, (and valid as per ISO 7064 11,2.) Example: '0000-0001-2345-6789'

Optional[_internal.types.OrcidId]

weights.tensorflow_js.authors.i.name str
weights.tensorflow_js.authors.i.github_user Optional[str]None

weights.tensorflow_js.parent OptionalNone

The source weights these weights were converted from. For example, if a model's weights were converted from the pytorch_state_dict format to torchscript, The pytorch_state_dict weights entry has no parent and is the parent of the torchscript weights. All weight entries except one (the initial set of weights resulting from training the model), need to have this field. Example: 'pytorch_state_dict'

Optional[Literal[keras_hdf5, onnx, pytorch_state_dict, tensorflow_js, tensorflow_saved_model_bundle, torchscript]]

weights.tensorflow_js.tensorflow_version _internal.version_type.Version

Version of the TensorFlow library used.

weights.tensorflow_saved_model_bundle OptionalNone

Optional[TensorflowSavedModelBundleWeightsDescr]

TensorflowSavedModelBundleWeightsDescr:

weights.tensorflow_saved_model_bundle.source Union

∈📦 The multi-file weights. All required files/folders should be a zip archive.

Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )]

weights.tensorflow_saved_model_bundle.sha256 OptionalNone

SHA256 checksum of the source file

Optional[_internal.io_basics.Sha256]

weights.tensorflow_saved_model_bundle.authors OptionalNone

Authors Either the person(s) that have trained this model resulting in the original weights file. (If this is the initial weights entry, i.e. it does not have a parent) Or the person(s) who have converted the weights to this weights format. (If this is a child weight, i.e. it has a parent field)

Optional[Sequence[generic.v0_3.Author]]

generic.v0_3.Author:

weights.tensorflow_saved_model_bundle.authors.i.affiliation Optional[str]None

Affiliation

weights.tensorflow_saved_model_bundle.authors.i.email Optional[Email]None

Email

weights.tensorflow_saved_model_bundle.authors.i.orcid OptionalNone

An ORCID iD in hyphenated groups of 4 digits, (and valid as per ISO 7064 11,2.) Example: '0000-0001-2345-6789'

Optional[_internal.types.OrcidId]

weights.tensorflow_saved_model_bundle.authors.i.name str
weights.tensorflow_saved_model_bundle.authors.i.github_user Optional[str]None

weights.tensorflow_saved_model_bundle.parent OptionalNone

The source weights these weights were converted from. For example, if a model's weights were converted from the pytorch_state_dict format to torchscript, The pytorch_state_dict weights entry has no parent and is the parent of the torchscript weights. All weight entries except one (the initial set of weights resulting from training the model), need to have this field. Example: 'pytorch_state_dict'

Optional[Literal[keras_hdf5, onnx, pytorch_state_dict, tensorflow_js, tensorflow_saved_model_bundle, torchscript]]

weights.tensorflow_saved_model_bundle.tensorflow_version _internal.version_type.Version

Version of the TensorFlow library used.

weights.tensorflow_saved_model_bundle.dependencies Optional[EnvironmentFileDescr]None

Custom dependencies beyond tensorflow. Should include tensorflow and any version pinning has to be compatible with tensorflow_version.

Optional[EnvironmentFileDescr]

EnvironmentFileDescr:

weights.tensorflow_saved_model_bundle.dependencies.source Union

∈📦 Conda environment file. Allows to specify custom dependencies, see conda docs:

Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )]

weights.tensorflow_saved_model_bundle.dependencies.sha256 OptionalNone

SHA256 checksum of the source file

Optional[_internal.io_basics.Sha256]

weights.torchscript OptionalNone

Optional[TorchscriptWeightsDescr]

TorchscriptWeightsDescr:

weights.torchscript.source Union

∈📦 The weights file.

Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )]

weights.torchscript.sha256 OptionalNone

SHA256 checksum of the source file

Optional[_internal.io_basics.Sha256]

weights.torchscript.authors OptionalNone

Authors Either the person(s) that have trained this model resulting in the original weights file. (If this is the initial weights entry, i.e. it does not have a parent) Or the person(s) who have converted the weights to this weights format. (If this is a child weight, i.e. it has a parent field)

Optional[Sequence[generic.v0_3.Author]]

generic.v0_3.Author:

weights.torchscript.authors.i.affiliation Optional[str]None

Affiliation

weights.torchscript.authors.i.email Optional[Email]None

Email

weights.torchscript.authors.i.orcid OptionalNone

An ORCID iD in hyphenated groups of 4 digits, (and valid as per ISO 7064 11,2.) Example: '0000-0001-2345-6789'

Optional[_internal.types.OrcidId]

weights.torchscript.authors.i.name str
weights.torchscript.authors.i.github_user Optional[str]None

weights.torchscript.parent OptionalNone

The source weights these weights were converted from. For example, if a model's weights were converted from the pytorch_state_dict format to torchscript, The pytorch_state_dict weights entry has no parent and is the parent of the torchscript weights. All weight entries except one (the initial set of weights resulting from training the model), need to have this field. Example: 'pytorch_state_dict'

Optional[Literal[keras_hdf5, onnx, pytorch_state_dict, tensorflow_js, tensorflow_saved_model_bundle, torchscript]]

weights.torchscript.pytorch_version _internal.version_type.Version

Version of the PyTorch library used.

attachments Sequence[_internal.io.FileDescr][]

file attachments

Sequence[_internal.io.FileDescr]

_internal.io.FileDescr:

attachments.i.source Union

∈📦 file source

Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )]

attachments.i.sha256 OptionalNone

SHA256 checksum of the source file

Optional[_internal.io_basics.Sha256]

config Dict[str, YamlValue]{}

A field for custom configuration that can contain any keys not present in the RDF spec. This means you should not store, for example, a GitHub repo URL in config since there is a git_repo field. Keys in config may be very specific to a tool or consumer software. To avoid conflicting definitions, it is recommended to wrap added configuration into a sub-field named with the specific domain or tool name, for example:

config:
    bioimageio:  # here is the domain name
        my_custom_key: 3837283
        another_key:
            nested: value
    imagej:       # config specific to ImageJ
        macro_dir: path/to/macro/file

If possible, please use snake_case for keys in config. You may want to list linked files additionally under attachments to include them when packaging a resource. (Packaging a resource means downloading/copying important linked files and creating a ZIP archive that contains an altered rdf.yaml file with local references to the downloaded files.) Example: {'bioimageio': {'my_custom_key': 3837283, 'another_key': {'nested': 'value'}}, 'imagej': {'macro_dir': 'path/to/macro/file'}}

covers Sequence[]

Cover images. Please use an image smaller than 500KB and an aspect ratio width to height of 2:1 or 1:1. The supported image formats are: ('.gif', '.jpeg', '.jpg', '.png', '.svg')

Sequence[Union[Path*, _internal.io.RelativeFilePath, _internal.url.HttpUrl]*]

Sequence of Union of

  • Path (PathType(path_type='file'); Predicate(is_absolute); )
  • _internal.io.RelativeFilePath
  • _internal.url.HttpUrl

(union_mode='left_to_right'; WithSuffix(suffix=('.gif', '.jpeg', '.jpg', '.png', '.svg', '.tif', '.tiff'), case_sensitive=False); PlainSerializer(func=<function _package at 0x7fd8dda88fe0>, return_type=PydanticUndefined, when_used='unless-none'))

git_repo Optional[_internal.url.HttpUrl]None

A URL to the Git repository where the resource is being developed. Example: 'https://github.com/bioimage-io/spec-bioimage-io/tree/main/example_descriptions/models/unet2d_nuclei_broad'

icon UnionNone

An icon for illustration, e.g. on bioimage.io

Union[str*, Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path*]*, None]

Union of

  • str (Len(min_length=1, max_length=2))
  • Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )] (union_mode='left_to_right'; AfterValidator(wo_special_file_name); PlainSerializer(func=<function _package at 0x7fd8dda88fe0>, return_type=PydanticUndefined, when_used='unless-none'))
  • None

id Optional[ModelId]None

bioimage.io-wide unique resource identifier assigned by bioimage.io; version unspecific.

id_emoji OptionalNone

UTF-8 emoji for display alongside the id.

Optional[str (Len(min_length=1, max_length=2); )]

links Sequence[str][]

IDs of other bioimage.io resources Example: ('ilastik/ilastik', 'deepimagej/deepimagej', 'zero/notebook_u-net_3d_zerocostdl4mic')

maintainers Sequence[]

Maintainers of this resource. If not specified, authors are maintainers and at least some of them has to specify their github_user name

Sequence[generic.v0_3.Maintainer]

generic.v0_3.Maintainer:

maintainers.i.affiliation Optional[str]None

Affiliation

maintainers.i.email Optional[Email]None

Email

maintainers.i.orcid OptionalNone

An ORCID iD in hyphenated groups of 4 digits, (and valid as per ISO 7064 11,2.) Example: '0000-0001-2345-6789'

Optional[_internal.types.OrcidId]

maintainers.i.name OptionalNone

Optional[str (Predicate(_has_no_slash))]

maintainers.i.github_user str

packaged_by Sequence[generic.v0_3.Author][]

The persons that have packaged and uploaded this model. Only required if those persons differ from the authors.

Sequence[generic.v0_3.Author]

generic.v0_3.Author:

packaged_by.i.affiliation Optional[str]None

Affiliation

packaged_by.i.email Optional[Email]None

Email

packaged_by.i.orcid OptionalNone

An ORCID iD in hyphenated groups of 4 digits, (and valid as per ISO 7064 11,2.) Example: '0000-0001-2345-6789'

Optional[_internal.types.OrcidId]

packaged_by.i.name str

packaged_by.i.github_user Optional[str]None

parent Optional[LinkedModel]None

The model from which this model is derived, e.g. by fine-tuning the weights.

Optional[LinkedModel]

LinkedModel:

parent.version OptionalNone

The version of the linked resource following SemVer 2.0.

Optional[_internal.version_type.Version]

parent.id ModelId

A valid model id from the bioimage.io collection.

run_mode Optional[model.v0_4.RunMode]None

Custom run mode for this model: for more complex prediction procedures like test time data augmentation that currently cannot be expressed in the specification. No standard run modes are defined yet.

Optional[model.v0_4.RunMode]

model.v0_4.RunMode:

run_mode.name Union[Literal[deepimagej], str]

Run mode name

run_mode.kwargs Dict[str, Any]{}

Run mode specific key word arguments

tags Sequence[str][]

Associated tags Example: ('unet2d', 'pytorch', 'nucleus', 'segmentation', 'dsb2018')

timestamp _internal.types.Datetimeroot=datetime.datetime(2025, 2, 5, 13, 54, 17, 284190)

Timestamp in ISO 8601 format with a few restrictions listed here. (In Python a datetime object is valid, too).

training_data UnionNone

The dataset used to train this model

Union[None, dataset.v0_3.LinkedDataset, dataset.v0_3.DatasetDescr, dataset.v0_2.DatasetDescr]

dataset.v0_3.LinkedDataset:

training_data.version OptionalNone

The version of the linked resource following SemVer 2.0.

Optional[_internal.version_type.Version]

training_data.id dataset.v0_3.DatasetId

A valid dataset id from the bioimage.io collection.

dataset.v0_3.DatasetDescr:

training_data.name str

A human-friendly name of the resource description. May only contains letters, digits, underscore, minus, parentheses and spaces.

training_data.description str

A string containing a brief description.

training_data.covers Sequence[]

Cover images. Please use an image smaller than 500KB and an aspect ratio width to height of 2:1 or 1:1. The supported image formats are: ('.gif', '.jpeg', '.jpg', '.png', '.svg')

Sequence[Union[Path*, _internal.io.RelativeFilePath, _internal.url.HttpUrl]*]

Sequence of Union of

  • Path (PathType(path_type='file'); Predicate(is_absolute); )
  • _internal.io.RelativeFilePath
  • _internal.url.HttpUrl

(union_mode='left_to_right'; WithSuffix(suffix=('.gif', '.jpeg', '.jpg', '.png', '.svg', '.tif', '.tiff'), case_sensitive=False); PlainSerializer(func=<function _package at 0x7fd8dda88fe0>, return_type=PydanticUndefined, when_used='unless-none'))

training_data.id_emoji OptionalNone

UTF-8 emoji for display alongside the id.

Optional[str (Len(min_length=1, max_length=2); )]

training_data.authors Sequence[generic.v0_3.Author]

The authors are the creators of this resource description and the primary points of contact.

Sequence[generic.v0_3.Author]

generic.v0_3.Author:

training_data.authors.i.affiliation Optional[str]None

Affiliation

training_data.authors.i.email Optional[Email]None

Email

training_data.authors.i.orcid OptionalNone

An ORCID iD in hyphenated groups of 4 digits, (and valid as per ISO 7064 11,2.) Example: '0000-0001-2345-6789'

Optional[_internal.types.OrcidId]

training_data.authors.i.name str

training_data.authors.i.github_user Optional[str]None

training_data.attachments Sequence[_internal.io.FileDescr][]

file attachments

Sequence[_internal.io.FileDescr]

_internal.io.FileDescr:

training_data.attachments.i.source Union

∈📦 file source

Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )]

training_data.attachments.i.sha256 OptionalNone

SHA256 checksum of the source file

Optional[_internal.io_basics.Sha256]

training_data.cite Sequence[generic.v0_3.CiteEntry]

citations

Sequence[generic.v0_3.CiteEntry]

generic.v0_3.CiteEntry:

training_data.cite.i.text str

free text description

training_data.cite.i.doi Optional[_internal.types.Doi]None

A digital object identifier (DOI) is the prefered citation reference. See https://www.doi.org/ for details. (alternatively specify url)

training_data.cite.i.url Optional[_internal.url.HttpUrl]None

URL to cite (preferably specify a doi instead)

training_data.license Union

A SPDX license identifier. We do not support custom license beyond the SPDX license list, if you need that please open a GitHub issue to discuss your intentions with the community. Examples: ['CC0-1.0', 'MIT', 'BSD-2-Clause']

Union[_internal.license_id.LicenseId, _internal.license_id.DeprecatedLicenseId]

training_data.config Dict[str, YamlValue]{}

A field for custom configuration that can contain any keys not present in the RDF spec. This means you should not store, for example, a GitHub repo URL in config since there is a git_repo field. Keys in config may be very specific to a tool or consumer software. To avoid conflicting definitions, it is recommended to wrap added configuration into a sub-field named with the specific domain or tool name, for example:

config:
    bioimageio:  # here is the domain name
        my_custom_key: 3837283
        another_key:
            nested: value
    imagej:       # config specific to ImageJ
        macro_dir: path/to/macro/file

If possible, please use snake_case for keys in config. You may want to list linked files additionally under attachments to include them when packaging a resource. (Packaging a resource means downloading/copying important linked files and creating a ZIP archive that contains an altered rdf.yaml file with local references to the downloaded files.) Example: {'bioimageio': {'my_custom_key': 3837283, 'another_key': {'nested': 'value'}}, 'imagej': {'macro_dir': 'path/to/macro/file'}}

training_data.git_repo Optional[_internal.url.HttpUrl]None

A URL to the Git repository where the resource is being developed. Example: 'https://github.com/bioimage-io/spec-bioimage-io/tree/main/example_descriptions/models/unet2d_nuclei_broad'

training_data.icon UnionNone

An icon for illustration, e.g. on bioimage.io

Union[str*, Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path*]*, None]

Union of

  • str (Len(min_length=1, max_length=2))
  • Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )] (union_mode='left_to_right'; AfterValidator(wo_special_file_name); PlainSerializer(func=<function _package at 0x7fd8dda88fe0>, return_type=PydanticUndefined, when_used='unless-none'))
  • None

training_data.links Sequence[str][]

IDs of other bioimage.io resources Example: ('ilastik/ilastik', 'deepimagej/deepimagej', 'zero/notebook_u-net_3d_zerocostdl4mic')

training_data.uploader Optional[generic.v0_2.Uploader]None

The person who uploaded the model (e.g. to bioimage.io)

Optional[generic.v0_2.Uploader]

generic.v0_2.Uploader:

training_data.uploader.email Email

Email

training_data.uploader.name OptionalNone

name

Optional[str (AfterValidator(_remove_slashes))]

training_data.maintainers Sequence[]

Maintainers of this resource. If not specified, authors are maintainers and at least some of them has to specify their github_user name

Sequence[generic.v0_3.Maintainer]

generic.v0_3.Maintainer:

training_data.maintainers.i.affiliation Optional[str]None

Affiliation

training_data.maintainers.i.email Optional[Email]None

Email

training_data.maintainers.i.orcid OptionalNone

An ORCID iD in hyphenated groups of 4 digits, (and valid as per ISO 7064 11,2.) Example: '0000-0001-2345-6789'

Optional[_internal.types.OrcidId]

training_data.maintainers.i.name OptionalNone

Optional[str (Predicate(_has_no_slash))]

training_data.maintainers.i.github_user str

training_data.tags Sequence[str][]

Associated tags Example: ('unet2d', 'pytorch', 'nucleus', 'segmentation', 'dsb2018')

training_data.version OptionalNone

The version of the resource following SemVer 2.0.

Optional[_internal.version_type.Version]

training_data.format_version Literal[0.3.0]0.3.0

The format version of this resource specification

training_data.documentation OptionalNone

∈📦 URL or relative path to a markdown file encoded in UTF-8 with additional documentation. The recommended documentation file name is README.md. An .md suffix is mandatory. Examples: ['https://raw.githubusercontent.com/bioimage-io/spec-bioimage-io/main/example_descriptions/models/unet2d_nuclei_broad/README.md', '…']

Optional[Union[Path*, _internal.io.RelativeFilePath, _internal.url.HttpUrl]*]

Optional[Union of

  • Path (PathType(path_type='file'); Predicate(is_absolute); )
  • _internal.io.RelativeFilePath
  • _internal.url.HttpUrl

(union_mode='left_to_right'; AfterValidator(_validate_md_suffix); PlainSerializer(func=<function _package at 0x7fd8dda88fe0>, return_type=PydanticUndefined, when_used='unless-none'))]

training_data.badges Sequence[]

badges associated with this resource

Sequence[generic.v0_2.BadgeDescr]

generic.v0_2.BadgeDescr:

training_data.badges.i.label str

badge label to display on hover Example: 'Open in Colab'

training_data.badges.i.icon UnionNone

badge icon Example: 'https://colab.research.google.com/assets/colab-badge.svg'

Union[Union[Path*, _internal.io.RelativeFilePath]*, _internal.url.HttpUrl, Url*, None]

Union of

  • Union[Path (PathType(path_type='file'); ), _internal.io.RelativeFilePath] (AfterValidator(wo_special_file_name); PlainSerializer(func=<function _package at 0x7fd8dda88fe0>, return_type=PydanticUndefined, when_used='unless-none'))
  • _internal.url.HttpUrl
  • Url (max_length=2083 allowed_schemes=['http', 'https'])
  • None

training_data.badges.i.url _internal.url.HttpUrl

target URL Example: 'https://colab.research.google.com/github/HenriquesLab/ZeroCostDL4Mic/blob/master/Colab_notebooks/U-net_2D_ZeroCostDL4Mic.ipynb'

training_data.type Literal[dataset]dataset

training_data.id Optional[dataset.v0_3.DatasetId]None

bioimage.io-wide unique resource identifier assigned by bioimage.io; version unspecific.

training_data.parent Optional[dataset.v0_3.DatasetId]None

The description from which this one is derived

training_data.source Optional[_internal.url.HttpUrl]None

"URL to the source of the dataset.

dataset.v0_2.DatasetDescr:

training_data.name str

A human-friendly name of the resource description

training_data.description str

training_data.covers Sequence[]

Cover images. Please use an image smaller than 500KB and an aspect ratio width to height of 2:1. The supported image formats are: ('.gif', '.jpeg', '.jpg', '.png', '.svg', '.tif', '.tiff') Example: 'cover.png'

Sequence[Union[Path*, _internal.io.RelativeFilePath, _internal.url.HttpUrl]*]

Sequence of Union of

  • Path (PathType(path_type='file'); Predicate(is_absolute); )
  • _internal.io.RelativeFilePath
  • _internal.url.HttpUrl

(union_mode='left_to_right'; WithSuffix(suffix=('.gif', '.jpeg', '.jpg', '.png', '.svg', '.tif', '.tiff'), case_sensitive=False); PlainSerializer(func=<function _package at 0x7fd8dda88fe0>, return_type=PydanticUndefined, when_used='unless-none'))

training_data.id_emoji OptionalNone

UTF-8 emoji for display alongside the id.

Optional[str (Len(min_length=1, max_length=1); )]

training_data.authors Sequence[generic.v0_2.Author][]

The authors are the creators of the RDF and the primary points of contact.

Sequence[generic.v0_2.Author]

generic.v0_2.Author:

training_data.authors.i.affiliation Optional[str]None

Affiliation

training_data.authors.i.email Optional[Email]None

Email

training_data.authors.i.orcid OptionalNone

An ORCID iD in hyphenated groups of 4 digits, (and valid as per ISO 7064 11,2.) Example: '0000-0001-2345-6789'

Optional[_internal.types.OrcidId]

training_data.authors.i.name str

training_data.authors.i.github_user Optional[str]None

training_data.attachments OptionalNone

file and other attachments

Optional[generic.v0_2.AttachmentsDescr]

generic.v0_2.AttachmentsDescr:

training_data.attachments.files Sequence[]

∈📦 File attachments

Sequence[Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path*]*]

Sequence of Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )] (union_mode='left_to_right'; AfterValidator(wo_special_file_name); PlainSerializer(func=<function _package at 0x7fd8dda88fe0>, return_type=PydanticUndefined, when_used='unless-none'))

training_data.cite Sequence[generic.v0_2.CiteEntry][]

citations

Sequence[generic.v0_2.CiteEntry]

generic.v0_2.CiteEntry:

training_data.cite.i.text str

free text description

training_data.cite.i.doi Optional[_internal.types.Doi]None

A digital object identifier (DOI) is the prefered citation reference. See https://www.doi.org/ for details. (alternatively specify url)

training_data.cite.i.url Optional[str]None

URL to cite (preferably specify a doi instead)

training_data.config Dict[str, YamlValue]{}

A field for custom configuration that can contain any keys not present in the RDF spec. This means you should not store, for example, a github repo URL in config since we already have the git_repo field defined in the spec. Keys in config may be very specific to a tool or consumer software. To avoid conflicting definitions, it is recommended to wrap added configuration into a sub-field named with the specific domain or tool name, for example:

config:
    bioimageio:  # here is the domain name
        my_custom_key: 3837283
        another_key:
            nested: value
    imagej:       # config specific to ImageJ
        macro_dir: path/to/macro/file

If possible, please use snake_case for keys in config. You may want to list linked files additionally under attachments to include them when packaging a resource (packaging a resource means downloading/copying important linked files and creating a ZIP archive that contains an altered rdf.yaml file with local references to the downloaded files) Example: {'bioimageio': {'my_custom_key': 3837283, 'another_key': {'nested': 'value'}}, 'imagej': {'macro_dir': 'path/to/macro/file'}}

training_data.download_url Optional[_internal.url.HttpUrl]None

URL to download the resource from (deprecated)

training_data.git_repo Optional[str]None

A URL to the Git repository where the resource is being developed. Example: 'https://github.com/bioimage-io/spec-bioimage-io/tree/main/example_descriptions/models/unet2d_nuclei_broad'

training_data.icon UnionNone

An icon for illustration

Union[str*, Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path*]*, None]

Union of

  • str (Len(min_length=1, max_length=2))
  • Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )] (union_mode='left_to_right'; AfterValidator(wo_special_file_name); PlainSerializer(func=<function _package at 0x7fd8dda88fe0>, return_type=PydanticUndefined, when_used='unless-none'))
  • None

training_data.links Sequence[str][]

IDs of other bioimage.io resources Example: ('ilastik/ilastik', 'deepimagej/deepimagej', 'zero/notebook_u-net_3d_zerocostdl4mic')

training_data.uploader Optional[generic.v0_2.Uploader]None

The person who uploaded the model (e.g. to bioimage.io)

Optional[generic.v0_2.Uploader]

generic.v0_2.Uploader:

training_data.uploader.email Email

Email

training_data.uploader.name OptionalNone

name

Optional[str (AfterValidator(_remove_slashes))]

training_data.maintainers Sequence[]

Maintainers of this resource. If not specified authors are maintainers and at least some of them should specify their github_user name

Sequence[generic.v0_2.Maintainer]

generic.v0_2.Maintainer:

training_data.maintainers.i.affiliation Optional[str]None

Affiliation

training_data.maintainers.i.email Optional[Email]None

Email

training_data.maintainers.i.orcid OptionalNone

An ORCID iD in hyphenated groups of 4 digits, (and valid as per ISO 7064 11,2.) Example: '0000-0001-2345-6789'

Optional[_internal.types.OrcidId]

training_data.maintainers.i.name OptionalNone

Optional[str (AfterValidator(_remove_slashes))]

training_data.maintainers.i.github_user str

training_data.rdf_source OptionalNone

Resource description file (RDF) source; used to keep track of where an rdf.yaml was loaded from. Do not set this field in a YAML file.

Optional[Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path*]*]

Optional[Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )] (union_mode='left_to_right')]

training_data.tags Sequence[str][]

Associated tags Example: ('unet2d', 'pytorch', 'nucleus', 'segmentation', 'dsb2018')

training_data.version OptionalNone

The version of the resource following SemVer 2.0.

Optional[_internal.version_type.Version]

training_data.version_number Optional[int]None

version number (n-th published version, not the semantic version)

training_data.format_version Literal[0.2.4]0.2.4

The format version of this resource specification (not the version of the resource description) When creating a new resource always use the latest micro/patch version described here. The format_version is important for any consumer software to understand how to parse the fields.

training_data.badges Sequence[]

badges associated with this resource

Sequence[generic.v0_2.BadgeDescr]

generic.v0_2.BadgeDescr:

training_data.badges.i.label str

badge label to display on hover Example: 'Open in Colab'

training_data.badges.i.icon UnionNone

badge icon Example: 'https://colab.research.google.com/assets/colab-badge.svg'

Union[Union[Path*, _internal.io.RelativeFilePath]*, _internal.url.HttpUrl, Url*, None]

Union of

  • Union[Path (PathType(path_type='file'); ), _internal.io.RelativeFilePath] (AfterValidator(wo_special_file_name); PlainSerializer(func=<function _package at 0x7fd8dda88fe0>, return_type=PydanticUndefined, when_used='unless-none'))
  • _internal.url.HttpUrl
  • Url (max_length=2083 allowed_schemes=['http', 'https'])
  • None

training_data.badges.i.url _internal.url.HttpUrl

target URL Example: 'https://colab.research.google.com/github/HenriquesLab/ZeroCostDL4Mic/blob/master/Colab_notebooks/U-net_2D_ZeroCostDL4Mic.ipynb'

training_data.documentation OptionalNone

∈📦 URL or relative path to a markdown file with additional documentation. The recommended documentation file name is README.md. An .md suffix is mandatory. Examples: ['https://raw.githubusercontent.com/bioimage-io/spec-bioimage-io/main/example_descriptions/models/unet2d_nuclei_broad/README.md', '…']

Optional[Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path*]*]

Optional[Union[_internal.url.HttpUrl, _internal.io.RelativeFilePath, Path (PathType(path_type='file'); )] (union_mode='left_to_right'; AfterValidator(wo_special_file_name); PlainSerializer(func=<function _package at 0x7fd8dda88fe0>, return_type=PydanticUndefined, when_used='unless-none'))]

training_data.license UnionNone

A SPDX license identifier. We do not support custom license beyond the SPDX license list, if you need that please open a GitHub issue to discuss your intentions with the community. Examples: ['CC0-1.0', 'MIT', 'BSD-2-Clause']

Union[_internal.license_id.LicenseId, _internal.license_id.DeprecatedLicenseId, str, None]

training_data.type Literal[dataset]dataset

training_data.id Optional[dataset.v0_2.DatasetId]None

bioimage.io-wide unique resource identifier assigned by bioimage.io; version unspecific.

training_data.source Optional[_internal.url.HttpUrl]None

"URL to the source of the dataset.

uploader Optional[generic.v0_2.Uploader]None

The person who uploaded the model (e.g. to bioimage.io)

Optional[generic.v0_2.Uploader]

generic.v0_2.Uploader:

uploader.email Email

Email

uploader.name OptionalNone

name

Optional[str (AfterValidator(_remove_slashes))]

version OptionalNone

The version of the resource following SemVer 2.0.

Optional[_internal.version_type.Version]

Example values

authors.i.orcid

0000-0001-2345-6789

documentation

inputs.axes.size

  • 10
  • {'min': 32, 'step': 16}
  • {'tensor_id': 't', 'axis_id': 'a', 'offset': 5}

inputs.axes.size

  • 10
  • {'min': 32, 'step': 16}
  • {'tensor_id': 't', 'axis_id': 'a', 'offset': 5}

inputs.axes.size

  • 10
  • {'min': 32, 'step': 16}
  • {'tensor_id': 't', 'axis_id': 'a', 'offset': 5}

inputs.axes.id

  • x
  • y
  • z

inputs.data.type

  • float32
  • uint8
  • uint16
  • int64
  • bool

inputs.data.type

  • float32
  • float64
  • uint8
  • uint16

inputs.data.type

  • float32
  • uint8
  • uint16
  • int64
  • bool

inputs.data.type

  • float32
  • float64
  • uint8
  • uint16

inputs.preprocessing.i.kwargs.axis

channel

inputs.preprocessing.i.kwargs.axis

channel

inputs.preprocessing.i.kwargs.axis

  • channel
  • index

inputs.preprocessing.i.kwargs.axes

('batch', 'x', 'y')

inputs.preprocessing.i.kwargs.axes

('batch', 'x', 'y')

license

  • CC0-1.0
  • MIT
  • BSD-2-Clause

outputs.axes.size

  • 10
  • {'tensor_id': 't', 'axis_id': 'a', 'offset': 5}

outputs.axes.size

  • 10
  • {'tensor_id': 't', 'axis_id': 'a', 'offset': 5}

outputs.axes.size

  • 10
  • {'tensor_id': 't', 'axis_id': 'a', 'offset': 5}

outputs.axes.size

  • 10
  • {'tensor_id': 't', 'axis_id': 'a', 'offset': 5}

outputs.axes.id

  • x
  • y
  • z

outputs.axes.size

  • 10
  • {'tensor_id': 't', 'axis_id': 'a', 'offset': 5}

outputs.axes.id

  • x
  • y
  • z

outputs.data.type

  • float32
  • uint8
  • uint16
  • int64
  • bool

outputs.data.type

  • float32
  • float64
  • uint8
  • uint16

outputs.data.type

  • float32
  • uint8
  • uint16
  • int64
  • bool

outputs.data.type

  • float32
  • float64
  • uint8
  • uint16

outputs.postprocessing.i.kwargs.axis

channel

outputs.postprocessing.i.kwargs.axis

channel

outputs.postprocessing.i.kwargs.axis

  • channel
  • index

outputs.postprocessing.i.kwargs.axes

('batch', 'x', 'y')

outputs.postprocessing.i.kwargs.axes

('batch', 'x', 'y')

outputs.postprocessing.i.kwargs.axes

('batch', 'x', 'y')

weights.keras_hdf5.authors.i.orcid

0000-0001-2345-6789

weights.keras_hdf5.parent

pytorch_state_dict

weights.onnx.authors.i.orcid

0000-0001-2345-6789

weights.onnx.parent

pytorch_state_dict

weights.pytorch_state_dict.authors.i.orcid

0000-0001-2345-6789

weights.pytorch_state_dict.parent

pytorch_state_dict

weights.pytorch_state_dict.architecture.callable

  • MyNetworkClass
  • get_my_model

weights.pytorch_state_dict.architecture.callable

  • MyNetworkClass
  • get_my_model

weights.pytorch_state_dict.dependencies.source

environment.yaml

weights.tensorflow_js.authors.i.orcid

0000-0001-2345-6789

weights.tensorflow_js.parent

pytorch_state_dict

weights.tensorflow_saved_model_bundle.authors.i.orcid

0000-0001-2345-6789

weights.tensorflow_saved_model_bundle.parent

pytorch_state_dict

weights.tensorflow_saved_model_bundle.dependencies.source

environment.yaml

weights.torchscript.authors.i.orcid

0000-0001-2345-6789

weights.torchscript.parent

pytorch_state_dict

config

{'bioimageio': {'my_custom_key': 3837283, 'another_key': {'nested': 'value'}}, 'imagej': {'macro_dir': 'path/to/macro/file'}}

git_repo

https://github.com/bioimage-io/spec-bioimage-io/tree/main/example_descriptions/models/unet2d_nuclei_broad

links

('ilastik/ilastik', 'deepimagej/deepimagej', 'zero/notebook_u-net_3d_zerocostdl4mic')

maintainers.i.orcid

0000-0001-2345-6789

packaged_by.i.orcid

0000-0001-2345-6789

tags

('unet2d', 'pytorch', 'nucleus', 'segmentation', 'dsb2018')

training_data.authors.i.orcid

0000-0001-2345-6789

training_data.license

  • CC0-1.0
  • MIT
  • BSD-2-Clause

training_data.config

{'bioimageio': {'my_custom_key': 3837283, 'another_key': {'nested': 'value'}}, 'imagej': {'macro_dir': 'path/to/macro/file'}}

training_data.git_repo

https://github.com/bioimage-io/spec-bioimage-io/tree/main/example_descriptions/models/unet2d_nuclei_broad

training_data.links

('ilastik/ilastik', 'deepimagej/deepimagej', 'zero/notebook_u-net_3d_zerocostdl4mic')

training_data.maintainers.i.orcid

0000-0001-2345-6789

training_data.tags

('unet2d', 'pytorch', 'nucleus', 'segmentation', 'dsb2018')

training_data.documentation

training_data.badges.i.label

Open in Colab

training_data.badges.i.icon

https://colab.research.google.com/assets/colab-badge.svg

training_data.badges.i.url

https://colab.research.google.com/github/HenriquesLab/ZeroCostDL4Mic/blob/master/Colab_notebooks/U-net_2D_ZeroCostDL4Mic.ipynb

training_data.covers

cover.png

training_data.authors.i.orcid

0000-0001-2345-6789

training_data.config

{'bioimageio': {'my_custom_key': 3837283, 'another_key': {'nested': 'value'}}, 'imagej': {'macro_dir': 'path/to/macro/file'}}

training_data.git_repo

https://github.com/bioimage-io/spec-bioimage-io/tree/main/example_descriptions/models/unet2d_nuclei_broad

training_data.links

('ilastik/ilastik', 'deepimagej/deepimagej', 'zero/notebook_u-net_3d_zerocostdl4mic')

training_data.maintainers.i.orcid

0000-0001-2345-6789

training_data.tags

('unet2d', 'pytorch', 'nucleus', 'segmentation', 'dsb2018')

training_data.badges.i.label

Open in Colab

training_data.badges.i.icon

https://colab.research.google.com/assets/colab-badge.svg

training_data.badges.i.url

https://colab.research.google.com/github/HenriquesLab/ZeroCostDL4Mic/blob/master/Colab_notebooks/U-net_2D_ZeroCostDL4Mic.ipynb

training_data.documentation

training_data.license

  • CC0-1.0
  • MIT
  • BSD-2-Clause