A modified version of YOLO Darknet annotations that adds a YAML file for model config.
Overview
In June 2020, Glenn Jocher released a followup to his popular YOLOv3 PyTorch Ultralytics repository and dubbed it YOLOv5. The model uses an annotation format similar to YOLO Darknet TXT but with the addition of a YAML file containing model configuration and class values.
If you're looking to train YOLOv5 (opens in a new tab), Roboflow is the easiest way to get your annotations in this format. We can seamlessly convert 30+ different object detection annotation formats to YOLOv5 TXT and we automatically generate your YAML config file for you. Plus we offer many public datasets (opens in a new tab) already pre-converted for this format.
Format Description
Below, learn the structure of YOLOv5 PyTorch 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 height
where fields are space delimited, and the coordinates are normalized from zero to one.
Note: To convert to normalized xywh from pixel values, divide x (and width) by the image's width and divide y (and height) by the image's height.
With Roboflow supervision, an open source Python package with utilities for completing computer vision tasks, you can merge and split detections in YOLOv5 PyTorch TXT. Read our dedicated guides to learn how to merge and split YOLOv5 PyTorch TXT detections.
YOLOv5 is Ultralytics' PyTorch-based object detection model with an integrated training pipeline, widely used in production for custom detection tasks.