Sign in Get started

Exports

Build and download dataset exports in COCO, YOLO, CVAT, Pascal VOC, LabelMe, CSV, or canonical Pictograph JSON.

View as Markdown

An export is a ZIP of an annotated dataset in a chosen format, optionally embedding the original image files. Export builds run server-side (a few seconds for hundreds of images, longer for tens of thousands).

from pictograph import Client
client = Client()

Formats

formatNotes
pictograph (default)Canonical Pictograph JSON — the wire format the SDK consumes
cocoCOCO instance segmentation / object detection
yoloYOLO darknet .txt files (one per image)
cvatCVAT XML
pascal_vocPascal VOC XML (one per image)
labelmeLabelMe JSON (one per image)
csvFlat CSV — bbox annotations only

create

Build a new export. Defaults to wait=True, which blocks until the ZIP is ready.

export = client.exports.create(
    "my-dataset",
    "for-yolov8",
    format="yolo",
    include_images=True,
    class_filter=["car", "truck"],   # None = all classes
    status_filter="complete",        # "all" / "complete" / "in_progress" / "new"
    wait=True,
    poll_interval=2.0,
    timeout=600.0,
)
print(export.id, export.status, export.image_count, export.annotation_count)
ArgTypeDefaultNotes
dataset_namestrrequired
namestrrequiredUnique within the dataset
formatExportFormat"pictograph"See table above
include_imagesboolTrueWhen False, ZIP contains only annotations
class_filterlist[str] | NoneNoneLimit to these class names
status_filterstr"complete"Image status filter
waitboolTrueBlock until terminal status

wait=False returns a pending / processing Export. Poll via get or wait_for_completion.

list / iter

exports = client.exports.list(limit=20)
for e in client.exports.iter(page_size=50):
    print(e.dataset_name, e.name, e.status)

get

export = client.exports.get("my-dataset", "for-yolov8")
print(export.status, export.download_url)

download

Stream the ZIP to a local file (chunked).

from pathlib import Path

client.exports.download(
    "my-dataset", "for-yolov8",
    output_path=Path("./my-dataset.zip"),
)

The download URL is a signed URL valid for 60 minutes — generated fresh on every call.

wait_for_completion

If you used wait=False:

export = client.exports.create("ds", "name", format="coco", wait=False)
# … later
export = client.exports.wait_for_completion("ds", "name", timeout=300.0)

delete

client.exports.delete("my-dataset", "for-yolov8")

Removes the export and the stored ZIP. Other ongoing downloads of the same export will fail mid-stream.

Class filtering

class_filter only includes annotations matching the given class names. Images with no surviving annotations are still included if their status matches status_filter — they get an empty annotation list. Pass class_filter=None (default) to keep every annotation.

Common errors

StatusExceptionCause
404NotFoundErrorDataset or export missing
409ConflictErrorExport name already exists in this dataset
422ValidationErrorUnknown format or status_filter
408PollTimeoutErrorwait=True timed out (export keeps building)
Copied to clipboard