with the collaboration of Iranian Society of Mechanical Engineers (ISME)

YOLO11-DML: A Lightweight Object Detection Method for Cattle

Document Type : Research Article- En

Authors

1 College of Electrical and Information, Northeast Agricultural University, Harbin 150030, China

2 College of Agriculture, Northeast Agricultural University, Harbin 150030, China

Abstract
Reliable cow detection in barn environments remains challenging due to visual occlusion, overlapping animals, and cluttered backgrounds. To improve accuracy and real-time performance under such conditions, this study presents YOLO11-DML, an enhanced detection framework built upon YOLO11. To address the decline in recognition accuracy caused by cow overlaps, occlusions, and background interference, this paper has implemented optimisations in three aspects: feature extraction, attention mechanism, and lightweight detection head design: The C3K2-DIMB module is introduced into the Backbone and Neck, enhancing multi-scale feature modelling capabilities through dynamic convolution kernel weights; The mixed local channel attention (MLCA) hybrid local-channel attention mechanism is embedded at the end of the Backbone as an auxiliary feature enhancement module to refine hierarchical feature representations; A lightweight shared convolutional detection head (LSCDH) is designed for the detection head, effectively reducing parameter count and computational overhead while maintaining detection accuracy. Experiments conducted on the CBVD-5 and Dairy Cow datasets show that YOLO11-DML achieves a precision (P) of 92.57%, an F1-score of 89.07%, an mAP@0.5 of 93.11%, an mAP@0.5:0.95 of 59.37%, an inference speed of 105.79 FPS, a parameter count of 2.16M, 5.1 GFLOPs of floating-point operations, and a model size of only 4.5 MB. The research demonstrates that YOLO11-DML achieves high precision while maintaining a lightweight design and real-time performance, providing a feasible solution for multi-object dairy cow detection and behaviour monitoring in smart farms.

Keywords

Subjects

