{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,16]],"date-time":"2026-10-16T22:33:20Z","timestamp":1792190000502,"version":"4.4.0"},"reference-count":29,"publisher":"MDPI AG","issue":"11","license":[{"start":{"date-parts":[[2025,5,31]],"date-time":"2025-05-31T00:00:00Z","timestamp":1748649600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"Inner Mongolia Scientific and Technological Project","award":["2023YFJM0002"],"award-info":[{"award-number":["2023YFJM0002"]}]},{"name":"Inner Mongolia Scientific and Technological Project","award":["2025KYPT0088"],"award-info":[{"award-number":["2025KYPT0088"]}]},{"name":"Inner Mongolia Scientific and Technological Project","award":["JY20240076"],"award-info":[{"award-number":["JY20240076"]}]},{"name":"asic Research Operating Costs of Colleges and Universities directly","award":["2023YFJM0002"],"award-info":[{"award-number":["2023YFJM0002"]}]},{"name":"asic Research Operating Costs of Colleges and Universities directly","award":["2025KYPT0088"],"award-info":[{"award-number":["2025KYPT0088"]}]},{"name":"asic Research Operating Costs of Colleges and Universities directly","award":["JY20240076"],"award-info":[{"award-number":["JY20240076"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Sensors"],"abstract":"<jats:p>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\u2019s scale, spatial location, and perception of different tasks, enhance the capacity to extract similar behavioral features of cows, and improve the model\u2019s 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.<\/jats:p>","DOI":"10.3390\/s25113479","type":"journal-article","created":{"date-parts":[[2025,6,2]],"date-time":"2025-06-02T08:34:13Z","timestamp":1748853253000},"page":"3479","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":10,"title":["DMSF-YOLO: Cow Behavior Recognition Algorithm Based on Dynamic Mechanism and Multi-Scale Feature Fusion"],"prefix":"10.3390","volume":"25","author":[{"given":"Changfeng","family":"Wu","sequence":"first","affiliation":[{"name":"College of Information Engineering, Inner Mongolia University of Technology, Hohhot 010051, China"},{"name":"Inner Mongolia Key Laboratory of Intelligent Perception and System Engineering, Hohhot 010080, China"},{"name":"Inner Mongolia Synergy Innovation Center of Perception Technology in Intelligent Agriculture and Animal Husbandry, Hohhot 010080, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-2920-9276","authenticated-orcid":false,"given":"Jiandong","family":"Fang","sequence":"additional","affiliation":[{"name":"College of Information Engineering, Inner Mongolia University of Technology, Hohhot 010051, China"},{"name":"Inner Mongolia Key Laboratory of Intelligent Perception and System Engineering, Hohhot 010080, China"},{"name":"Inner Mongolia Synergy Innovation Center of Perception Technology in Intelligent Agriculture and Animal Husbandry, Hohhot 010080, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Xiuling","family":"Wang","sequence":"additional","affiliation":[{"name":"College of Information Engineering, Inner Mongolia University of Technology, Hohhot 010051, China"},{"name":"Inner Mongolia Key Laboratory of Intelligent Perception and System Engineering, Hohhot 010080, China"},{"name":"Inner Mongolia Synergy Innovation Center of Perception Technology in Intelligent Agriculture and Animal Husbandry, Hohhot 010080, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Yudong","family":"Zhao","sequence":"additional","affiliation":[{"name":"Inner Mongolia Key Laboratory of Intelligent Perception and System Engineering, Hohhot 010080, China"},{"name":"Inner Mongolia Synergy Innovation Center of Perception Technology in Intelligent Agriculture and Animal Husbandry, Hohhot 010080, China"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2025,5,31]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","unstructured":"Li, Y., Shu, H., Bindelle, J., Xu, B., Zhang, W., Jin, Z., Guo, L., and Wang, W. (2022). Classification and Analysis of Multiple Cattle Unitary Behaviors and Movements Based on Machine Learning Methods. Animals, 12.","DOI":"10.3390\/ani12091060"},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"2963","DOI":"10.3168\/jds.2022-22501","article-title":"Monitoring the respiratory behavior of multiple cows based on computer vision and deep learning","volume":"106","author":"Wu","year":"2023","journal-title":"J. Dairy Sci."},{"key":"ref_3","doi-asserted-by":"crossref","unstructured":"Zhang, Y., Zhang, Q., Zhang, L., Li, J., Li, M., Liu, Y., and Shi, Y. (2023). Progress of Machine Vision Technologies in Intelligent Dairy Farming. Appl. Sci., 13.","DOI":"10.3390\/app13127052"},{"key":"ref_4","doi-asserted-by":"crossref","unstructured":"Myat Noe, S., Zin, T.T., Tin, P., and Kobayashi, I. (2023). Comparing State-of-the-Art Deep Learning Algorithms for the Automated Detection and Tracking of Black Cattle. Sensors, 23.","DOI":"10.3390\/s23010532"},{"key":"ref_5","doi-asserted-by":"crossref","unstructured":"Li, J., Kang, F., Zhang, Y., Liu, Y., and Yu, X. (2023). Research on Tracking and Identification of Typical Protective Behavior of Cows Based on DeepLabCut. Appl. Sci., 13.","DOI":"10.3390\/app13021141"},{"key":"ref_6","doi-asserted-by":"crossref","unstructured":"Feng, W., Fan, D., Wu, H., and Yuan, W. (2024). Cow Behavior Recognition Based on Wearable Nose Rings. Animals, 14.","DOI":"10.3390\/ani14081187"},{"key":"ref_7","doi-asserted-by":"crossref","unstructured":"Mu, Y., Hu, J., Wang, H., Li, S., Zhu, H., Luo, L., Wei, J., Ni, L., Chao, H., and Hu, T. (2024). Research on the Behavior Recognition of Beef Cattle Based on the Improved Lightweight CBR-YOLO Model Based on YOLOv8 in Multi-Scene Weather. Animals, 14.","DOI":"10.3390\/ani14192800"},{"key":"ref_8","doi-asserted-by":"crossref","unstructured":"Pichlbauer, B., Chapa Gonzalez, J.M., Bobal, M., Guse, C., Iwersen, M., and Drillich, M. (2024). Evaluation of Different Sensor Systems for Classifying the Behavior of Dairy Cows on Pasture. Sensors, 24.","DOI":"10.3390\/s24237739"},{"key":"ref_9","doi-asserted-by":"crossref","unstructured":"Zong, Z., Ban, Z., Wang, C., Wang, S., Yuan, W., Zhang, C., Su, L., and Yuan, Z. (2025). A Study on Multi-Scale Behavior Recognition of Dairy Cows in Complex Background Based on Improved YOLOv5. Agriculture, 15.","DOI":"10.3390\/agriculture15020213"},{"key":"ref_10","doi-asserted-by":"crossref","first-page":"107857","DOI":"10.1016\/j.compag.2023.107857","article-title":"YOLO-BYTE: An efficient multi-object tracking algorithm for automatic monitoring of dairy cows","volume":"209","author":"Zheng","year":"2023","journal-title":"Comput. Electron. Agric."},{"key":"ref_11","doi-asserted-by":"crossref","unstructured":"Hu, T., Yan, R., Jiang, C., Chand, N.V., Bai, T., Guo, L., and Qi, J. (2023). Grazing Sheep Behaviour Recognition Based on Improved YOLOV5. Sensors, 23.","DOI":"10.3390\/s23104752"},{"key":"ref_12","doi-asserted-by":"crossref","unstructured":"McDonagh, J., Tzimiropoulos, G., Slinger, K.R., Huggett, Z.J., Down, P.M., and Bell, M.J. (2021). Detecting Dairy Cow Behavior Using Vision Technology. Agriculture, 11.","DOI":"10.3390\/agriculture11070675"},{"key":"ref_13","doi-asserted-by":"crossref","unstructured":"Zhang, R., Ji, J., Zhao, K., Wang, J., Zhang, M., and Wang, M. (2023). A Cascaded Individual Cow Identification Method Based on DeepOtsu and EfficientNet. Agriculture, 13.","DOI":"10.3390\/agriculture13020279"},{"key":"ref_14","doi-asserted-by":"crossref","first-page":"122212","DOI":"10.1016\/j.eswa.2023.122212","article-title":"E-YOLO: Recognition of estrus cow based on improved YOLOv8n model","volume":"238","author":"Wang","year":"2024","journal-title":"Expert Syst. Appl."},{"key":"ref_15","doi-asserted-by":"crossref","unstructured":"Arikan, I., Ayav, T., Seckin, A.C., and Soygazi, F. (2023). Estrus Detection and Dairy Cow Identification with Cascade Deep Learning for Augmented Reality-Ready Livestock Farming. Sensors, 23.","DOI":"10.3390\/s23249795"},{"key":"ref_16","doi-asserted-by":"crossref","unstructured":"Li, X., Gao, R., Li, Q., Wang, R., Liu, S., Huang, W., Yang, L., and Zhuo, Z. (2024). Multi-Target Feeding-Behavior Recognition Method for Cows Based on Improved RefineMask. Sensors, 24.","DOI":"10.3390\/s24102975"},{"key":"ref_17","doi-asserted-by":"crossref","first-page":"107607","DOI":"10.1016\/j.compag.2022.107607","article-title":"E3D: An efficient 3D CNN for the recognition of dairy cow\u2019s basic motion behavior","volume":"205","author":"Wang","year":"2023","journal-title":"Comput. Electron. Agric."},{"key":"ref_18","doi-asserted-by":"crossref","unstructured":"Bloch, V., Frondelius, L., Arcidiacono, C., Mancino, M., and Pastell, M. (2023). Development and Analysis of a CNN- and Transfer-Learning-Based Classification Model for Automated Dairy Cow Feeding Behavior Recognition from Accelerometer Data. Sensors, 23.","DOI":"10.3390\/s23052611"},{"key":"ref_19","doi-asserted-by":"crossref","unstructured":"Yuan, Z., Wang, S., Wang, C., Zong, Z., Zhang, C., Su, L., and Ban, Z. (2025). Research on Calf Behavior Recognition Based on Improved Lightweight YOLOv8 in Farming Scenarios. Animals, 15.","DOI":"10.3390\/ani15060898"},{"key":"ref_20","doi-asserted-by":"crossref","first-page":"106650","DOI":"10.1016\/j.compag.2021.106650","article-title":"C3D-ConvLSTM based cow behaviour classification using video data for precision livestock farming","volume":"193","author":"Qiao","year":"2022","journal-title":"Comput. Electron. Agric."},{"key":"ref_21","doi-asserted-by":"crossref","unstructured":"Yu, R., Wei, X., Liu, Y., Yang, F., Shen, W., and Gu, Z. (2024). Research on Automatic Recognition of Dairy Cow Daily Behaviors Based on Deep Learning. Animals, 14.","DOI":"10.3390\/ani14030458"},{"key":"ref_22","doi-asserted-by":"crossref","unstructured":"Jia, Q., Yang, J., Han, S., Du, Z., and Liu, J. (2024). CAMLLA-YOLOv8n: Cow Behavior Recognition Based on Improved YOLOv8n. Animals, 14.","DOI":"10.3390\/ani14203033"},{"key":"ref_23","unstructured":"Khanam, R., and Hussain, M. (2024). Yolov11: An overview of the key architectural enhancements. arXiv."},{"key":"ref_24","doi-asserted-by":"crossref","unstructured":"Zhu, L., Wang, X., Ke, Z., Zhang, W., and Lau, R.W. (2023, January 18\u201322). Biformer: Vision Transformer with Bi-Level Routing Attention. Proceedings of the IEEE\/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada.","DOI":"10.1109\/CVPR52729.2023.00995"},{"key":"ref_25","doi-asserted-by":"crossref","unstructured":"Dai, X., Chen, Y., Xiao, B., Chen, D., Liu, M., Yuan, L., and Zhang, L. (2021, January 19\u201325). Dynamic Head: Unifying Object Detection Heads with Attentions. Proceedings of the IEEE\/CVF Conference on Computer Vision and Pattern Recognition, Online.","DOI":"10.1109\/CVPR46437.2021.00729"},{"key":"ref_26","doi-asserted-by":"crossref","unstructured":"Tong, L., Fang, J., Wang, X., and Zhao, Y. (2024). Research on Cattle Behavior Recognition and Multi-Object Tracking Algorithm Based on YOLO-BoT. Animals, 14.","DOI":"10.3390\/ani14202993"},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Gao, G., Ma, Y., Wang, J., Li, Z., Wang, Y., and Bai, H. (2025). CFR-YOLO: A Novel Cow Face Detection Network Based on YOLOv7 Improvement. Sensors, 25.","DOI":"10.3390\/s25041084"},{"key":"ref_28","doi-asserted-by":"crossref","first-page":"61","DOI":"10.1016\/j.biosystemseng.2025.02.005","article-title":"Detection and tracking of oestrus dairy cows based on improved YOLOv8n and TransT models","volume":"252","author":"Wang","year":"2025","journal-title":"Biosyst. Eng."},{"key":"ref_29","doi-asserted-by":"crossref","unstructured":"Wei, Y., Zhang, H., Gong, C., Wang, D., Ye, M., and Jia, Y. (2023). Study of Pose Estimation Based on Spatio-Temporal Characteristics of Cow Skeleton. Agriculture, 13.","DOI":"10.3390\/agriculture13081535"}],"container-title":["Sensors"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1424-8220\/25\/11\/3479\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,9]],"date-time":"2025-10-09T17:44:52Z","timestamp":1760031892000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1424-8220\/25\/11\/3479"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,5,31]]},"references-count":29,"journal-issue":{"issue":"11","published-online":{"date-parts":[[2025,6]]}},"alternative-id":["s25113479"],"URL":"https:\/\/doi.org\/10.3390\/s25113479","relation":{},"ISSN":["1424-8220"],"issn-type":[{"value":"1424-8220","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,5,31]]}}}