mednet.data.typing¶
Defines most common types used in code.
Module Attributes
Definition of a sample. |
|
A callable that transforms tensors into (other) tensors. |
|
A sequence of transforms. |
|
The definition of a database split. |
|
The definition of a complex database split composed of several other splits. |
|
Our own augmentation definition of a pytorch DataLoader. |
Classes
|
Our own definition of a pytorch Dataset. |
A loader object can load samples from storage. |
- mednet.data.typing.Sample¶
Definition of a sample.
A dictionary containing an arbitrary number of keys and values. Some of the keys are reserved, others ignored within the framework, and can be re-used to hold sample metadata required for further analysis.
Reserved keys:
input
: This is typically a 1, 2 or 3D torch float tensor containing the input data to be analysed.target
: This is typically a torch float tensor containing the target the network must try to achieve. In the case of classification, it can be a 1D tensor containing a single entry (binary classification) or multiple entries (multi-class classification). In the case of semantic segmentation, this entry typically contains a float representation of the target mask the network must decode from theinput
data.mask
: A torch float tensor containing a mask over which the input (and the output) may be ignored. Typically used in semantic segmentation tasks.name
: A name for the sample. Typically set to the name of the file or file-stem holding theinput
data.
- class mednet.data.typing.RawDataLoader[source]¶
Bases:
ABC
A loader object can load samples from storage.
- mednet.data.typing.Transform¶
A callable that transforms tensors into (other) tensors.
Typically used in data-processing pipelines inside pytorch.
- mednet.data.typing.TransformSequence¶
A sequence of transforms.
- mednet.data.typing.DatabaseSplit¶
The definition of a database split.
A database split maps dataset (subset) names to sequences of objects that, through a
RawDataLoader
, eventually becomes aSample
in the processing pipeline.
- mednet.data.typing.ConcatDatabaseSplit¶
The definition of a complex database split composed of several other splits.
A database split maps dataset (subset) names to sequences of objects that, through a
RawDataLoader
, eventually becomes aSample
in the processing pipeline. Objects of this subtype allow the construction of complex splits composed of cannibalized parts of other splits. Each split may be assigned a differentRawDataLoader
.alias of
Mapping
[str
,Sequence
[tuple
[Sequence
[Any
],RawDataLoader
]]]