Computer vision in precision livestock farming: benchmarking YOLOv9, YOLOv10, YOLOv11, and YOLOv12 for individual cattle identification
Roman Bumbálek, Jean de Dieu Marcel Ufitikirezi, Sandra Nicole Umurungi, Tomáš Zoubek, Radim Kuneš, Radim Stehlík, Petr Bartoš
Abstract
Individual animal identification is fundamental to effective livestock traceability and precision management. This study evaluates the performance of four recent object detection models (YOLOv9m, YOLOv10m, YOLOv11m, and YOLOv12m) for automated cattle identification using a numerical labelling approach in real barn environments. A custom dataset comprising 91,694 annotated frames was collected from a multi-camera surveillance system deployed in a barn area housing dairy cows. The cameras were strategically positioned to provide overlapping coverage and to capture animals under varied barn lighting conditions and crowded environments. Each model was trained and assessed using standard performance metrics, including mean average precision (mAP) at Intersection over Union (IoU) thresholds of 0.50 and 0.50–0.95, as well as precision, recall, inference speed, and model size. Among the models evaluated, YOLOv12m achieved the highest detection accuracy (mAP50 = 0.947; mAP50–95 = 0.911), indicating strong capability in distinguishing individual cattle based on numerical markings even under complex environments. YOLOv11m offered a competitive balance between detection accuracy and computational efficiency, making it suitable for real-time applications. The study also compared model performance with findings from earlier YOLO-based approaches and highlighted significant improvements in robustness and deployment readiness offered by newer versions. These results demonstrate that recent YOLO models are well-suited for individual cattle identification in practical farm environments. The findings provide useful guidance for selecting models based on operational requirements such as accuracy, processing speed, and device constraints, contributing to the advancement of computer vision applications in precision livestock farming.