Individual Recognition of a Group Beef Cattle Based on Improved YOLO v5
Deep learning-based individual recognition of beef cattle has improved the efficiency and effectiveness of individual recognition, providing technical support for modern large-scale farms. However, issues such as over-reliance on back patterns, similar patterns of adjacent cattle leading to low recognition accuracy, and difficulties in deploying models on edge devices exist in the process of group cattle recognition. In this study, we proposed a model based on improved YOLO v5. Specifically, a Simple, Parameter-Free (SimAM) attention module is connected with the residual network and Multidimensional Collaborative Attention mechanism (MCA) to obtain the MCA-SimAM-Resnet (MRS-ATT) module, enhancing the model’s feature extraction and expression capabilities. Then, the LMPDIoU loss function is used to improve the localization accuracy of bounding boxes during target detection. Finally, structural pruning is applied to the model to achieve a lightweight version of the improved YOLO v5. Using 211 test images, the improved YOLO v5 model achieved an individual recognition precision (P) of 93.2%, recall (R) of 94.6%, mean Average Precision (mAP) of 94.5%, FLOPs of 7.84, 13.22 M parameters, and an average inference speed of 0.0746 s. The improved YOLO v5 model can accurately and quickly identify individuals within groups of cattle, with fewer parameters, making it easy to deploy on edge devices, thereby accelerating the development of intelligent cattle farming.
Authors
- Ziruo Li
- Yadan Zhang (ORCID: https://orcid.org/0000-0002-1818-1482)
- Tianqin Mao (ORCID: https://orcid.org/0009-0005-7570-2159)
- Gang Liu (ORCID: https://orcid.org/0000-0002-1004-1653)
- Yanbin Li (ORCID: https://orcid.org/0000-0001-7151-9270)
- Kang Xi (ORCID: https://orcid.org/0000-0001-9085-5253)
Institutions
- Beijing University of Posts and Telecommunications (CN)
- Ningbo University of Technology (CN)
- China Agricultural University (CN)
Publication Details
- Journal
- Agriculture
- Published
- 2025-06-28
- DOI
- https://doi.org/10.3390/agriculture15131391
- Citations
- 2
- Primary Topic
- Food Supply Chain Traceability
- Type
- article
- Field-Weighted Citation Impact
- 2.32
Funders
- National Key Research and Development Program of China