DMSF-YOLO: Cow Behavior Recognition Algorithm Based on Dynamic Mechanism and Multi-Scale Feature Fusion
The behavioral changes of dairy cows directly reflect their health status, and observing the behavioral changes of dairy cows can provide a scientific basis for dairy farms so managers can take timely measures to intervene and effectively prevent diseases. Because of the complex background, multi-scale behavior changes of dairy cows, similar behavior, and difficulty in detecting small targets in the actual dairy farm environment, this study proposes a dairy cow behavior recognition algorithm, DMSF-YOLO, based on dynamic mechanism and multi-scale feature fusion, which can quickly and accurately identify the lying, standing, walking, eating, drinking and mounting behaviors of dairy cows. For the problem in multi-scale behavior changes of dairy cows, a multi-scale convolution module (MSFConv) is designed, and some C3k2 modules of the backbone network and neck network are replaced with MSFConv, which can extract cow behavior information of different scales and perform multi-scale feature fusion. Secondly, the C2BRA multi-scale feature extraction module is designed to replace the C2PSA module, which can dynamically select the important areas according to the two-layer routing attention mechanism to extract feature information at different scales and enhance the multi-scale feature extraction capability of the model, and the same time inhibit the interference of the background information to improve the small target detection capability of the model. Finally, the Dynamic Head detection head is introduced to enhance the model's scale, spatial location, and perception of different tasks, enhance the capacity to extract similar behavioral features of cows, and improve the model's performance in detecting cow multi-scale behaviors in complex environments. The proposed DMSF-YOLO algorithm is experimentally validated on a self-constructed cow behavior dataset, and the experimental results show that the DMSF-YOLO model improves the precision (P), recall (R), mAP50, and F1 values by 2.4%, 3%, 1.6%, and 2.7%, respectively, and the FPS value is also high. The model can suppress the interference of background information, dynamically extract multi-scale features, perform feature fusion, distinguish similar behaviors of cows, enhance the capacity to detect small targets, and significantly improve the recognition accuracy and overall performance of the model. This model can satisfy the need to quickly and accurately identify cow behavior in actual dairy farm environments.
Authors
- Changfeng Wu (ORCID: https://orcid.org/0000-0003-1388-5613)
- X. Q. Wang (ORCID: https://orcid.org/0009-0009-4867-9183)
- Jiandong Fang (ORCID: https://orcid.org/0000-0002-2920-9276)
- Yudong Zhao
Institutions
- Inner Mongolia Academy of Agricultural & Animal Husbandry Sciences (CN)
- Inner Mongolia University of Technology (CN)
Publication Details
- Journal
- Sensors
- Published
- 2025-05-31
- DOI
- https://doi.org/10.3390/s25113479
- Citations
- 4
- Primary Topic
- Food Supply Chain Traceability
- Type
- article
- Field-Weighted Citation Impact
- 4.65