Attach URLs

Attaching URLs is a useful way to import your items into your SuperAnnotate projects. You can import items by linking them from external storages. The linked items are displayed in SuperAnnotate, but they aren't stored on our local servers. There are a couple of methods that you can use to do this.

🚧

Item naming restrictions

When naming your items, please avoid using the following special characters as they may lead to unexpected behavior or compatibility issues:
< > : ” ' / \ | ? * & \0 $ ! +

Supported project types

You can make use of this import method for the following project types:

  • Multimodal
  • Image
  • Image (Legacy)
  • Video or Audio
  • Text
  • Tiled
  • Point Cloud

How to Attach URLs

You can attach URLs through the use of Python SDK.

sa.attach_items(
    project = "Cars",
    attachments = [
        { "name": "16797.jpg", 
          "url": "https://test-1212.s3.amazonaws.com/50k2sep/0.jpg?AWSAccessKeyId=AKIA5BP2G2NHEPGBCUX2&Signature=oNlHqhZHiK5GzgWZi%2F46dIoQ%2B%2BA%3D&Expires=1651063405" },
        { "name": "16798.jpg", 
          "url": "https://test-1212.s3.amazonaws.com/50k2sep/1.jpg?AWSAccessKeyId=AKIA5BP2G2NHEPGBCUX2&Signature=bYWiGrW8ET56pUcTCrlqhF5EX%2BY%3D&Expires=1651063405" },
        { "name": "16799.jpg", 
          "url": "https://test-1212.s3.amazonaws.com/50k2sep/10.jpg?AWSAccessKeyId=AKIA5BP2G2NHEPGBCUX2&Signature=OXtzqrgAlEViDbTM5RHeOA%2BGBLk%3D&Expires=1651063405" }
    ],
    annotation_status="NotStarted"
)

The attachments parameter can be a list of objects, or a path to a CSV file.

📘

Requirements

Please note that in order to attach the URLs, you'll need two keys for each item:

  • URL (Required)
  • Name (Optional)

If you don't provide a name for your URLs, it'll be provided an auto-generated UUID.

In order to attach items with a CSV file, you can create a file and store your data in the url and name columns accordingly, like so:

Once you've done that, you can pass its path to the attachments parameter:

sa.attach_items(
    project = "Project Name", 
    attachments = "./images.csv",
    annotation_status = "QualityCheck")

CSV per project type

To attach image URLs, first create a CSV file that contains the URLs. Here are some CSV templates you can use to help you create your CSV files.

Project typeCSV Template
ImageImage CSV
Image (Legacy)Image CSV
VideoVideo CSV
AudioAudio CSV
TextText CSV
Tiled ImageryTiled CSV
Point CloudLidar CSV

Enable CORS for Text Projects

Make sure to enable cross-origin resource sharing (CORS) for the S3 storages you'll be using.

  1. In your bucket, go to Permissions.
  2. Turn off Block all public access.
  3. Insert this configuration in the CORS section.
[
    {
        "AllowedHeaders": [],
        "AllowedMethods": [
            "GET"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": []
    }
]
  1. Click Save changes.