class documentation

class CVATTaskLabels(object): (source)

Constructor: CVATTaskLabels(labels)

View In Hierarchy

Description of the labels in a CVAT image annotation task.

Parameters
labels

a list of label dicts in the following format:

[
    {
        "name": "car",
        "attributes": [
            {
                "name": "type"
                "categories": ["coupe", "sedan", "truck"]
            },
            ...
        }
    },
    ...
]
Class Method from_cvat_images Creates a CVATTaskLabels instance that describes the active schema of the given annotations.
Class Method from_cvat_tracks Creates a CVATTaskLabels instance that describes the active schema of the given annotations.
Class Method from_labels_dict Creates a CVATTaskLabels instance from the <labels> tag of a CVAT annotation XML file.
Class Method from_schema Creates a CVATTaskLabels instance from an eta.core.image.ImageLabelsSchema.
Method __init__ Undocumented
Method merge_task_labels Merges the given CVATTaskLabels into this instance.
Method to_schema Returns an eta.core.image.ImageLabelsSchema representation of the task labels.
Instance Variable labels Undocumented
@classmethod
def from_cvat_images(cls, cvat_images): (source)

Creates a CVATTaskLabels instance that describes the active schema of the given annotations.

Parameters
cvat_imagesa list of CVATImage instances
Returns
a CVATTaskLabels
@classmethod
def from_cvat_tracks(cls, cvat_tracks): (source)

Creates a CVATTaskLabels instance that describes the active schema of the given annotations.

Parameters
cvat_tracksa list of CVATTrack instances
Returns
a CVATTaskLabels
@classmethod
def from_labels_dict(cls, d): (source)

Creates a CVATTaskLabels instance from the <labels> tag of a CVAT annotation XML file.

Parameters
da dict representation of a <labels> tag
Returns
a CVATTaskLabels
@classmethod
def from_schema(cls, schema): (source)

Creates a CVATTaskLabels instance from an eta.core.image.ImageLabelsSchema.

Parameters
schemaan eta.core.image.ImageLabelsSchema
Returns
a CVATTaskLabels
def __init__(self, labels=None): (source)

Undocumented

def merge_task_labels(self, task_labels): (source)

Merges the given CVATTaskLabels into this instance.

Parameters
task_labelsa CVATTaskLabels
def to_schema(self): (source)

Returns an eta.core.image.ImageLabelsSchema representation of the task labels.

Note that CVAT's task labels schema does not distinguish between boxes, polylines, and keypoints, so the returned schema stores all annotations under the "objects" field.

Returns
an eta.core.image.ImageLabelsSchema

Undocumented