Annotation set
Annotation set is a collection of annotations for a dataset. Use the Annotation set class to easily manipulate annotations across the whole dataset.
An annotation set is defined by:
-
a task
-
a reference dataset
-
the collection of image-level annotations
class remo.AnnotationSet¶
Remo annotation set
documentation
class remo.AnnotationSet(id: int = None, name: str = None, task: str = None, dataset_id: int = None, total_classes=None, updated_at=None, released_at=None, total_images: int = None, top3_classes=None, total_annotation_objects: int = None, \*\*kwargs)
-
Parameters
-
id – annotation set id
-
name – annotation set name
-
task – annotation task. See also:
remo.task
-
dataset_id – dataset id
-
total_classes – total annotation classes
-
updated_at – date, when annotation set was last updated
-
released_at – annotation set release date
-
total_images – total number of images
-
top3_classes – top 3 classes in annotation set
-
total_annotation_objects – total number of annotation objects in annotation set
-
add_annotation¶
Adds new annotation to the image
documentation
add_annotation(image_id: int, annotation: remo.domain.annotation.Annotation)
-
Parameters
-
image_id – image id
-
annotation – annotation data
-
classes¶
List classes within the annotation set
documentation
classes()
-
Returns
List of classes
export_annotations¶
Exports annotations in a given format
documentation
export_annotations(annotation_format: str = 'json', export_coordinates: str = 'pixel', full_path: str = 'true')
-
Parameters
-
annotation_format – choose format from this list [‘json’, ‘coco’, ‘csv’]
-
full_path – uses full image path (e.g. local path), can be one of [‘true’, ‘false’], default=’false’
-
export_coordinates – converts output values to percentage or pixels, can be one of [‘pixel’, ‘percent’], default=’pixel’
-
-
Returns
annotation file content
export_annotations_to_file¶
Exports annotations in given format and save to output file
documentation
export_annotations_to_file(output_file: str, annotation_format: str = 'json', export_coordinates: str = 'pixel', full_path: str = 'true')
-
Parameters
-
output_file – output file to save
-
annotation_format – can be one of [‘json’, ‘coco’, ‘csv’], default=’json’
-
full_path – uses full image path (e.g. local path), can be one of [‘true’, ‘false’], default=’false’
-
export_coordinates – converts output values to percentage or pixels, can be one of [‘pixel’, ‘percent’], default=’pixel’
-
view¶
Opens browser on the annotation tool page for this annotation set
documentation
view()
view_stats¶
Opens browser on annotation set insights page
documentation
view_stats()