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

Institutions

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
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

DMSF-YOLO: Cow Behavior Recognition Algorithm Based on Dynamic Mechanism and Multi-Scale Feature Fusion

Changfeng Wu, X. Q. Wang, Jiandong Fang, Yudong Zhao
4 citations
Sensors
Food Supply Chain Traceability
4.65
article

DMSF-YOLO: Cow Behavior Recognition Algorithm Based on Dynamic Mechanism and Multi-Scale Feature Fusion

Changfeng Wu, X. Q. Wang, Jiandong Fang, Yudong Zhao
article en
4 citations

Abstract

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.

SensorsVol. 25(11)
Inner Mongolia Academy of Agricultural & Animal Husbandry Sciences (CN), Inner Mongolia University of Technology (CN)
Openalex Percentile: Top 6%
Food Supply Chain Traceability
4.65
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.