Converters

Import formats

You can import multiple annotation formats to SuperAnnotate with the supported conversion functions.

To convert the annotation format from COCO instance segmentation to SuperAnnotate for an Image Project:

sa.import_annotation(
    input_dir = "./coco", 
    output_dir = "./sa_vector", 
    dataset_format = "COCO", 
    dataset_name = 'instances_train2017', 
    project_type = 'Vector', 
    task='instance_segmentation')

To convert the annotation format from COCO instance segmentation to SuperAnnotate for an Image (Legacy) Project:

sa.import_annotation(
    input_dir = "./coco", 
    output_dir = "./sa_pixel", 
    dataset_format = "COCO", 
    dataset_name = 'instances_train2017', 
    project_type = 'Pixel', 
    task='panoptic_segmentation')

SuperAnnotate supports conversions from common annotation formats like COCO, Pascal VOC, YOLO, and more.

Check the table below for the list of supported formats and task combinations in the import_annotation function.

FormatProject TypeTask
COCOImageinstance_segmentation
COCOImageobject_detection
COCOImage (Legacy)panoptic_segmentation
VOCImageinstance_segmentation
VOCImageobject_detection
YOLOImageobject_detection

Export Formats

SuperAnnotate's export format can be converted to COCO:

sa.export_annotation(
    input_dir = "./exports/sa_vector", 
    output_dir = "./coco_panoptic", 
    dataset_format = "COCO", 
    dataset_name = "panoptic_train2017", 
    project_type='Pixel', 
    task='panoptic_segmentation')

The export converter supports the following COCO tasks:

FormatProject TypeTask
COCOImage (Legacy)panoptic_segmentation
COCOImage (Legacy)instance_segmentation
COCOImageinstance_segmentation
COCOImageobject_detection

You can also convert annotations from the SuperAnnotate format into Pandas DataFrame where each annotated instance is stored as a separate row:

annotations_df = sa.aggregate_annotations_as_df(
        project_root = “./exports/video_annotations”, 
        project_type = “Video”, 
        folder_names = [“test”, “train”])

You can further filter the obtained DataFrame by custom Pandas queries.

The columns of the returned dataframe will vary depending on the project type.

Image projects

Column nameColumn description
imageNameImage name
folderNameFolder name of the annotations JSON
imageHeightImage height
imageWidthImage width
imageStatusImage’s annotation status
imagePinnedImage’s pin status
imageAnnotatorID of the assigned annotator
imageQAID of the assigned annotator QA
tagVideo tag
commentResolvedInformation whether the comment was resolved or not
instanceIdThe instance’s index in the image’s instances list
classNameClass name
classColorClass color
attributeGroupNameAttribute group name
attributeNameAttribute name
typeInstance type
errorInstance’s approval status
lockedInstance locked status
visibleInstance’s visibility
trackingIdInstance’s tracking ID
probabilityInstance’s confidence score
pointLabelsObject that contains the instance’s point labels
metaTimestamp’s meta information. Example: bounding box’s points
groupIdInstance’s group ID
createdAtInstance’s creation time
creationTypeInstance’s creation type
creatorRoleInstance’s creator role
creatorEmailInstance’s creator email
updatedAtThe last time the instance was updated
updatedByThe ID of the user who last updated the instance
updatorRoleThe role of the user who last updated the instance

Video projects

Column nameColumn description
videoNameVideo name
folderNameFolder name of the annotation JSON
videoHeightVideo’s height
videoWidthVideo’s width
videoStatusVideo’s annotation status
videoURLVideo’s source URL
videoDurationVideo duration
videoErrorVideo approval
videoAnnotatorThe ID of the assigned Annotator
videoQAThe ID of the assigned QA
tagIdThe tag’s index in the video’s tags list
tagTag name
instanceIdThe instance’s index in the video’s instances list
instanceStartThe instance’s start time (in microseconds)
instanceEndThe instance’s end time (in microseconds)
typeInstance’s type
classNameInstance’s class name
createdAtInstance’s creation time
createdByThe ID of the user who created the instance
creatorRoleThe role of the user who created the instance
updatedAtThe time the instance was last updated
updatedByThe ID of the user who updated the instance
updatorRoleThe role of the user who last updated the instance
pointLabelsObject that contains the instance’s point labels
parameterIdThe index of the parameter in the parameters list of the instance
parameterStartParameter’s start time
parameterEndParameter’s end time
timestampIdThe timestamp’s index in the list of timestamps
metaTimestamp’s meta information. Example: bounding box’s points
attributeIdThe index of the attribute in the attributes list of the timestamp
attributeGroupNameAttribute’s group name
attributeNameAttribute’s name