COCOData#
- class COCOData[source]#
Class for loading the COCO dataset, inherits from
DetectionData
.Implement the necessary methods to load the dataset.
- __init__(data_loader: DataLoader, num_classes: Optional[int] = None, label_map: Optional[Dict[int, str]] = None, transform_field: Optional[str] = 'transforms')[source]#
- __new__(*args, **kwargs)#
Attributes
Return dict of classes as keys, and list of corresponding indices (in Dataset) of samples that include this class (in the label). |
|
Return how many dimensions the image data have. |
|
Return the data loader. |
|
Return True if the data loader has images. |
|
Return True if the data loader has labels. |
|
Return a dictionary containing the number of samples per class. |
|
Return the number of classes in the dataset. |
|
Return the number of samples in the dataset. |
|
Return the number of samples in the original dataset. |
|
Return the task type (object_detection). |
|
Return the data loader. |
Methods
Assert the image formatter defined is valid. |
|
Assert the label formatter defined is valid. |
|
|
Return batch samples of the given batch indices. |
|
Convert the batch to a list of images. |
|
Convert the batch to a list of labels. |
|
Create new copy of this object, with the data-loader and dataset also copied, and altered by the given parameters. |
|
Create VisionData instance from a Dataset instance. |
Return a copy of the vision data object with the augmentation in the start of it. |
|
|
Get a labels batch and return classes inside it. |
Return transforms handler created from the transform field. |
|
|
Infer on a batch of images. |
Initialize the cache of the classes' metadata info. |
|
Return whether the vision data is running on sample of the data. |
|
|
Return the name of the class with the given id. |
|
Use the defined collate_fn to transform a few data items to batch format. |
|
Return for the given batch_index the sample index in the dataset object. |
|
Get labels and update the classes' metadata info. |
|
Validate the correctness of the data class implementation according to the expected format. |
Validate that the get_classes function returns data in the correct format. |
|
|
Validate that the data is in the required format. |
Validate the infered predictions from the batch. |
|
|
Validate the label. |
|
Validate the prediction. |
Verify presence of shared labels. |