30DAYL / DOCUMENTATION
COCO to YOLO: classes, paths and splits
COCO stores each box as pixel coordinates [left, top, width, height]. YOLO detection labels use class cx cy width height, with coordinates divided by the decoded image dimensions.
Class IDs are identities, not array positions
A custom COCO dataset can use category IDs 3 and 42. A two-class YOLO bundle needs dense IDs 0 and 1, with the corresponding names in data.yaml. The delivered manifest records both IDs. We do not apply the standard COCO 80-class lookup to your custom classes.
Keep image and label identities together
sample.jpg and sample.png would both normally map to sample.txt. 30dayl assigns distinct names using the source image IDs, preserves the original image bytes and SHA-256 hashes, and records the full source-to-output mapping.
Supply a split policy
Review each image's train, validation or optional test assignment before preparation. Names containing train/val/test folders are only suggestions. Identical image bytes across different splits are rejected. We do not claim to detect visually similar images, video-frame leakage or label quality.
Worked example: confirm all three image splits
For a ZIP containing instances_train.json and the three source images below, enter that exact JSON path in the workspace, then choose Read image list. This synthetic example uses category IDs 3 (cup) and 42 (spoon), mapped to YOLO IDs 0 and 1.
| Source image inside ZIP | Confirm split | Output image | Output label |
|---|---|---|---|
| train/sample.jpg | train | images/train/i1.jpg | labels/train/i1.txt |
| train/sample.png | train | images/train/i2.png | labels/train/i2.txt |
| val/background.jpg | val | images/val/i3.jpg | labels/val/i3.txt |
Review every assignment before choosing Validate and prepare bundle. Both train and validation must be nonempty; test is optional. The two sample filenames keep separate labels despite sharing a stem. The background image stays in validation with an empty label file.
Changing the ZIP or JSON path clears its inspected image list and split assignments. Read the image list again and confirm the new assignments. If inspection fails, correct the input and inspect again before preparing; an earlier successful inspection does not validate a replacement ZIP.
Download the synthetic output ZIP and compare its data.yaml, labels and manifest.json with this table. This is an output example, not an input upload or proof of model training. Checkout remains closed while payment methods are verified.
What is in the ZIP?
data.yaml images/train/i1.jpg images/train/i2.png images/val/i3.jpg labels/train/i1.txt labels/train/i2.txt labels/val/i3.txt manifest.json
A background image can have an empty label file. This is valid detection data and is not an error. All declared images remain in the package.
Free alternatives
If you already run a local Python environment, the official Ultralytics converter is a useful free starting point. CVAT also has mature export workflows. 30dayl is for a checked, complete bundle with persistent job recovery under the limits below.
Current limits
- One COCO detection JSON, JPEG images without EXIF rotation and noninterlaced 8-bit PNG images
- 4 MiB ZIP · 8 MiB expanded · 100 images · 100 classes · 10,000 boxes
- 1 megapixel per image · 4 megapixels per job (at most 9 images at 640×640 or 15 at 512×512) · explicit train + validation splits
- No segmentation, keypoints, encrypted ZIPs, silent clipping or annotation AI