class CVATAnnotationAPI(foua.AnnotationAPI): (source)
Constructor: CVATAnnotationAPI(name, url, username, email, ...)
A class to facilitate connection to and management of tasks in CVAT.
On initialization, this class constructs a session based on the provided server url and credentials.
This API provides methods to easily get, put, post, patch, and delete tasks and jobs through the formatted urls specified by the CVAT REST API.
Additionally, samples and label schemas can be uploaded and annotations downloaded through this class.
Parameters | |
name | the name of the backend |
url | url of the CVAT server |
username | the CVAT username |
the CVAT email | |
password | the CVAT password |
headers | an optional dict of headers to add to all requests |
organization | the name of the organization to use when sending requests to CVAT |
Method | __init__ |
Undocumented |
Method | base |
Undocumented |
Method | base |
Undocumented |
Method | close |
Closes the API session. |
Method | create |
Creates a project on the CVAT server using the given label schema. |
Method | create |
Creates a task on the CVAT server using the given label schema. |
Method | delete |
Sends a DELETE request to the given CVAT API URL. |
Method | delete |
Deletes the given project from the CVAT server. |
Method | delete |
Deletes the given projects from the CVAT server. |
Method | delete |
Deletes the given task from the CVAT server. |
Method | delete |
Deletes the given tasks from the CVAT server. |
Method | download |
Download the annotations from the CVAT server for the given results instance and parses them into the appropriate FiftyOne types. |
Method | get |
Sends a GET request to the given CVAT API URL. |
Method | get |
Check all given project ids to determine if they are empty or if they contain at least one task. |
Method | get |
Retrieves the CVAT project ID for the first instance of the given project name. |
Method | get |
Retrieves the CVAT project name for the given project ID. |
Method | get |
Returns the IDs of the tasks in the given project. |
Method | get |
Retrieves the CVAT user ID for the given username. |
Method | job |
Undocumented |
Method | job |
Undocumented |
Method | jobs |
Undocumented |
Method | labels |
Undocumented |
Method | launch |
Launches the CVAT editor in your default web browser. |
Method | list |
Returns the list of project IDs. |
Method | list |
Returns the list of task IDs. |
Method | patch |
Sends a PATCH request to the given CVAT API URL. |
Method | post |
Sends a POST request to the given CVAT API URL. |
Method | project |
Checks if the given project exists. |
Method | project |
Undocumented |
Method | project |
Undocumented |
Method | project |
Undocumented |
Method | projects |
Undocumented |
Method | put |
Sends a PUT request to the given CVAT API URL. |
Method | task |
Undocumented |
Method | task |
Undocumented |
Method | task |
Undocumented |
Method | task |
Undocumented |
Method | task |
Undocumented |
Method | task |
Checks if the given task exists. |
Method | task |
Undocumented |
Method | task |
Undocumented |
Method | task |
Undocumented |
Method | taskless |
Undocumented |
Method | tasks |
Undocumented |
Method | upload |
Uploads a list of media to the task with the given ID. |
Method | upload |
Uploads the given samples to CVAT according to the given backend's annotation and server configuration. |
Method | user |
Undocumented |
Property | about |
Undocumented |
Property | assignee |
Undocumented |
Property | base |
Undocumented |
Property | base |
Undocumented |
Property | login |
Undocumented |
Property | projects |
Undocumented |
Property | server |
Undocumented |
Property | tasks |
Undocumented |
Property | users |
Undocumented |
Method | _add |
Undocumented |
Method | _add |
Undocumented |
Method | _add |
Undocumented |
Method | _add |
Undocumented |
Method | _add |
Undocumented |
Method | _build |
Undocumented |
Method | _build |
Undocumented |
Method | _compute |
Undocumented |
Method | _convert |
Undocumented |
Method | _convert |
Undocumented |
Method | _convert |
Undocumented |
Method | _create |
Undocumented |
Method | _create |
Undocumented |
Method | _create |
Undocumented |
Method | _create |
Undocumented |
Method | _create |
Undocumented |
Method | _create |
Undocumented |
Method | _create |
Undocumented |
Method | _create |
Undocumented |
Method | _create |
Undocumented |
Method | _ensure |
Undocumented |
Method | _filter |
Undocumented |
Method | _finalize |
Undocumented |
Method | _finalize |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
When uploading multiple fields to an existing project, each field must have a different type but can have overlapping class names. Therefore, when loading annotations, if a field exists for a found label type, that label will not be loaded with any other fields. |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _has |
Undocumented |
Method | _is |
Undocumented |
Method | _login |
Undocumented |
Method | _make |
Undocumented |
Method | _merge |
Undocumented |
Method | _merge |
Undocumented |
Method | _parse |
Undocumented |
Method | _parse |
Undocumented |
Method | _parse |
Undocumented |
Method | _parse |
Undocumented |
Method | _parse |
Undocumented |
Method | _parse |
Undocumented |
Method | _parse |
Undocumented |
Method | _remap |
Undocumented |
Method | _remap |
Undocumented |
Method | _setup |
Undocumented |
Method | _to |
Undocumented |
Method | _update |
Undocumented |
Method | _upload |
Undocumented |
Method | _validate |
Undocumented |
Method | _verify |
Undocumented |
Instance Variable | _email |
Undocumented |
Instance Variable | _headers |
Undocumented |
Instance Variable | _name |
Undocumented |
Instance Variable | _organization |
Undocumented |
Instance Variable | _password |
Undocumented |
Instance Variable | _project |
Undocumented |
Instance Variable | _server |
Undocumented |
Instance Variable | _session |
Undocumented |
Instance Variable | _url |
Undocumented |
Instance Variable | _user |
Undocumented |
Instance Variable | _username |
Undocumented |
Inherited from AnnotationAPI
:
Method | __enter__ |
Undocumented |
Method | __exit__ |
Undocumented |
Method | _prompt |
Undocumented |
Method | _prompt |
Undocumented |
Undocumented
Creates a project on the CVAT server using the given label schema.
Parameters | |
name | a name for the project |
schema:None | the label schema to use for the created project |
Returns | |
the ID of the created project in CVAT |
Creates a task on the CVAT server using the given label schema.
Parameters | |
name | a name for the task |
schema:None | the label schema to use for the created task |
segmentNone | maximum number of images to load into a job. Not applicable to videos |
image | an int in [0, 100] determining the image quality to upload to CVAT |
taskNone | the username to assign the created task(s) |
projectNone | the ID of a project to which upload the task |
issueNone | the URL of an issue tracker to link the task |
Returns | |
a tuple of |
|
Sends a DELETE request to the given CVAT API URL.
Parameters | |
url | the url to send the request to |
**kwargs | additional request parameters |
Returns | |
the request response |
Deletes the given projects from the CVAT server.
Parameters | |
project | an iterable of project IDs |
progress:None | whether to render a progress bar (True/False), use the default value fiftyone.config.show_progress_bars (None), or a progress callback function to invoke instead |
Deletes the given tasks from the CVAT server.
Parameters | |
task | an iterable of task IDs |
progress:None | whether to render a progress bar (True/False), use the default value fiftyone.config.show_progress_bars (None), or a progress callback function to invoke instead |
Download the annotations from the CVAT server for the given results instance and parses them into the appropriate FiftyOne types.
Parameters | |
results | a CVATAnnotationResults |
Returns | |
the annotations dict |
Sends a GET request to the given CVAT API URL.
Parameters | |
url | the url |
**kwargs | additional request parameters |
Returns | |
the request response |
Check all given project ids to determine if they are empty or if they contain at least one task.
Parameters | |
project | a list of project ids to check |
Returns | |
a list of empty project ids |
Retrieves the CVAT project ID for the first instance of the given project name.
Parameters | |
project | the name of the project |
Returns | |
the project ID, or None if no project with the given name was found |
Retrieves the CVAT project name for the given project ID.
Parameters | |
project | the ID of the project |
Returns | |
the project name, or None if no project with the given ID was found |
Returns the IDs of the tasks in the given project.
Parameters | |
project | a project ID |
Returns | |
the list of task IDs |
Retrieves the CVAT user ID for the given username.
Parameters | |
username | the username |
Returns | |
the user ID, or None if the user was not found |
Launches the CVAT editor in your default web browser.
Parameters | |
url:None | an optional URL to open. By default, the base URL of the server is opened |
Sends a PATCH request to the given CVAT API URL.
Parameters | |
url | the url |
**kwargs | additional request parameters |
Returns | |
the request response |
Sends a POST request to the given CVAT API URL.
Parameters | |
url | the url |
**kwargs | additional request parameters |
Returns | |
the request response |
Sends a PUT request to the given CVAT API URL.
Parameters | |
url | the url |
**kwargs | additional request parameters |
Returns | |
the request response |
Undocumented
Uploads a list of media to the task with the given ID.
Parameters | |
task | the task ID |
paths | a list of media paths to upload |
image | an int in [0, 100] determining the image quality to upload to CVAT |
useTrue | whether to use a cache when uploading data. Using a cache reduces task creation time as data will be processed on-the-fly and stored in the cache when requested |
useTrue | when annotating videos, whether to upload video frames in smaller chunks. Setting this option to False may result in reduced video quality in CVAT due to size limitations on ZIP files that can be uploaded to CVAT |
chunkNone | the number of frames to upload per ZIP chunk |
jobNone | a list of usernames to assign jobs |
jobNone | a list of usernames to assign job reviews |
frameNone | an optional first frame to start uploading from |
frameNone | an optional last frame to upload |
frameNone | an optional positive integer specifying the spacing between frames to upload |
Returns | |
a list of the job IDs created for the task |
Uploads the given samples to CVAT according to the given backend's annotation and server configuration.
Parameters | |
samples | a fiftyone.core.collections.SampleCollection |
anno | the annotation key |
backend | a CVATBackend to use to perform the upload |
Returns | |
a CVATAnnotationResults |
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented
When uploading multiple fields to an existing project, each field must have a different type but can have overlapping class names. Therefore, when loading annotations, if a field exists for a found label type, that label will not be loaded with any other fields.
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented