DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to convert and split vision datasets between YOLO, COCO and Pascal VOC with Supervision

Load a labeled dataset in one format, split it into train, test and validation, and save it in another.

Short answer: Install with pip install supervision; then load your data with sv.DetectionDataset.from_coco, from_yolo or from_pascal_voc; Split it with dataset.split(split_ratio=0.7) and split the remainder again for test and validation. All steps.

Who it is forAn ML engineer whose labels came out of one tool in COCO but whose training code expects YOLO.

The problemConverting annotation formats and splitting datasets by hand is tedious and easy to get wrong.

The outcomeClean train, test and validation splits saved in the format your training pipeline needs.

What you need first

  • Python 3.10 or later
  • A detection or segmentation model; the quickstart uses RF-DETR via `pip install pillow rfdetr`
  • A Roboflow API key only if you use Inference or download datasets from Roboflow

Steps

  1. Install with pip install supervision
  2. Load your data with sv.DetectionDataset.from_coco, from_yolo or from_pascal_voc
  3. Split it with dataset.split(split_ratio=0.7) and split the remainder again for test and validation
  4. Merge datasets from different sources with sv.DetectionDataset.merge if needed; classes are combined
  5. Save each split with as_yolo, as_coco or as_pascal_voc

Prompt for your agent

With roboflow/supervision, load my COCO dataset from <images path> and <annotations path>, split it 70/15/15 into train, test and validation, and save each split in YOLO format under <output folder>. Print the class list and the size of each split.

Caveat. Check a few converted labels visually before training, since format conversions can hide class or coordinate mistakes.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for roboflow/supervision and "Convert and split vision datasets between YOLO, COCO and Pascal VOC"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer