class CVATBackend(foua.AnnotationBackend): (source)
Constructor: CVATBackend(*args, **kwargs)
Class for interacting with the CVAT annotation backend.
Method | download |
Downloads the annotations from the annotation backend for the given results. |
Method | recommend |
Recommends an attribute tool for an attribute with the given name and value. |
Method | requires |
Determines whether the list of possible values are required for attributes of the given type. |
Method | upload |
Uploads the samples and relevant existing labels from the label schema to the annotation backend. |
Property | requires |
Whether this backend requires a pre-defined label schema for its annotation runs. |
Property | supported |
The list of attribute types supported by the backend. |
Property | supported |
The list of label types supported by the backend. |
Property | supported |
The list of media types that this backend supports. |
Property | supported |
The list of scalar field types supported by the backend. |
Property | supports |
Whether this backend supports annotating clips views. |
Property | supports |
Whether this backend supports uploading only keyframes when editing existing video track annotations. |
Property | supports |
Whether this backend supports annotating video labels at a sample-level. |
Method | _connect |
Returns a new API instance connected to the annotation backend. |
Inherited from AnnotationBackend
:
Method | __enter__ |
Undocumented |
Method | __exit__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | connect |
Returns an API instance connected to the annotation backend. |
Method | get |
Gets the fields that were involved in the given run. |
Method | use |
Registers an API instance to use for subsequent operations. |
Instance Variable | _api |
Undocumented |
Inherited from AnnotationMethod
(via AnnotationBackend
):
Class Method | run |
The BaseRunInfo class associated with this class. |
Class Method | _patch |
A function that can patch any ReferenceField issues with a dataset's runs. |
Class Method | _results |
The fiftyone.core.dataset.Dataset field that stores the results cache for these runs. |
Class Method | _run |
A string to use when referring to these runs in log messages. |
Class Method | _runs |
The fiftyone.core.odm.dataset.DatasetDocument field in which these runs are stored. |
Inherited from BaseRun
(via AnnotationBackend
, AnnotationMethod
):
Class Method | delete |
Deletes the results associated with the given run key from the collection. |
Class Method | delete |
Deletes all runs from the collection. |
Class Method | get |
Gets the BaseRunInfo for the given key on the collection. |
Class Method | has |
Determines whether BaseRunResults for the given key are cached on the collection. |
Class Method | list |
Returns the list of run keys on the given collection. |
Class Method | load |
Loads the BaseRunResults for the given key on the collection. |
Class Method | load |
Loads the fiftyone.core.view.DatasetView on which the specified run was performed. |
Class Method | save |
Saves the run information on the collection. |
Class Method | save |
Saves the run results on the collection. |
Class Method | update |
Updates the BaseRunConfig for the given run on the collection. |
Class Method | update |
Replaces the key for the given run with a new key. |
Method | cleanup |
Cleans up the results of the run with the given key from the collection. |
Method | ensure |
Ensures that any necessary packages to execute this run are installed. |
Method | ensure |
Ensures that any necessary packages to use existing results for this run are installed. |
Method | register |
Registers a run of this method under the given key on the given collection. |
Method | rename |
Performs any necessary operations required to rename this run's key. |
Method | validate |
Validates that the collection can accept this run. |
Class Method | _get |
Undocumented |
Class Method | _get |
Undocumented |
Class Method | _get |
Undocumented |
Method | _validate |
Undocumented |
Method | _validate |
Subclass-specific validation when a run with the given key already exists. |
Inherited from Configurable
(via AnnotationBackend
, AnnotationMethod
, BaseRun
):
Instance Variable | config |
Undocumented |
Downloads the annotations from the annotation backend for the given results.
The returned labels should be represented as either scalar values or
fiftyone.core.labels.Label
instances.
For image datasets, the return dictionary should have the following nested structure:
# Scalar fields results[label_type][sample_id] = scalar # Label fields results[label_type][sample_id][label_id] = label
For video datasets, the returned labels dictionary should have the following nested structure:
# Scalar fields results[label_type][sample_id][frame_id] = scalar # Label fields results[label_type][sample_id][frame_id][label_id] = label
The valid values for label_type are:
- "classifications": single or multilabel classifications
- "detections": detections or instance segmentations
- "polylines": polygons or polylines
- "segmentation": semantic segmentations
- "scalar": scalar values
Parameters | |
results | an AnnotationResults |
Returns | |
the labels results dict |
Recommends an attribute tool for an attribute with the given name and value.
For example, a backend may recommend a tool as follows for a boolean value:
{ "type": "radio", "values": [False, True], }
or a tool as follows for a generic value:
{"type": "text"}
Parameters | |
name | the name of the attribute |
value | the attribute value, which may be None |
Returns | |
an attribute type dict |
Determines whether the list of possible values are required for attributes of the given type.
Parameters | |
attr | the attribute type string |
Returns | |
True/False |
Uploads the samples and relevant existing labels from the label schema to the annotation backend.
Parameters | |
samples | a fiftyone.core.collections.SampleCollection |
anno | the annotation key |
launchFalse | whether to launch the annotation backend's editor after uploading the samples |
Returns | |
an AnnotationResults |
The list of attribute types supported by the backend.
This list defines the valid string values for the type field of an attributes dict of the label schema provided to the backend.
For example, CVAT supports ["text", "select", "radio", "checkbox"].
The list of label types supported by the backend.
Backends may support any subset of the following label types:
- "classification"
- "classifications"
- "detection"
- "detections"
- "instance"
- "instances"
- "polyline"
- "polylines"
- "polygon"
- "polygons"
- "keypoint"
- "keypoints"
- "segmentation"
- "scalar"
The list of scalar field types supported by the backend.
For example, CVAT supports the following types:
Whether this backend supports uploading only keyframes when editing existing video track annotations.
Returns a new API instance connected to the annotation backend.
Returns | |
an AnnotationAPI , or None if the backend does not
expose an API |