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 :ref:`installation <ref_tutorial_installation>`:
superannotatecli initTo initialize CLI (and SDK) with team token:
superannotatecli initTo create a new project:
superannotatecli create-project --name <project_name> --description <project_description> --type <project_type Vector or Pixel>To create a new folder:
superannotatecli create-folder --project <project_name> --name <folder_name>To upload images from folder to project use:
superannotatecli upload-images --project <project_name> --folder <folder_path> [--recursive] [--extensions <extension1>,<extension2>,...]If optional argument recursive is given then subfolders of :file:`<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,jpeg,png,tif,tiff,webp,bmp is assumed.
To attach image URLs to project use:
superannotatecli attach-image-urls --project <project_name/folder_name> --attachments <csv_path> [--annotation_status <annotation_status>]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 :file:`<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.
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 :ref:`import_annotation_format <ref_import_annotation_format>` for more details.
The annotation classes will be created during the execution of this command.
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 :ref:`import_annotation_format <ref_import_annotation_format>` for more details.
The annotation classes will be created during the execution of this command.
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>]To show the version of the current SDK installation:
superannotatecli version