API Reference: Spec¶
masterful.enums.Task¶
- class masterful.enums.Task(value)¶
Bases:
enum.Enum
An enum to semantically specify a model’s use case.
- Parameters
value – Overriden from
enum.Enum
. Returns the member of this enum from the corresponding value.
- CLASSIFICATION¶
Normal classification task like Alexnet on Imagenet.
- BINARY_CLASSIFICATION¶
Binary classification task.
- MULTILABEL_CLASSIFICATION¶
Multi-label classification task.
- DETECTION¶
Object detection (localization + classification) task.
- LOCALIZATION¶
Object localization task.
- SEMANTIC_SEGMENTATION¶
Semantic segmentation task.
- INSTANCE_SEGMENTATION¶
Instance segmentation task.
- KEYPOINT_DETECTION¶
Keypoint detection task.
masterful.enums.ImageRange¶
- class masterful.enums.ImageRange(value)¶
Bases:
enum.Enum
An enum to model the image input ranges Masterful supports.
ImageRange describes the range of the image pixel values. Common ranges include [0,255] and [0,1]. Some models also prefer to normalize the input data around the ImageNet mean and standard deviation.
- Parameters
value – Overriden from
enum.Enum
. Returns the member of this enum from the corresponding value.
- ZERO_ONE¶
Image range is [0,1].
- NEG_ONE_POS_ONE¶
Image range is [-1, 1].
- ZERO_255¶
Image range is [0,255].
- IMAGENET_CAFFE_BGR¶
Image is in BGR channel format, and each channel has been zero-centered around the Imagenet mean, without scaling.
- IMAGENET_TORCH¶
Image pixels were scaled to [0,1], then each channel was zero-centered around the Imagenet mean.
- CIFAR10_TORCH¶
Image pixels were scaled to [0,1], then each channel was zero-centered around the CIFAR10 mean.
- CIFAR100_TORCH¶
Image pixels were scaled to [0,1], then each channel was zero-centered around the CIFAR100 mean.
masterful.enums.TensorStructure¶
- class masterful.enums.TensorStructure(value)¶
Bases:
enum.Enum
An enum to specify tensor structures.
A tensor structure is the physical data structure used to encapsulate individual tensors. This can either be a single tensor itself, in which case the single tensor is passed to each output of the model, or a tuple of tensors, in which case the number of tensors in the tuple must match exactly the number of outputs in the model.
- SINGLE_TENSOR¶
Label or prediction consists of a single tensor, which is passed to all outputs of the model.
- TUPLE¶
Label or prediction consists of a tuple of tensors, which must map exactly to the number of outputs of a model.
- DICT¶
Label or prediction is a dictionary output tensors.
masterful.enums.BoundingBoxFormat¶
- class masterful.enums.BoundingBoxFormat(value)¶
Bases:
enum.Enum
Bounding box formats support by Masterful.
- TENSORFLOW¶
The Tensorflow bounding box format is (ymin, xmin, ymax, xmax), normalized by the image dimensions into the range [0,1].
- VOC¶
The Pascal VOC bounding box format is (xmin, ymin, xmax, ymax) in pixel coordinates.
- COCO¶
The MSCOCO bounding box format is (xmin, ymin, width, height) in pixel coordinates.
- ALBUMENTATIONS¶
The Albumentations bounding box format is (xmin, ymin, xmax, ymax), normalized by the image dimension into the range [0,1]
- YOLO¶
The Yolo bounding box format is (x_center, y_center, width, height), normalized by the image dimensions into the range [0,1]