Quick lookup if you already know these three formats exist and need to know what actually differs. For the fuller explanation of how each one works, see Computer Vision Annotation Formats.
| YOLO | COCO | Pascal VOC | |
|---|---|---|---|
| File layout | One .txt per image + shared classes.txt | One .json for the whole dataset | One .xml per image |
| Coordinates | Normalized 0–1, center x/y + width/height | Absolute pixels, top-left x/y + width/height | Absolute pixels, xmin/ymin/xmax/ymax corners |
| Declares image size? | No — must be supplied separately | Yes, per image | Yes, per image |
| Class names | Separate file, referenced by index | Embedded (categories array) | Embedded (<name> per object) |
| Shapes supported | Rectangle only | Rectangle only | Rectangle only |
| Typical use | YOLOv5/v8/v11 and similar training scripts | PyTorch-based frameworks (Detectron2, MMDetection); portable single-file datasets | Pipelines built around a VOC-style loader; older TF Object Detection API workflows |
The one conversion detail that trips people up
Converting between COCO and Pascal VOC never needs extra information — both already declare pixel dimensions. Converting to or from YOLO does, because YOLO's .txt never records the image's actual size. Any converter has to ask for it explicitly, or it's silently guessing.
Quick answer
- Picking a format for a new dataset, no existing constraint? COCO — self-contained, and the default for most current PyTorch detection frameworks.
- Training a YOLO model? YOLO — the training script won't accept anything else directly.
- Working with an existing VOC-based pipeline? Pascal VOC — match what the pipeline already expects rather than converting unnecessarily.
- Need shapes beyond rectangles (circles, polygons)? None of these three — see the VIA CSV section of Computer Vision Annotation Formats.
Convert or verify a file
- Bounding Box Converter — convert between all three (and VIA CSV) in either direction.
- YOLO Dataset Converter — convert a whole dataset folder between YOLO, COCO, and Pascal VOC in one batch, not just a single file.
- Annotation Visualizer — render a file's boxes on its images to confirm the conversion is correct.
- YOLO / COCO / Pascal VOC Dataset Health Checkers — validate a dataset's structure in whichever of these three formats it's already in.