anatools.client.annotations module¶
Annotations Functions
- create_annotation(self, datasetId, format, map, workspaceId=None)¶
Generates annotations for an existing dataset.
- Parameters
datasetId (str) – Dataset ID to generate annotation for.
format (str) – Annotation format. Call get_annotation_formats() to find supported formats.
map (str) – The map file used for annotations. Call get_annotation_maps() to find supported maps.
workspaceId (str) – Workspace ID of the dataset to generate annotation for. If none is provided, the current workspace will get used.
- Returns
The annotationsId for the annotation job.
- Return type
str
- delete_annotation(self, annotationId, workspaceId=None)¶
Delete a dataset annotation.
- Parameters
annotationId (str) – AnnoationId of the annotation job.
workspaceId (str) – Workspace ID of the dataset to generate annotation for. If none is provided, the current workspace will get used.
- Returns
If true, successfully deleted the annotation.
- Return type
bool
- download_annotation(self, datasetId, annotationId, workspaceId=None)¶
Downloads annotations archive.
- Parameters
datasetId (str) – Dataset ID to download image annotation for.
annotationId (str) – Id of previously generated image annotation.
workspaceId (str) – Workspace ID of the dataset to generate annotation for. If none is provided, the current workspace will get used.
- Returns
The name of the archive file that got downloaded.
- Return type
str
- get_annotation_formats(self)¶
Retrieves the annotation formats supported by the Platform.
- Returns
The annotation formats supported by the Platform.
- Return type
str
- get_annotation_maps(self, channelId)¶
Retrieves the map files that are supported by the channel.
- Parameters
channelId (str) – Channel ID to retrieve maps for.
- Returns
The annotation maps supported by the channel.
- Return type
str
- get_annotations(self, datasetId=None, annotationId=None, workspaceId=None)¶
Retrieve information about existing annotations generated for a dataset. Querying requires both datasetId and annotationId.
- Parameters
datasetId (str) – Dataset ID to generate annotations for.
annotationId (str) – Annotation ID for a specific annotations job.
workspaceId (str) – Workspace ID where the annotations exist. If none is provided, the current workspace will get used.
- Returns
Annotation information.
- Return type
list[dict]