cvpy.annotation.cvat.CVATProject.CVATProject¶
- class cvpy.annotation.cvat.CVATProject.CVATProject(cas_connection: CAS | None = None, url: str | None = None, credentials: Credentials | None = None, project_name: str | None = None, annotation_type: AnnotationType | None = None, labels: List[AnnotationLabel] | None = None)¶
Defines a class to interact with a CVAT Project.
- Parameters:
- cas_connection:
Specifies the CAS connection for this project.
- url:
Specifies the url of the CVAT server for calling the REST APIs.
- credentials:
Specifies the login credentials to connect to the CVAT server.
- project_name:
Specifies name of the project.
- annotation_type:
Specifies the type of the annotation project.
- labels:
Specifies a list of AnnotationLabel objects.
- __init__(cas_connection: CAS | None = None, url: str | None = None, credentials: Credentials | None = None, project_name: str | None = None, annotation_type: AnnotationType | None = None, labels: List[AnnotationLabel] | None = None) None ¶
Methods
__init__([cas_connection, url, credentials, ...])
add_task(task)
as_dict()
Creates a dictionary representation of this object.
from_json(project_json_str)
Creates a CVATProject object from a JSON representation of a project.
get_annotations(image_table, annotated_table)
Fetch annotations from CVAT corresponding to the images in a CAS table.
get_tasks()
post_images(image_table)
Create a CVAT task under the project and upload images from a CAS table to that task.
resume(project_name, cas_connection[, ...])
Resumes a CVATProject by reading it from the specified caslib and relative path.
save([caslib, relative_path, replace])
Saves a CVATProject in the specified caslib and relative path.
to_json()
Creates a JSON representation for this project.
Attributes
annotation_type
cas_connection
credentials
labels
project_id
project_name
project_version
tasks
url