Authors retain the copyright. This is an open access article distributed under Creative Commons Attribution 4.0 International License (CC BY 4.0)

  1. Bo, L., Yuefeng, L., Xiang, B., Yue, W., Haofeng, L., & Xuan, L. (2023). Research on Dairy Cow Identification Methods in Dairy Farm. Indian Journal of Animal Research, 57(12). https://doi.org/10.18805/IJAR.BF-1660
  2. Cabrera, V. E., Bewley, J., Breunig, M., Breunig, T., Cooley, W., De Vries, A., ..., & Greenfield, R. (2025). Data integration and analytics in the dairy industry: challenges and pathways forward. Animals, 15(3), 329. https://doi.org/10.3390/ani15030329
  3. Feijoo, D., Benito, J. C., Garcia, A., & Conde, M. V. (2025). Darkir: Robust low-light image restoration. Proceedings of the Computer Vision and Pattern Recognition Conference, 10879-10889. https://doi.org/10.48550/arXiv.2412.13443
  4. Feng, Y., Huang, J., Du, S., Ying, S., Yong, J.-H., Li, Y., ..., & Gao, Y. (2024). Hyper-yolo: When visual object detection meets hypergraph computation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 47(4), 2388-2401. https://doi.org/10.1109/TPAMI.2024.3524377
  5. Higaki, S., Menezes, G. L., Ferreira, R. E., Negreiro, A., Cabrera, V. E., & Dórea, J. R. (2025). Objective dairy cow mobility analysis and scoring system using computer vision–based keypoint detection technique from top-view 2-dimensional videos. Journal of Dairy Science, 108(4), 3942-3955. https://doi.org/10.3168/jds.2024-25545
  6. Hou, Q., Zhou, D., & Feng, J. (2021). Coordinate attention for efficient mobile network design. Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 13713-13722. https://doi.org/10.1109/CVPR46437.2021.01350
  7. Jiang, D., Wang, H., Li, T., Gouda, M. A., & Zhou, B. (2025). Real-time tracker of chicken for poultry based on attention mechanism-enhanced YOLO-Chicken algorithm. Computers and Electronics in Agriculture, 237, 110640. https://doi.org/10.1016/j.compag.2025.110640
  8. Khanam, R., & Hussain, M. (2024). Yolov11: An overview of the key architectural enhancements. arXiv preprint arXiv:2410.17725. https://doi.org/10.48550/arXiv.2410.17725
  9. Li, B., Fang, J., & Zhao, Y. (2025). RTDETR-Refa: a real-time detection method for multi-breed classification of cattle. Journal of Real-Time Image Processing, 22(1), 38. https://doi.org/10.1007/s11554-024-01613-7
  10. Li, D., Li, L., Chen, Z., & Li, J. S. (2025). Small Convolutional Kernel with Large Kernel Effect. Proceedings of the Computer Vision and Pattern Recognition Conference, Nashville, TN, USA, 10-17. https://doi.org/10.48550/arXiv.2401.12736
  11. Li, K., Fan, D., Wu, H., & Zhao, A. (2024). A new dataset for video-based cow behavior recognition. Scientific Reports, 14(1), 18702. https://doi.org/10.1038/s41598-024-65953-x
  12. Li, Z., Zhang, Y., Kang, X., Mao, T., Li, Y., & Liu, G. (2025). Individual Recognition of a Group Beef Cattle Based on Improved YOLO v5. Agriculture, 15(13), 1391. https://doi.org/10.3390/agriculture15131391
  13. Qiao, Y., Kong, H., Clark, C., Lomax, S., Su, D., Eiffert, S., & Sukkarieh, S. (2021). Intelligent perception for cattle monitoring: A review for cattle identification, body condition score evaluation, and weight estimation. Computers and Electronics in Agriculture, 185, 106143. https://doi.org/10.1016/j.compag.2021.106143
  14. Qiu, G. J. a. A. C. a. J. (2023). Ultralytics YOLOv8 (Version 8.0.0). Retrieved from https://github.com/ultralytics/ultralytics
  15. Shi, D. (2024). Transnext: Robust foveal visual perception for vision transformers. Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 17773-17783. https://doi.org/10.48550/arXiv.2311.17132
  16. Siriani, A. L. R., Kodaira, V., Mehdizadeh, S. A., de Alencar Nääs, I., de Moura, D. J., & Pereira, D. F. (2022). Detection and tracking of chickens in low-light images using YOLO network and Kalman filter. Neural Computing and Applications, 34(24), 21987-21997. https://doi.org/10.1007/s00521-022-07664-w
  17. Tian, Y., Ye, Q., & Doermann, D. (2025). Yolov12: Attention-centric real-time object detectors. arXiv preprint arXiv:2502.12524. https://doi.org/10.48550/arXiv.2502.12524
  18. Twisdu. (2021). dairy cow. Retrieved from https://www.kaggle.com/datasets/twisdu/dairy-cow
  19. Wan, D., Lu, R., Shen, S., Xu, T., Lang, X., & Ren, Z. (2023). Mixed local channel attention for object detection. Engineering Applications of Artificial Intelligence, 123, 106442. https://doi.org/10.1016/j.engappai.2023.106442
  20. Wang, C.-Y., Yeh, I.-H., & Mark Liao, H.-Y. (2024). Yolov9: Learning what you want to learn using programmable gradient information. European conference on computer vision, 1-21. https://doi.org/10.1007/978-3-031-72751-1_1
  21. Wang, J., Dai, B., Li, Y., He, Y., Sun, Y., & Shen, W. (2024). An intelligent edge-IoT platform with deep learning for body condition scoring of dairy cow. IEEE Internet of Things Journal, 11(10), 17453-17467. https://doi.org/10.1109/jiot.2024.3357862
  22. Wang, R., Gao, R., Li, Q., Zhao, C., Ru, L., Ding, L., ..., & Ma, W. (2024). An ultra-lightweight method for individual identification of cow-back pattern images in an open image set. Expert Systems with Applications, 249, 123529. https://doi.org/10.1016/j.eswa.2024.123529
  23. Yang, L., Xu, X., Zhao, J., & Song, H. (2023). Fusion of RetinaFace and improved FaceNet for individual cow identification in natural scenes. Information Processing in Agriculture, 11(4), 512-523. https://doi.org/10.1016/j.inpa.2023.09.001
  24. Yu, W., Zhou, P., Yan, S., & Wang, X. (2024). Inceptionnext: When inception meets convnext. Proceedings of the IEEE/cvf conference on computer vision and pattern recognition, 5672-5683. https://doi.org/10.1109/CVPR52733.2024.00542
  25. Zhang, Q.-L., & Yang, Y.-B. (2021). Sa-net: Shuffle attention for deep convolutional neural networks. ICASSP 2021-2021 IEEE international conference on acoustics, speech and signal processing (ICASSP), 2235-2239. https://doi.org/10.1109/icassp39728.2021.9414568
  26. Zhang, X., Xuan, C., Xue, J., Chen, B., & Ma, Y. (2023). LSR-YOLO: A high-precision, lightweight model for sheep face recognition on the mobile end. Animals, 13(11), 1824. https://doi.org/10.3390/ani13111824
  27. Zhu, M., Liu, Y., Zhang, H., Liu, X., & Li, Z. (2026). Depth-OC-SORT-based multi-object tracking of cattle in real-world farming scenarios. Computers and Electronics in Agriculture, 240, 111151. https://doi.org/10.1016/j.compag.2025.111151
Send comment about this article
Enter Name.
Enter a valid email address.
Enter a vaid affiliation.
Enter comments (At leaset 10 words)
CAPTCHA Image
Enter Security Code Correctly.

Articles in Press, Accepted Manuscript
Available Online from 20 May 2026

  • Receive Date 12 December 2025
  • Revise Date 25 February 2026
  • Accept Date 28 February 2026
  • First Publish Date 20 May 2026