Upload images from a local storage

Upload local image folder

To upload images from a folder:

sa.upload_images_from_folder_to_project(
    project = "Project Name",
    folder_path = "./data/images")
superannotatecli upload-images --project “Project Name” --folder “./data/images”

Upload images to a folder in a project

To upload images to a folder in a project:

sa.upload_images_from_folder_to_project(
    project = "Project Name/Folder Name",
    folder_path = "./data/images")

📘

The syntax of project and folder paths is used across all SDK functions.

🚧

When you upload images to a project, their status is NotStarted by default.

Set the annotation status of uploaded images

To set the annotation status of the images you want to upload:

sa.upload_images_from_folder_to_project(
    project = "Project Name",
    folder_path = "./data/images",
    annotation_status = "QualityCheck")

Recursive subfolder upload

To enable recursive subfolder upload (when the images are stored in multiple subfolders):

sa.upload_images_from_folder_to_project(
    project = "Project Name",
    folder_path = "./data/images",
    annotation_status = "QualityCheck", 
    recursive_subfolders = True)

📘

  • This function returns lists of uploaded, skipped, and failed to upload image names.
  • Images with existing names will be skipped (not uploaded).

Upload a predefined list of image paths

To upload a predefined list of image paths:

sa.upload_images_to_project(
    project = "Project Name",
    img_paths = ["./data/images/1.png", "./data/images/100.png"],
    annotation_status = "QualityCheck")

Upload images from an integrated cloud storage

To upload images from an integrated cloud storage:

sa.attach_items_from_integrated_storage(
   project= "Project Name",
   integration= {integration_meta},
   folder_path= "storage_folder_name")

Learn how to create integrations.

Attach images URLs

You can import images by linking them from external storages. The linked images are displayed in SuperAnnotate, but they aren't stored on our local servers. Learn more here.

sa.attach_items(
    project = "Project Name", 
    attachments = "./images.csv",
    annotation_status = "QualityCheck")
superannotatecli attach-image-urls --project “Project Name/Folder Name” --attachments “./images.csv” --annotation_status “QualityCheck”

Did this page help you?