mml.core.data_loading.task_attributes
- class DataSplit[source]
Bases:
StrEnumRepresents parts of a dataset that are loaded together. May be selected joint by a fold number to determine the exact samples that are available for iteration over a
TaskDataset.- FULL_TRAIN = 'FULL_TRAIN'
- TEST = 'TEST'
- TRAIN = 'TRAIN'
- UNLABELLED = 'UNLABELLED'
- VAL = 'VAL'
- __new__(value)
- class Keyword[source]
Bases:
StrEnumKeyword labels of a task. Refers e.g. to the shown entities within the images.
- ANATOMICAL_STRUCTURES = 'anatomical structures'
- ANIMALS = 'animals'
- ARTIFICIAL = 'artificial'
- BONE = 'bone'
- BRAIN = 'brain'
- BREAST = 'breast'
- BUILDINGS = 'buildings'
- CAPSULE_ENDOSCOPY = 'capsule endoscopy'
- CATARACT_SURGERY = 'cataract_surgery'
- CHARS_DIGITS = 'chars_or_digits'
- CHEST = 'chest'
- CLE = 'confocal laser endomicroscopy'
- COLPOSCOPY = 'colposcopy'
- CT_SCAN = 'ct_scan'
- DERMATOSCOPY = 'dermatoscopy'
- DRIVING = 'driving'
- ENDOSCOPIC_INSTRUMENTS = 'endoscopic instruments'
- ENDOSCOPY = 'endoscopy'
- EYE = 'eye'
- FACES = 'faces'
- FUNDUS_PHOTOGRAPHY = 'fundus_photography'
- GASTROSCOPY_COLONOSCOPY = 'gastroscopy_colonoscopy'
- GYNECOLOGY = 'Gynecology'
- HANDWRITINGS = 'handwritings'
- IMAGE_ARTEFACTS = 'image_artefacts'
- INSTRUMENT_COUNT = 'counting endoscopic instruments'
- LAPAROSCOPY = 'laparoscopy'
- LARYNGOSCOPY = 'laryngoscopy'
- MEDICAL = 'medical'
- MRI_SCAN = 'mri_scan'
- NATURAL_OBJECTS = 'natural_objects'
- NEPHRECTOMY = 'Nephrectomy'
- SCENES = 'scenes'
- TISSUE_PATHOLOGY = 'tissue_pathology'
- ULTRASOUND = 'ultrasound'
- X_RAY = 'x_ray'
- __new__(value)
- class License[source]
Bases:
StrEnumLicense for distribution of a task (data).
- CC_0_1_0 = 'CC0 1.0 Universal (CC0 1.0) Public Domain Dedication'
- CC_BY_4_0 = 'Creative Commons Attribution 4.0 International'
- CC_BY_NC_4_0 = 'Creative Commons Attribution-NonCommercial 4.0 International'
- CC_BY_NC_SA_4_0 = 'Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International'
- CUSTOM = 'License defined in TaskCreator description'
- DATABASE_CONTENTS_LICENSE_1_0 = 'Open Data Commons DbCL v1.0'
- MIT = 'Massachusetts Institute of Technology'
- UNKNOWN = 'unknown'
- __new__(value)
- class Modality[source]
Bases:
StrEnumThe modalities represent the possible keys of a loaded sample from a dataset. E.g. {‘image’: ‘some/path/file.png’, ‘class’: 3}. Note that while TaskDescription stores the Modality as enum in its samples, the loaded batch will contain the str representations!
- BBOX = 'bbox'
- CLASS = 'class'
- CLASSES = 'classes'
- IMAGE = 'image'
- KEYPOINTS = 'keypoints'
- MASK = 'mask'
- SAMPLE_ID = 'sample_id'
- SOFT_CLASSES = 'soft_classes'
- TASK = 'task'
- THREE_D_IMAGE = 'three_d_image'
- VALUE = 'value'
- VIDEO_CLIP = 'video_clip'
- __new__(value)
- class RGBInfo[source]
Bases:
objectSmall dataclass storing information about image channels (mostly mean and std).
- class Sizes[source]
Bases:
objectSmall dataclass storing information about the dimensionality of a set of images.
- class TaskType[source]
Bases:
StrEnumDefines the type of task. Different task types usually require completely different architectures and/or training procedures. This is aligned with the torchvision.models split at https://pytorch.org/docs/stable/torchvision/models.html
- CLASSIFICATION = 'classification'
- DEFAULT = 'unknown'
- DETECTION = 'detection'
- MULTILABEL_CLASSIFICATION = 'multilabel_classification'
- NO_TASK = 'no_task'
- REGRESSION = 'regression'
- SEMANTIC_SEGMENTATION = 'semantic_segmentation'
- UNKNOWN = 'unknown'
- VIDEO_CLASS = 'video_classification'
- __new__(value)