/fiftyone:fiftyone-dataset-exportfrom fiftyone
Exports FiftyOne datasets to COCO, YOLO, VOC, CVAT, CSV formats and Hugging Face Hub. Guides through format selection, label field matching, and export execution.
Ships in fiftyone. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
ALWAYS follow these rules:
set_context(dataset_name="my-dataset")
dataset_summary(name="my-dataset")
Before exporting, present:
Different formats support different label types:
| Format | Label Types |
|---|---|
| COCO | detections, segmentations, keypoints |
| YOLO (v4, v5) | detections |
| VOC | detections |
| CVAT | classifications, detections, polylines, keypoints |
| CSV | all (custom fields) |
| Image Classification Directory Tree | classification |
Always use absolute paths for export directories:
params={
"export_dir": {"absolute_path": "/path/to/export"}
}
Check if export directory exists before exporting. If it does, ask user whether to overwrite.
# Set context
set_context(dataset_name="my-dataset")
# Get dataset summary to see fields and label types
dataset_summary(name="my-dataset")
Identify:
# Discover export parameters dynamically
get_operator_schema(operator_uri="@voxel51/io/export_samples")
Before exporting, confirm with the user:
Dataset: my-dataset (5,000 samples)
Media type: image
Available label fields:
- ground_truth (Detections)
- predictions (Detections)
Export options:
- Format: COCO (recommended for detections)
- Export directory: /path/to/export
- Label field: ground_truth
Proceed with export?
Export media and labels:
execute_operator(
operator_uri="@voxel51/io/export_samples",
params={
"export_type": "MEDIA_AND_LABELS",
"dataset_type": "COCO",
"export_dir": {"absolute_path": "/path/to/export"},
"label_field": "ground_truth"
}
)
Export labels only (no media copy):
execute_operator(
operator_uri="@voxel51/io/export_samples",
params={
"export_type": "LABELS_ONLY",
"dataset_type": "COCO",
"labels_path": {"absolute_path": "/path/to/labels.json"},
"label_field": "ground_truth"
}
)
Export media only (no labels):
execute_operator(
operator_uri="@voxel51/io/export_samples",
params={
"export_type": "MEDIA_ONLY",
"export_dir": {"absolute_path": "/path/to/media"}
}
)
After export, verify the output:
ls -la /path/to/export
Report exported file count and structure to user.
| Format | dataset_type Value | Label Types | Labels-Only |
|---|---|---|---|
| COCO | "COCO" | detections, segmentations, keypoints | Yes |
| YOLOv4 | "YOLOv4" | detections | Yes |
| YOLOv5 | "YOLOv5" | detections | No |
| VOC | "VOC" | detections | Yes |
| KITTI | "KITTI" | detections | Yes |
| CVAT Image | "CVAT Image" | classifications, detections, polylines, keypoints | Yes |
| CVAT Video | "CVAT Video" | frame labels | Yes |
| TF Object Detection | "TF Object Detection" | detections | No |
| Format | dataset_type Value | Media Type | Labels-Only |
|---|---|---|---|
| Image Classification Directory Tree | "Image Classification Directory Tree" | image | No |
| Video Classification Directory Tree | "Video Classification Directory Tree" | video | No |
| TF Image Classification | "TF Image Classification" | image | No |
| Format | dataset_type Value | Label Types | Labels-Only |
|---|---|---|---|
| Image Segmentation | "Image Segmentation" | segmentation | Yes |
| Format | dataset_type Value | Best For | Labels-Only |
|---|---|---|---|
| CSV | "CSV" | Custom fields, spreadsheet analysis | Yes |
| GeoJSON | "GeoJSON" | Geolocation data | Yes |
| FiftyOne Dataset | "FiftyOne Dataset" | Full dataset backup with all metadata | Yes |
Note: Formats with "Labels-Only: No" require export_type: "MEDIA_AND_LABELS" (cannot export labels without media).
export_type Value | Description |
|---|---|
"MEDIA_AND_LABELS" | Export both media files and labels |
"LABELS_ONLY" | Export labels only (use labels_path instead of export_dir) |
"MEDIA_ONLY" | Export media files only (no labels) |
"FILEPATHS_ONLY" | Export CSV with filepaths only |
Export from different sources:
target Value | Description |
|---|---|
"DATASET" | Export entire dataset (default) |
"CURRENT_VIEW" | Export current filtered view |
"SELECTED_SAMPLES" | Export selected samples only |
For training with frameworks that use COCO format:
set_context(dataset_name="my-dataset")
execute_operator(
operator_uri="@voxel51/io/export_samples",
params={
"export_type": "MEDIA_AND_LABELS",
"dataset_type": "COCO",
"export_dir": {"absolute_path": "/path/to/coco_export"},
"label_field": "ground_truth"
}
)
Output structure:
coco_export/
├── data/
│ ├── image1.jpg
│ └── image2.jpg
└── labels.json
For training YOLOv5/v8 models:
set_context(dataset_name="my-dataset")
execute_operator(
operator_uri="@voxel51/io/export_samples",
params={
"export_type": "MEDIA_AND_LABELS",
"dataset_type": "YOLOv5",
"export_dir": {"absolute_path": "/path/to/yolo_export"},
"label_field": "ground_truth"
}
)
Output structure:
yolo_export/
├── images/
│ └── train/
│ └── image1.jpg
├── labels/
│ └── train/
│ └── image1.txt
└── dataset.yaml
Export only a subset of samples:
# Set context
set_context(dataset_name="my-dataset")
# Filter samples in the App
set_view(tags=["validated"])
# Export the filtered view
execute_operator(
operator_uri="@voxel51/io/export_samples",
params={
"target": "CURRENT_VIEW",
"export_type": "MEDIA_AND_LABELS",
"dataset_type": "COCO",
"export_dir": {"absolute_path": "/path/to/validated_export"},
"label_field": "ground_truth"
}
)
When media should stay in place:
set_context(dataset_name="my-dataset")
execute_operator(
operator_uri="@voxel51/io/export_samples",
params={
"export_type": "LABELS_ONLY",
"dataset_type": "COCO",
"labels_path": {"absolute_path": "/path/to/annotations.json"},
"label_field": "ground_truth"
}
)
For image classification datasets:
set_context(dataset_name="my-classification-dataset")
execute_operator(
operator_uri="@voxel51/io/export_samples",
params={
"export_type": "MEDIA_AND_LABELS",
"dataset_type": "Image Classification Directory Tree",
"export_dir": {"absolute_path": "/path/to/classification_export"},
"label_field": "ground_truth"
}
)
Output structure:
classification_export/
├── cat/
│ ├── cat1.jpg
│ └── cat2.jpg
└── dog/
├── dog1.jpg
└── dog2.jpg
For analysis in spreadsheets:
set_context(dataset_name="my-dataset")
execute_operator(
operator_uri="@voxel51/io/export_samples",
params={
"export_type": "LABELS_ONLY",
"dataset_type": "CSV",
"labels_path": {"absolute_path": "/path/to/data.csv"},
"csv_fields": ["filepath", "ground_truth.detections.label"]
}
)
For complete dataset backup including all metadata:
set_context(dataset_name="my-dataset")
execute_operator(
operator_uri="@voxel51/io/export_samples",
params={
"export_type": "MEDIA_AND_LABELS",
"dataset_type": "FiftyOne Dataset",
"export_dir": {"absolute_path": "/path/to/backup"}
}
)
Output structure:
backup/
├── metadata.json
├── samples.json
├── data/
│ └── ...
├── annotations/
├── brain/
└── evaluations/
For more control, guide users to use the Python SDK directly:
import fiftyone as fo
import fiftyone.types as fot
# Load dataset
dataset = fo.load_dataset("my-dataset")
# Export to COCO format
dataset.export(
export_dir="/path/to/export",
dataset_type=fot.COCODetectionDataset,
label_field="ground_truth",
)
# Export labels only
dataset.export(
labels_path="/path/to/labels.json",
dataset_type=fot.COCODetectionDataset,
label_field="ground_truth",
)
# Export a filtered view
view = dataset.match_tags("validated")
view.export(
export_dir="/path/to/validated",
dataset_type=fot.YOLOv5Dataset,
label_field="ground_truth",
)
Python SDK dataset types:
fot.COCODetectionDataset - COCO formatfot.YOLOv4Dataset - YOLOv4 formatfot.YOLOv5Dataset - YOLOv5 formatfot.VOCDetectionDataset - Pascal VOC formatfot.KITTIDetectionDataset - KITTI formatfot.CVATImageDataset - CVAT image formatfot.CVATVideoDataset - CVAT video formatfot.TFObjectDetectionDataset - TensorFlow Object Detection formatfot.ImageClassificationDirectoryTree - Classification folder structurefot.VideoClassificationDirectoryTree - Video classification foldersfot.TFImageClassificationDataset - TensorFlow classification formatfot.ImageSegmentationDirectory - Segmentation masksfot.CSVDataset - CSV formatfot.GeoJSONDataset - GeoJSON formatfot.FiftyOneDataset - Native FiftyOne formatFor complete HF Hub export documentation, see HF-HUB-EXPORT.md.
Quick reference:
| Method | Use Case |
|---|---|
push_to_hub() | Personal accounts, simple upload |
| Manual upload | Organizations, private org repos |
Quick start:
from fiftyone.utils.huggingface import push_to_hub
# Personal account
push_to_hub(dataset, repo_name="my-dataset", private=False)
# With options
push_to_hub(
dataset,
repo_name="my-dataset",
description="My dataset description",
license="apache-2.0",
private=True,
)
IMPORTANT: Always generate and get user approval for dataset card before uploading. See HF-HUB-EXPORT.md for complete documentation including authentication setup, dataset card workflow, parameters reference, use cases, and troubleshooting.
Error: "Export directory already exists"
"overwrite": true to paramsError: "Label field not found"
dataset_summary() to see available label fieldsError: "Unsupported label type for format"
Error: "Permission denied"
Export is slow
LABELS_ONLY export typedataset_summary() to know what fields and label types existlabels_path not export_dirWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
19 skills in this plugin
/fiftyone-app-playwrightUse when driving the FiftyOne App via the Playwright MCP — plugin/operator verification, demo or screencast recording, or any end-to-end UI automation against `fo.launch_app(...)`. Covers the critical "do not navigate after reload_dataset" crash, launcher patterns (remote=True, trigger-file IPC), MUI-specific input/dropdown gotchas, sidebar tag filtering, `data-cy` selectors, dialog scrolling, session refresh strategies, and cleanup. Trigger on mentions of "Playwright + FiftyOne", "automate FiftyOne App", "operator demo", "browser_navigate crash", "reload_dataset", or any FiftyOne session that silently dies after a UI action.
/fiftyone-code-styleWrites Python code following FiftyOne's official conventions. Use when contributing to FiftyOne, developing plugins, or writing code that integrates with FiftyOne's codebase./fiftyone-create-notebookCreates Jupyter notebooks for FiftyOne workflows including getting-started guides, tutorials, recipes, and full ML pipelines. Use when creating notebooks, writing tutorials, building demos, or generating FiftyOne walkthroughs covering data loading, exploration, inference, evaluation, and export./fiftyone-dataset-curationEnd-to-end dataset curation for FiftyOne: inspect schema and quality, audit annotations, analyze class distributions, explore embeddings, find duplicates, create curated subsets, and build train/val/test splits. Works with any computer vision dataset type./fiftyone-dataset-importImports datasets into FiftyOne with automatic format detection. Supports all media types (images, videos, point clouds, MCAP multimodal recordings), label formats (COCO, YOLO, VOC, KITTI), multimodal grouped datasets, LeRobot v3 robot-learning episode datasets, and Hugging Face Hub datasets. Use when importing datasets from local files or Hugging Face, loading autonomous driving data, importing robotics/AV sensor logs (MCAP, ROS bag), importing LeRobot robot-learning episodes (teleop recordings, observation.state/action data), or creating grouped datasets./fiftyone-dataset-inferenceRun ML model inference on FiftyOne datasets. Use when running models for detection, classification, segmentation, or embeddings. Discovers available models dynamically from the Zoo, plugin operators, or custom sources — never assumes a fixed model list.voxel51-fiftyone-skills@cascade-ai-ml-engineering is listed by joshuarweaver/cascade-ai-ml-engineering — review the source before installing
npx claudepluginhub joshuarweaver/cascade-ai-ml-engineering --plugin voxel51-fiftyone-skillsOther plugins' skills for the same job