Fan Liu, Yongan Zhang, Yanqiu Liu, Jia Li, Meian Li, Jianping Yao
{"title":"A Novel Lightweight Dairy Cattle Body Condition Scoring Model for Edge Devices Based on Tail Features and Attention Mechanisms.","authors":"Fan Liu, Yongan Zhang, Yanqiu Liu, Jia Li, Meian Li, Jianping Yao","doi":"10.3390/vetsci12090906","DOIUrl":null,"url":null,"abstract":"<p><p>The Body Condition Score (BCS) is a key indicator of dairy cattle's health, production efficiency, and environmental impact. Manual BCS assessment is subjective and time-consuming, limiting its scalability in precision agriculture. This study utilizes computer vision to automatically assess cattle body condition by analyzing tail features, categorizing BCS into five levels (3.25, 3.50, 3.75, 4.0, 4.25). SE attention improves feature selection by adjusting channel importance, while spatial attention enhances spatial information processing by focusing on key image regions. EfficientNet-B0, enhanced by SE and spatial attention mechanisms, improves feature extraction and localization. To facilitate edge device deployment, model distillation reduces the size from 23.8 MB to 8.7 MB, improving inference speed and storage efficiency. After distillation, the model achieved 91.10% accuracy, 91.14% precision, 91.10% recall, and 91.10% F1 score. The accuracy increased to 97.57% for ±0.25 BCS error and 99.72% for ±0.5 error. This model saves space and meets real-time monitoring requirements, making it suitable for edge devices with limited resources. This research provides an efficient, scalable method for automated livestock health monitoring, supporting intelligent animal husbandry development.</p>","PeriodicalId":23694,"journal":{"name":"Veterinary Sciences","volume":"12 9","pages":""},"PeriodicalIF":2.3000,"publicationDate":"2025-09-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC12474389/pdf/","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Veterinary Sciences","FirstCategoryId":"97","ListUrlMain":"https://doi.org/10.3390/vetsci12090906","RegionNum":2,"RegionCategory":"农林科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"VETERINARY SCIENCES","Score":null,"Total":0}
引用次数: 0
Abstract
The Body Condition Score (BCS) is a key indicator of dairy cattle's health, production efficiency, and environmental impact. Manual BCS assessment is subjective and time-consuming, limiting its scalability in precision agriculture. This study utilizes computer vision to automatically assess cattle body condition by analyzing tail features, categorizing BCS into five levels (3.25, 3.50, 3.75, 4.0, 4.25). SE attention improves feature selection by adjusting channel importance, while spatial attention enhances spatial information processing by focusing on key image regions. EfficientNet-B0, enhanced by SE and spatial attention mechanisms, improves feature extraction and localization. To facilitate edge device deployment, model distillation reduces the size from 23.8 MB to 8.7 MB, improving inference speed and storage efficiency. After distillation, the model achieved 91.10% accuracy, 91.14% precision, 91.10% recall, and 91.10% F1 score. The accuracy increased to 97.57% for ±0.25 BCS error and 99.72% for ±0.5 error. This model saves space and meets real-time monitoring requirements, making it suitable for edge devices with limited resources. This research provides an efficient, scalable method for automated livestock health monitoring, supporting intelligent animal husbandry development.
期刊介绍:
Veterinary Sciences is an international and interdisciplinary scholarly open access journal. It publishes original that are relevant to any field of veterinary sciences, including prevention, diagnosis and treatment of disease, disorder and injury in animals. This journal covers almost all topics related to animal health and veterinary medicine. Research fields of interest include but are not limited to: anaesthesiology anatomy bacteriology biochemistry cardiology dentistry dermatology embryology endocrinology epidemiology genetics histology immunology microbiology molecular biology mycology neurobiology oncology ophthalmology parasitology pathology pharmacology physiology radiology surgery theriogenology toxicology virology.