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 a Vector Project:

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

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

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

Format

Project Type

Task

COCO

Vector

instance_segmentation

COCO

Vector

object_detection

COCO

Vector

keypoint_detection

COCO

Pixel

panoptic_segmentation

VOC

Vector

instance_segmentation

VOC

Vector

object_detection

YOLO

Vector

object_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:

Format

Project Type

Task

COCO

Pixel

pasnoptic_segmentation

COCO

Pixel

instance_segmentation

COCO

Vector

instance_segmentation

COCO

Vector

object_detection

COCO

Vector

keypoint_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 name

Column description

imageName

Image name

folderName

Folder name of the annotations JSON

imageHeight

Image height

imageWidth

Image width

imageStatus

Image’s annotation status

imagePinned

Image’s pin status

imageAnnotator

ID of the assigned annotator

imageQA

ID of the assigned annotator QA

tag

Video tag

commentResolved

Information whether the comment was resolved or not

instanceId

The instance’s index in the image’s instances list

className

Class name

classColor

Class color

attributeGroupName

Attribute group name

attributeName

Attribute name

type

Instance type

error

Instance’s approval status

locked

Instance locked status

visible

Instance’s visibility

trackingId

Instance’s tracking ID

probability

Instance’s confidence score

pointLabels

Object that contains the instance’s point labels

meta

Timestamp’s meta information. Example: bounding box’s points

groupId

Instance’s group ID

createdAt

Instance’s creation time

creationType

Instance’s creation type

creatorRole

Instance’s creator role

creatorEmail

Instance’s creator email

updatedAt

The last time the instance was updated

updatedBy

The ID of the user who last updated the instance

updatorRole

The role of the user who last updated the instance

Video projects

Column name

Column description

videoName

Video name

folderName

Folder name of the annotation JSON

videoHeight

Video’s height

videoWidth

Video’s width

videoStatus

Video’s annotation status

videoURL

Video’s source URL

videoDuration

Video duration

videoError

Video approval

videoAnnotator

The ID of the assigned Annotator

videoQA

The ID of the assigned QA

tagId

The tag’s index in the video’s tags list

tag

Tag name

instanceId

The instance’s index in the video’s instances list

instanceStart

The instance’s start time (in microseconds)

instanceEnd

The instance’s end time (in microseconds)

type

Instance’s type

className

Instance’s class name

createdAt

Instance’s creation time

createdBy

The ID of the user who created the instance

creatorRole

The role of the user who created the instance

updatedAt

The time the instance was last updated

updatedBy

The ID of the user who updated the instance

updatorRole

The role of the user who last updated the instance

pointLabels

Object that contains the instance’s point labels

parameterId

The index of the parameter in the parameters list of the instance

parameterStart

Parameter’s start time

parameterEnd

Parameter’s end time

timestampId

The timestamp’s index in the list of timestamps

meta

Timestamp’s meta information. Example: bounding box’s points

attributeId

The index of the attribute in the attributes list of the timestamp

attributeGroupName

Attribute’s group name

attributeName

Attribute’s name


Did this page help you?