YOLO Darknet TXT
The favored annotation format of the Darknet family of models.
Overview
This format contains one text file per image (containing the annotations and a numeric representation of the label) and a labelmap which maps the numeric IDs to human readable strings. The annotations are normalized to lie within the range [0, 1] which makes them easier to work with even after scaling or stretching images. It has become quite popular as it has followed the Darknet framework's implementations of the various YOLO models.
Roboflow can read and write YOLO Darknet files so you can easily convert them to or from any other object detection annotation format. Once you're ready, use your converted annotations with our training YOLO v4 with a custom dataset tutorial.
Format Description
Below, learn the structure of YOLO Darknet TXT.
Each image has one txt file with a single line for each bounding box. The format of each row is:
class_id center_x center_y width height1 0.408 0.30266666666666664 0.104 0.15733333333333333
1 0.245 0.424 0.046 0.08head
helmet
personSupported Models
Below, see model architectures that require data in the YOLO Darknet TXT format when training a new model.
- YOLOv4Object Detection
YOLOv4 is the original Darknet-based detector by Academia Sinica achieving 43.5% AP on COCO at 65 FPS using CSPDarknet53 and PANet neck.
- YOLOv4-tinyObject Detection
YOLOv4-tiny is a lightweight YOLOv4 variant designed for real-time detection on embedded and mobile hardware where GPU acceleration is unavailable.
Convert Data from YOLO Darknet TXT
- COCO JSON
- COCO Run-Length Encoding (RLE)
- CreateML JSON
- Florence-2
- Google Cloud AutoML Vision CSV
- meituan/yolov6
- Multiclass Classification CSV
- OpenAI CLIP Classification
- OpenAI GPT-4o Object Detection JSONL
- PaliGemma JSONL
- Pascal VOC XML
- RetinaNet Keras CSV
- Sagemaker GroundTruth Manifest
- Scaled-YOLOv4 TXT
- Tensorflow Object Detection CSV
- Tensorflow TFRecord
- YOLO Keras TXT
- YOLOv10 PyTorch TXT
- YOLOv11 PyTorch TXT
- YOLOv4 PyTorch TXT
- YOLOv5 Oriented Bounding Boxes
- YOLOv5 PyTorch TXT
- YOLOv7 PyTorch TXT
- YOLOv8 Oriented Bounding Boxes
- YOLOv8 PyTorch TXT
- YOLOv9 PyTorch TXT
Convert Data to YOLO Darknet TXT
- COCO JSON
- Cogniac
- CreateML JSON
- Google Cloud AutoML Vision CSV
- IBM Cloud Annotations JSON
- Kaggle Wheat CSV
- LabelBox JSON
- LabelBox Video JSON
- LabelMe JSON
- Marmot XML
- Multiclass Classification CSV
- OIDv4 TXT
- OpenImages CSV
- Pascal VOC XML
- RetinaNet Keras CSV
- Sagemaker GroundTruth Manifest
- Scale AI JSON
- SuperAnnotate JSON
- Supervisely JSON
- Tensorflow Object Detection CSV
- Udacity TXT
- Unity Perception JSON
- VGG Image Annotator CSV
- VGG Image Annotator JSON
- VoTT CSV
- VoTT JSON
- YOLO Keras TXT
- YOLOv8 PyTorch TXT