Upload a Dataset

You can upload datasets with images and/or annotations using the Roboflow CLI.

We have prepared a video that walks through how to upload a dataset:

Upload a Directory

Use roboflow image upload with a directory path to bulk-upload a dataset:

Or use the shorthand alias:

The CLI auto-detects whether the path is a file or directory — a directory triggers a bulk import with parallel uploads.

Options

Flag
Description

-p, --project

Project ID (required)

-c, --concurrency

Number of parallel uploads (default: 10)

-b, --batch

Batch name for grouping uploads

-r, --retries

Retry failed uploads N times (default: 0)

Example with options:

Upload a Single Image

To upload a single image:

Options for Single Image Upload

Flag
Description

-p, --project

Project ID (required)

-a, --annotation

Path to annotation file

-m, --labelmap

Path to labelmap file

-s, --split

Split set: train, valid, or test (default: train)

-t, --tag

Comma-separated tag names

-M, --metadata

JSON string of metadata

--is-prediction

Mark upload as a prediction

-b, --batch

Batch name

Examples

Upload with an annotation:

Upload with tags and metadata:

Supported Project Types

You can upload data for the following project types:

  • Object Detection

  • Single-Label Classification

  • Multi-Label Classification

  • Instance Segmentation

  • Semantic Segmentation

  • Keypoint Detection

Supported data.yaml Formats

The CLI supports both list-style and key-value pair formatted class name mappings in data.yaml files during dataset uploads:

OR

JSON Output

For automation, use --json:

Last updated

Was this helpful?