YOLO formats
The YOLO format exports your labels as an Ultralytics YOLO dataset, which every YOLO version from YOLOv5 to YOLO26 can read.
To export to YOLO, your project must have at least one object detection job with a bounding box, polygon or semantic segmentation tool. To export from Kili UI, refer to Exporting project data.
The YOLO format replaces the former YOLO v4 and YOLO v5 to v8 export formats. Class names are listed in
data.yaml(YOLO v4 usedclasses.txt).
What is exported
| Annotation | Export |
|---|---|
| Bounding boxes | As boxes (Detect), oriented boxes (OBB) or polygons (Segment). Refer to Bounding boxes. |
| Polygons | Exported for Segment |
| Semantic segmentations | Exported for Segment. Each part of a multi-part annotation is written on its own line. |
| Points, lines, pose estimations, classifications | Not exported |
Bounding boxes
The Bounding boxes parameter sets how bounding boxes are written, and the YOLO task they're written for:
| Option | Task | Bounding boxes are written as |
|---|---|---|
| As boxes (Detect) | Detect | The upright box around each bounding box. Rotation is lost. |
| As oriented boxes (OBB) | OBB | Their 4 corners, keeping their rotation. For YOLO OBB models. |
| As polygons (Segment) | Segment | 4-point polygons, in the same dataset as polygons and semantic segmentations. |
Datasets in the archive
The export writes one dataset per YOLO task in your project:
- A Detect or OBB dataset for bounding box jobs, depending on the Bounding boxes option
- A Segment dataset for polygon and semantic segmentation jobs
If your export holds a single task, the dataset is at the root of the archive:
export.zip
├── README.kili.txt
├── data.yaml
├── images/
└── labels/
If it holds two tasks, each dataset has its own folder with its data.yaml and labels/, and the images are shared at the root:
export.zip
├── README.kili.txt
├── images/
├── detect/
│ ├── data.yaml
│ └── labels/
└── segment/
├── data.yaml
└── labels/
With As polygons (Segment), bounding boxes go in the Segment dataset, so the export holds a single dataset.
YOLO looks for labels next to the images. To train on one dataset, place its labels/ folder beside images/.
One folder per job
If you choose to split labels per job in Jobs splitting, each job gets its own folder, named after the job ID, with its data.yaml and labels/. Images are shared in images/ at the root.
Each job is exported for its own task:
- Polygon and semantic segmentation jobs: Segment. Bounding boxes in these jobs are written as 4-point polygons.
- Bounding box jobs: the task set by Bounding boxes.
export.zip
├── README.kili.txt
├── images/
├── JOB_0/
│ ├── data.yaml
│ └── labels/
└── JOB_1/
├── data.yaml
└── labels/
data.yaml
Each dataset's data.yaml lists its images for training and validation, and its classes:
train: images
val: images
nc: 3
names: ["VEHICLES/Car", "VEHICLES/Bus", "ROAD/Lane"]When labels from all jobs are grouped, each class name is prefixed with its job ID (JOB_ID/Category), so that classes with the same name in different jobs stay distinct. In a job's own folder, classes keep their category name only.
The export doesn't split assets into training, validation and test sets: set train, val and test to your own folders before training.
Label files
Each image gets one .txt label file with the same name, holding one line per shape. All coordinates are normalized between 0 and 1, relative to the image width and height. An empty label file marks the image as a background image for that task.
Detect: one line per bounding box.
2 0.25 0.67 0.26 0.34
^ ^ ^ ^ ^
class x y w h
class: the class index indata.yamlx,y: the center of the boxw,h: the width and height of the box
Segment: one line per polygon, semantic segmentation part or (with As polygons (Segment)) bounding box.
2 0.25 0.67 0.26 0.34 0.4 0.5 ...
^ ^ ^ ^ ^ ^ ^
class x1 y1 x2 y2 x3 y3 ...
xi,yi: the coordinates of the i-th point
Holes in semantic segmentations are joined to their outline, so each part fits on one line.
OBB: one line per bounding box, with its 4 corners.
class x1 y1 x2 y2 x3 y3 x4 y4
Video projects
In video projects, each frame holding at least one exported shape gets its own image and label file. Frames without shapes are left out. A video_meta.json file lists the exported frames of each video.
Importing YOLO labels
You can import YOLO labels, including Segment labels, back into Kili. Refer to Importing labels.
Updated 11 days ago