Upload Dataset

Update a full dataset to Roboflow

You can upload a full dataset to Roboflow using the Python SDK and CLI.

The upload_dataset method lets you upload a dataset to a project that already exists within Roboflow. If you need to create a project, refer to the Create a Project documentation.

To upload a dataset using the Python SDK, use the following code:

import roboflow

rf = roboflow.Roboflow(api_key=YOUR_API_KEY_HERE)

# get a project
project = rf.workspace().project("PROJECT_ID")

# Upload image to dataset
project.upload_dataset(
    dataset_path="./dataset/",
    num_workers=10,
    dataset_format="yolov8",
    project_license="MIT",
    project_type="object-detection"
)

The supported dataset_format values are:

  • voc

  • yolov5

  • yolov8

The num_workers value allows you to set how many images should be uploaded concurrently. We recommend setting a value no greater than 25.

Last updated