Roboflow Docs
ResourcesProductsSign InBook a DemoGet Started
  • Product Documentation
  • Developer Reference
  • Changelog
  • Developer Tools
  • Authentication
    • Find Your Roboflow API Key
    • Scoped API Keys
    • Workspace and Project IDs
  • Command Line Interface (CLI)
    • Using the CLI
    • Install and Set Up the CLI
    • List Workspaces and Projects
    • Download a Dataset
    • Upload a Dataset
    • Run a Model on an Image
  • REST API
    • Using the REST API
    • Authenticate with the REST API
    • List Workspaces and Projects
  • Search Images in a Dataset
  • Create a Project
  • Get a Project and List Versions
  • Manage Project Folders
  • List Image Batches
  • Create and List Annotation Jobs
  • Manage Images
    • Upload an Image
    • Get Details About an Image
    • Delete an Image from a Dataset
    • Upload an Annotation
    • Search for an Image
    • List, Add, and Remove Image Tags
  • Versions
    • View a Version
  • Export Data
  • Annotation Insights
    • Annotation Insights (Legacy Endpoint)
  • Model Monitoring
    • Retrieve Statistics About Deployed Models in a Workspace
    • Attach Metadata to an Inference
  • Python SDK
    • Using the Python SDK
  • Authenticate with the Python SDK
  • List Workspaces
  • List Projects and Versions
  • Create a Project
  • Create a Dataset Version
  • Train a Model
  • Upload a Dataset
  • Search for an Image
  • iOS SDK
    • Using the iOS SDK
Powered by GitBook
On this page

Was this helpful?

Upload a Dataset

The upload_dataset method lets you upload a dataset to a workspace into a new project or to one that already exists within Roboflow.

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 workspace
workspace = rf.workspace("WORKSPACE_URL")

# Upload data set to a new/existing project
workspace.upload_dataset(
    "./dataset/", # This is your dataset path
    "PROJECT_ID", # This will either create or get a dataset with the given ID
    num_workers=10,
    project_license="MIT",
    project_type="object-detection",
    batch_name=None,
    num_retries=0
)

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

PreviousTrain a ModelNextSearch for an Image

Last updated 21 days ago

Was this helpful?