Convert bounding boxes between COCO, Pascal VOC and YOLO. FREE.
The three formats disagree on everything: COCO is [x, y, width, height],
VOC is [x1, y1, x2, y2], YOLO is [cx, cy, w, h] normalised to the image.
Getting this wrong produces boxes that look plausible and quietly ruin
every metric. Typical input {"boxes": [[10, 20, 100, 50]], "from_format":
"coco", "to_format": "yolo", "image_width": 640, "image_height": 480}
returns {"boxes": [[0.0938, 0.0938, 0.1562, 0.1042]], "converted": 1,
"rejected": []}.
Use whenever a dataset and a model disagree about format. Not for scoring
predictions (detection_metrics) and not for removing overlaps (nms). Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": "<what is wrong and how to fix it>"} (for example {"error": "boxes must contain at least one box"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.