For the complete documentation index, see llms.txt. This page is also available as Markdown.

Download a Dataset

Download a dataset version's images and annotations with the Python SDK.

Once a project has a generated version, you can download its images and annotations in any of the supported export formats. Use Version.download() for the synchronous "fetch and unzip" flow, or Version.export() to ask Roboflow to (re)generate the export asynchronously without downloading.

Download a version

import roboflow

rf = roboflow.Roboflow(api_key="YOUR_API_KEY")
project = rf.workspace().project("my-detector")
version = project.version(3)

dataset = version.download(
    model_format="yolov8",      # or "voc", "coco", "darknet", etc.
    location="./my-detector-v3", # optional, defaults to ./<project>-<version>
    overwrite=False,             # optional, set True to re-download an existing dir
)

print(dataset.location)  # path on disk

Parameters

  • model_format (str) - export format. Common values: yolov8, yolov11, voc, coco, darknet, tfrecord, createml, multiclass. The full list is project-type-dependent - pass an invalid value to get the full list back as an error.

  • location (str, optional) - destination directory. Defaults to ./<project-slug>-<version>.

  • overwrite (bool, default False) - re-download even if the target directory already exists.

The returned Dataset object has a .location attribute pointing to the unzipped directory.

Trigger a fresh export without downloading

This kicks off a server-side regeneration of the export. The call returns once the generation is complete (or raises RuntimeError if it fails). After that, a subsequent download() will fetch the freshly generated artifact.

Public Universe datasets

You don't need to be a member of the workspace to download a public Universe project - your API key just needs Universe access:

REST and CLI equivalents

Last updated

Was this helpful?