Skip to main content

Overview

In this guide, we’ll walk through the steps to upload your 2D image data to Nucleus.
  1. Create Dataset for DatasetItems
  2. Create image DatasetItems
  3. Upload DatasetItems to Dataset
  4. Update metadata

Creating a Dataset

Get started by creating a new Dataset to which to upload your 2D data. If you do have an existing Dataset, you can retrieve it by its dataset ID. You can list information about all of your datasets using NucleusClient.datasets, or extract it from the Nucleus dashboard’s URL upon clicking into the Dataset.
Create new Dataset

Creating Image DatasetItems

Next, we’ll upload DatasetItems via API. When uploading items via API, you’ll first need to construct DatasetItem payloads. The best way to do so is using the Python SDK’s DatasetItem constructor, which takes in a few parameters: To keep your data from being uploaded to Scale, see Privacy Mode.
Example DatasetItem Creation
Maximum Image SizeNote that your images must be at most 5,000px by 5,000px. For larger images, we recommend downsizing such that they fall within this size range.

Uploading DatasetItems to Nucleus

We’ll upload to the Dataset created earlier in this guide. You can always retrieve a Dataset by its dataset ID. You can list all of your datasets’ IDs using NucleusClient.datasets, or extract one from the Nucleus dashboard’s URL upon clicking into the Dataset.
Get existing Dataset
With your images and dataset ready, you can now upload to Nucleus using Dataset.append.
Example upload to Dataset

Large Batch Uploads

Dataset.append always processes uploads asynchronously and returns an AsyncJob. The concurrent processing dramatically increases upload throughput.
For large uploads, we recommend storing your images remotely (e.g. in S3, GCS, or Azure Blob Storage) rather than uploading local files.

Updating Metadata

By setting the update=True in Dataset.append, your upload will overwrite metadata for any existing item with a shared reference_id. For instance, in our example we uploaded an item with reference ID 107. We can overwrite this item’s metadata to include a new key-value pair as follows:
Example metadata update
We highly recommend adding as much metadata as possible! Metadata is queryable in the Nucleus dashboard and can unlock many data exploration and curation workflows. See our metadata guide for more info.

Dashboard Upload

Using the Nucleus dashboard, you can upload directly from disk or import an existing Scale or Rapid labeling project.
Uploading local files from the dashboard (creates a new Dataset).

Uploading local files from the dashboard (creates a new Dataset).