Bbox Convert
bbox_convertConvert 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": ""} (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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clip | No | When true, clamp boxes to the image bounds instead of returning them as they are. Off by default, because a box outside the image is usually a bug worth seeing. | |
| boxes | Yes | Boxes to convert, each a list of exactly four numbers in from_format, e.g. [[10, 20, 100, 50]]. | |
| to_format | Yes | The format to convert to; same three choices. | |
| from_format | Yes | "coco" for [x, y, w, h], "voc" for [x1, y1, x2, y2], or "yolo" for normalised [cx, cy, w, h]. | |
| image_width | No | Pixel width, required whenever yolo is on either side. | |
| image_height | No | Pixel height, required whenever yolo is on either side. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||