Method Article

Benchmarking YOLOv8-v13 Architectures for Intelligent Real-Time Cattle Monitoring and Data-Driven Farm Management in Precision Livestock Farming

958 views

DOI:

10.3791/69490

November 14th, 2025

In This Article

Summary

This protocol benchmarks six YOLO models for real-time cattle behavior detection to support welfare and farm management optimization.

Abstract

Real-time and accurate cattle behavior detection is crucial for improving animal welfare and optimizing livestock management. To address this, this study comprehensively evaluates six community-developed lightweight YOLO (You Only Look Once) models-YOLOv8n, YOLOv9t, YOLOv10n, YOLOv11n, YOLOv12n, and YOLOv13n-for recognizing five key cattle behaviors (standing, lying, foraging, drinking, and rumination) using the custom CBVD-5 dataset. The dataset includes diverse lighting conditions and natural barn environments to reflect real-world monitoring scenarios. All models were assessed using standard object detection metrics (precision, recall, mAP@50, and mAP@50-95) and deployment-oriented indicators including inference time, frames per second (FPS), model size, and training duration to provide a balanced evaluation of accuracy and efficiency. YOLOv13n achieved the highest mAP@50-95 (0.712), while YOLOv11n reached the highest mAP@50 (0.967) and exhibited stable convergence with a good trade-off between detection accuracy and inference speed. YOLOv10n demonstrated the fastest inference speed (1.2 ms/frame, ~833 FPS), making it well-suited for latency-sensitive applications such as continuous barn surveillance. All models maintained compact sizes below 6 MB and real-time throughput exceeding ~300 FPS, confirming their practicality for edge deployment. The results establish a reproducible benchmarking framework for evaluating modern YOLO variants, offering insights into model selection for efficient, scalable, and welfare-oriented livestock monitoring systems.

Introduction

The efficient monitoring of cattle behavior is essential in precision livestock farming, supporting welfare management, disease detection, and operational optimization. Non-invasive vision-based approaches are particularly promising due to their scalability and versatility. Standardized datasets such as CBVD-5 (Cow Behavior Video Dataset with 5 classes) offer diverse behavior annotations across varied lighting conditions, making them valuable benchmarks in this domain1. In most practical farm settings, cameras are fixed at a moderate height with relatively stable lighting, though occasional occlusion among cattle may affect detection performanc....

Access restricted. Please log in or start a trial to view this content.

Protocol

1. Dataset preparation

NOTE: This study did not involve new animal experiments. All data were obtained from the publicly available CBVD-5 dataset, which was collected and released in compliance with institutional animal-care guidelines by its original authors. Therefore, no additional ethical approval was required for this work.

  1. The dataset comprises continuous surveillance recordings captured by seven Dahua cameras (2.8 mm and 3.6 mm lenses, model M/K) connected through gigabit switches and network video recorders, covering 5 days of uninterrupted observation under standard barn lighting conditions.
  2. E....

Access restricted. Please log in or start a trial to view this content.

Results

This section presents the evaluation results of YOLOv8 through YOLOv13 models on the CBVD-5 dataset for multi-behavior cattle recognition. The analysis focuses on detection accuracy, training convergence, behavioral distribution, and deployment suitability in resource-limited environments. Dataset quality and class balance follow the splits described in the protocol (70/20/10), ensuring consistent representation of all five behaviors across training, validation, and test sets. Figure 1 shows.......

Access restricted. Please log in or start a trial to view this content.

Discussion

The overall success of the proposed comparative framework depends critically on several protocol steps, including high-quality behavior annotation, diverse data augmentation, and stable convergence monitoring during training. These factors ensure that model performance differences reflect true architectural variation rather than data or training noise. This study systematically evaluated six lightweight YOLO variants (v8n to v13n) for multi-class cattle behavior detection using the CBVD-5 dataset. Among the models, YOLOv.......

Access restricted. Please log in or start a trial to view this content.

Disclosures

The authors declare that they have no competing interests.

Acknowledgements

This work was funded by a Universiti Sains Malaysia Bridging Grant, Project No: R501-LR-RND003-0000001342-0000.

....

Access restricted. Please log in or start a trial to view this content.

Materials

List of materials used in this article
NameCompanyCatalog NumberComments
Dahua DH-NVR2216-HDS3 RecorderDahua Technologyhttps://www.dahuasecurity.com/
Dahua DH-S3000C-16GT Gigabit SwitchDahua Technologyhttps://www.dahuasecurity.com/
Dahua M/K Surveillance Camera (2.8 mm / 3.6 mm lens)Dahua Technologyhttps://www.dahuasecurity.com/
Google Colab ProGooglehttps://colab.research.google.com/
MatplotlibMatplotlib Communityhttps://matplotlib.org/
NVIDIA A100 GPUNVIDIAhttps://www.nvidia.com/en-us/data-center/a100/
NumPyNumPy Communityhttps://numpy.org/
OpenCVOpenCV.orghttps://opencv.org/
Optuna (Hyperparameter Optimization)Optuna.orghttps://optuna.org/
PandasPandas Communityhttps://pandas.pydata.org/
PyTorch (v2.0+)PyTorch Foundationhttps://pytorch.org/
Python (v3.10)Python Software Foundationhttps://www.python.org/
Roboflow TSL DatasetRoboflowhttps://roboflow.com/
Ubuntu 20.04 LTSCanonicalhttps://ubuntu.com/
Visual Studio CodeMicrosofthttps://code.visualstudio.com/
YOLOv13Ultralyticshttps://github.com/ultralytics/YOLOv13
YOLOv9Ultralyticshttps://github.com/ultralytics/YOLOv9

References

  1. Li, K., Fan, D., Wu, H., Zhao, A. A new dataset for video-based cow behavior recognition. Sci Rep. 14 (1), 821-830 (2024).
  2. Tran, D. N., et al. Cows' behavior classification using acceleration data: a new, effective, and simple approach. J Compu....

Access restricted. Please log in or start a trial to view this content.

Reprints and Permissions

Request permission to reuse the text or figures of this JoVE article

Request Permission

Tags

YOLO ArchitecturesCattle Behavior DetectionObject Detection MetricsModel BenchmarkingEdge DeploymentAnimal WelfareInference Speed

Related Articles