Free · No signup · Client-side

COCO → YOLO converter

Paste your COCO JSON detection annotations and get back per-image YOLO TXT files plus a ready-to-train dataset.yaml. Runs entirely in your browser.

Need real ZIP packaging + train/val/test split? See the dataset-export API.

Detection-only: bbox + category_id per annotation. Segmentation and keypoints are ignored.

About this conversion

YOLO and COCO store the same detection information but in different shapes. COCO is a single JSON file with everything inside; YOLO is one TXT file per image plus a dataset.yaml with class names.

Coordinate maths: COCO bboxes are pixel coordinates [x_top_left, y_top_left, width, height]. YOLO wants cx cy w h normalised to 0-1 relative to the image size. The converter does that and clips any off-by-one to the [0, 1] range with a warning.

Category IDs: COCO category IDs are often 1-based and sometimes sparse (1, 2, 5, 8). YOLO needs contiguous 0-based class indices. The converter sorts categories by id and re-maps them.

The same thing via the API (with train/val/test split)

# Sync GET — the response body is the dataset ZIP (images + YOLO TXT + dataset.yaml).
import os, requests
resp = requests.get(
    "https://api.msightflow.ai/v1/projects/PROJECT_ID/export",
    headers={"Authorization": f"Bearer {os.environ['MSF_API_KEY']}"},
    params={"format": "yolo", "split": "80/10/10"},
    stream=True,
)
with open("dataset.zip", "wb") as f:
    for chunk in resp.iter_content(1 << 20):
        f.write(chunk)

Sibling tools

Real-dataset conversion in one API call

50 free exports / month. ZIP packaging, train/val/test split, auto dataset.yaml, webhook on completion.