{
 "schema_version": 1,
 "generated": "2026-10-31",
 "id": "roboflow-supervision--convert-and-split-vision-datasets",
 "repo": "roboflow/supervision",
 "repo_url": "https://github.com/roboflow/supervision",
 "repo_slug": "roboflow-supervision",
 "title": "Convert and split vision datasets between YOLO, COCO and Pascal VOC",
 "page_title": "How to convert and split vision datasets between YOLO, COCO and Pascal VOC with Supervision",
 "summary": "Load a labeled dataset in one format, split it into train, test and validation, and save it in another.",
 "who": "An ML engineer whose labels came out of one tool in COCO but whose training code expects YOLO.",
 "problem": "Converting annotation formats and splitting datasets by hand is tedious and easy to get wrong.",
 "outcome": "Clean train, test and validation splits saved in the format your training pipeline needs.",
 "steps": [
  "Install with `pip install supervision`",
  "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",
  "Merge datasets from different sources with `sv.DetectionDataset.merge` if needed; classes are combined",
  "Save each split with as_yolo, as_coco or as_pascal_voc"
 ],
 "agent_prompt": "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.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Beginner",
 "time": "20 minutes",
 "basis": "readme",
 "caveat": "Check a few converted labels visually before training, since format conversions can hide class or coordinate mistakes.",
 "category": "Data and analytics",
 "tags": [
  "Data and analytics"
 ],
 "lang": "python",
 "requirements": [
  "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"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/roboflow-supervision/convert-and-split-vision-datasets/",
 "md": "https://dedupedai.com/use-cases/roboflow-supervision/convert-and-split-vision-datasets/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/roboflow-supervision--convert-and-split-vision-datasets.json",
 "api_version": "v1"
}
