Ultralytics absorbed its own COCO converter
A once-standalone format converter now lives inside the main package, leaving this repo as a legacy shell.
What it does
JSON2YOLO converts COCO-format JSON annotations into the flat text files YOLO expects: one .txt per image, with normalized bounding boxes, segmentation masks, or keypoints. It also handles LabelMe polygons and Labelbox exports. The output follows the standard Ultralytics layout: data.yaml, images/, and labels/.
The interesting bit
The README’s “Important Update” is doing a lot of heavy lifting: the actual maintained code now lives in ultralytics.data.converter inside the main package. This repository is essentially a memorial plaque with some legacy scripts still attached. The standalone version hasn’t been abandoned entirely—existing workflows still run—but new development happens elsewhere.
Key highlights
- Supports COCO detection, segmentation, and keypoint annotations via
convert_coco() - LabelMe converter handles polygons, rectangles, circles, linestrips, and masks
- Labelbox bounding boxes convert; mask-only objects get skipped with a warning
- Output directory is deleted and recreated on each run (no incremental updates)
- Requires Python 3.8+
Caveats
- Standalone scripts in this repo are no longer actively updated
--save-diris wiped on every run, which is a footgun if you point it at the wrong directory- Labelbox mask-only objects are silently skipped, not converted
Verdict
Use this if you’re maintaining an old pipeline that depends on the standalone scripts. Otherwise, pip install ultralytics and import convert_coco directly—it’s the same functionality with actual maintenance.