CLI Reference

With SuperAnnotate CLI, basic tasks can be accomplished using shell commands:

superannotatecli <command> <--arg1 val1> <--arg2 val2> [--optional_arg3 val3] [--optional_arg4] ...

To use the CLI a command line initialization step should be performed after the installation:

superannotatecli init

Available commands

Initialization and configuration

To initialize CLI (and SDK) with team token:

superannotatecli init

Creating a project

To create a new project:

superannotatecli create-project --name <project_name> --description <project_description> --type <project_type Vector or Pixel>

Uploading images

To upload images from folder to project use:

superannotatecli upload-images --project <project_name> --folder <folder_path> [--recursive] [--extensions jpg,png]

If optional argument recursive is given then subfolders of <folder_path> are also recursively scanned for available images.

Optional argument extensions accepts comma separated list of image extensions to look for. If the argument is not given then value jpg,png is assumed.


Uploading videos

To upload videos from folder to project use:

superannotatecli upload-videos --project <project_name> --folder <folder_path>
                               [--recursive] [--extensions mp4,avi,mov,webm,flv,mpg,ogg]
                               [--target-fps <float>] [--start-time <float>]
                               [--end-time <float>]

If optional argument recursive is given then subfolders of <folder_path> are also recursively scanned for available videos.

Optional argument extensions accepts comma separated list of image extensions to look for. If the argument is not given then value mp4,avi,mov,webm,flv,mpg,ogg is assumed.

target-fps specifies how many frames per second need to extract from the videos (approximate). If not specified all frames will be uploaded.

start-time specifies time (in seconds) from which to start extracting frames, default is 0.0.

end-time specifies time (in seconds) up to which to extract frames. If it is not specified, then up to end is assumed.


Uploading preannotations

To upload preannotations from folder to project use:

superannotatecli upload-preannotations --project <project_name> --folder <folder_path>
                                       [--format "COCO" or "SuperAnnotate"]
                                       [--dataset-name "<dataset_name_for_COCO_projects>"]
                                       [--task "<task_type_for_COCO_projects>]

Optional argument format accepts input annotation format. It can have COCO or SuperAnnotate values. If the argument is not given then SuperAnnotate (the native annotation format) is assumed.

Only when COCO format is specified dataset-name and task arguments are required.

dataset-name specifies JSON filename (without extension) in <folder_path>.

task specifies the COCO task for conversion. Please see import_annotation_format for more details.

The annotation classes will be created during the execution of this command.


Uploading annotations

To upload annotations from folder to project use:

superannotatecli upload-annotations --project <project_name> --folder <folder_path>
                                    [--format "COCO" or "SuperAnnotate"]
                                    [--dataset-name "<dataset_name_for_COCO_projects>"]
                                    [--task "<task_type_for_COCO_projects>]

Optional argument format accepts input annotation format. It can have COCO or SuperAnnotate values. If the argument is not given then SuperAnnotate (the native annotation format) is assumed.

Only when COCO format is specified dataset-name and task arguments are required.

dataset-name specifies JSON filename (without extension) in <folder_path>.

task specifies the COCO task for conversion. Please see import_annotation_format for more details.

The annotation classes will be created during the execution of this command.


Exporting projects

To export project

superannotatecli export-project --project <project_name> --folder <folder_path>
                                [--include-fuse]
                                [--disable_extract_zip_contents]
                                [--annotation-statuses <comma separated list of annotation statuses to export>]

SDK version information

To show the version of the current SDK installation:

superannotatecli version