基于机器学习的奶牛发情识别方法研究

罗小娟 ,  王道龙 ,  胡鹏昊 ,  林佳旭 ,  管磊

华东理工大学学报(自然科学版) ›› 2026, Vol. 52 ›› Issue (5) : 725 -734.

PDF (5450KB)
华东理工大学学报(自然科学版) ›› 2026, Vol. 52 ›› Issue (5) : 725 -734. DOI: 10.14135/j.cnki.1006-3080.20260211001
研究论文

基于机器学习的奶牛发情识别方法研究

作者信息 +

Machine Learning-Based for Detecting Estrus in Dairy Cows

Author information +
文章历史 +
PDF (5580K)

摘要

针对奶牛发情监测中人工观察获取标签成本高、主观性强,以及模型特征维度高导致的计算功耗大的问题,本文提出一种基于无监督聚类与可解释性特征选择的发情识别方法。该方法通过 K-means 对奶牛颈部佩戴的加速度计采集的数据进行聚类,生成发情标签。通过对比 K 近邻(K-Nearest Neighbors, KNN)、支持向量机(Support Vector Machine, SVM)与随机森林(Random Forest, RF)3 种模型在 10、30 s 和 50 s 窗口下的性能,结合 Friedman 检验和 Nemenyi 检验确定最佳模型。进一步结合沙普利加性解释(Shapely Additive Explanations, SHAP)量化模型特征贡献度,筛选出最优特征子集。研究结果表明,基于 10 s 时间窗口的随机森林模型性能最优,经 SHAP 方法筛选后,特征从 25 维降至 3 维,且降维后的模型性能未出现显著性差异,其准确率、精确率、召回率和 F1-score 分别达到 0.991 1、0.937 0、0.995 5、0.965 4。在基于奶牛三轴加速度数据的独立泛化试验中,降维后 10 s 窗口的 RF 模型的发情检出准确率达到 0.909 0。本文提出的方法实现了发情标签的生成与特征的降维,且模型具有可解释性,为研发低功耗、长续航的奶牛发情监测设备提供了技术支撑。

Abstract

To address the issues of high cost and strong subjectivity associated with manual observation in dairy cow estrus detection, as well as the high computational power consumption caused by high-dimensional model features, this study proposes a dairy cow estrus detection method based on unsupervised clustering and interpretable feature selection. The method utilizes the K-means algorithm to cluster raw activity time series data collected by neck-mounted accelerometers on dairy cows to automatically generate estrus behavior labels. Three models are compared: K-Nearest Neighbors (KNN), Support Vector Machine (SVM), and Random Forest (RF). These models are evaluated under time windows of 10, 30 s, and 50 s. Finally, the optimal model is determined by the Friedman test and the Nemenyi post-hoc test. The Shapley Additive Explanations (SHAP) method is introduced to quantify feature contributions and screen for the key features. The results indicate that the RF model based on a 10 s time window achieves the best performance. Through SHAP selection, the features are reduced from 25 to 3. The performance of the dimension-reduced model shows no significant deviation, with accuracy, precision, recall, and F1 score reaching 0.991 1, 0.937 0, 0.995 5, and 0.965 4, respectively. In independent trials based on three-axis acceleration data from dairy cows, the RF model achieves an estrus detection accuracy of 0.909 0 using a 10 s window following dimensionality reduction. The proposed method enables both estrus label generation and feature dimensionality reduction, while maintaining model interpretability. This provides technical support for developing low-power, long-endurance estrus monitoring devices for dairy cows.

关键词

机器学习 / 奶牛发情识别 / 加速度传感器 / K-means 聚类 / SHAP

Key words

machine learning / cow estrus detection / accelerometer / K-means clustering / SHAP

引用本文

引用格式 ▾
罗小娟,王道龙,胡鹏昊,林佳旭,管磊. 基于机器学习的奶牛发情识别方法研究[J]. 华东理工大学学报(自然科学版), 2026, 52(5): 725-734 DOI:10.14135/j.cnki.1006-3080.20260211001

登录浏览全文

4963

注册一个新账户 忘记密码

参考文献

[1]

罗西尔, 卢小龙, 刘庆友, 等. 肉牛智慧养殖技术研究进展 [J].华南农业大学学报, 2024, 45(5):661-671

[2]

王祯, 宗哲英, 王海超, 等. 奶牛发情数字化检测方法研究现状与发展 [J].中国饲料, 2021, 1(21):134-138.

[3]

王少华, 何东健, 刘冬. 基于机器视觉的奶牛发情行为自动识别方法 [J].农业机械学报, 2020, 51(4):241-249.

[4]

WANG J, CHEN H R, WANG J P, et al. Identification of oestrus cows based on vocalisation characteristics and machine learning technique using a dual-channel-equipped acoustic tag[J].Animal, 2023, 17(6):100811.

[5]

WANG J, SI Y F, LI X X, et al. Discrimination strategy using machine learning technique for oestrus detection in dairy cows by a dual-channel-based acoustic tag[J].Computers and Electronics in Agriculture, 2023, 210:107949.

[6]

ARIKAN İ, AYAV T, SEÇKIN A Ç, et al. Estrus detection and dairy cow identification with cascade deep learning for augmented reality-ready livestock farming[J].Sensors, 2023, 23(24):9795.

[7]

王政, 许兴时, 华志新, 等. 融合 YOLO v5n 与通道剪枝算法的轻量化奶牛发情行为识别 [J].农业工程学报, 2022, 38(23):130-140.

[8]

TSAI D M, HUANG C Y. A motion and image analysis method for automatic detection of estrus and mating behavior in cattle[J].Computers and Electronics in Agriculture, 2014, 104:25-31.

[9]

WANG Z, HUA Z X, WEN Y C, et al. E-YOLO: Recognition of estrus cow based on improved YOLOv8n model[J].Expert Systems with Applications, 2024, 238:122212.

[10]

WANG Z, DENG H, ZHANG S, et al. Detection and tracking of oestrus dairy cows based on improved YOLOv8n and TransT models[J].Biosystems Engineering, 2025, 252:61-76.

[11]

LODKAEW T, PASUPA K, LOO C K. CowXNet: An automated cow estrus detection system[J].Expert Systems with Applications, 2023, 211:118550.

[12]

LAMANNA M, BOVO M, CAVALLINI D. Wearable collar technologies for dairy cows: A systematized review of the current applications and future innovations in precision livestock farming[J].Animals, 2025, 15(3):458.

[13]

吴东霖, 王山山, 赵少斌, 等. 基于智慧项圈监测的奶牛围产前期采食时间对母牛和犊牛健康状况及生产性能的影响 [J].饲料工业, 2025, 46(9):44-50.

[14]

SHAHRIAR M S, SMITH D, RAHMAN A, et al. Detecting heat events in dairy cows using accelerometers and unsupervised learning[J].Computers and Electronics in Agriculture, 2016, 128:20-26.

[15]

SCHWEINZER V, GUSTERER E, KANZ P, et al. Evaluation of an ear-attached accelerometer for detecting estrus events in indoor housed dairy cows[J].Theriogenology, 2019, 130:19-25.

[16]

WANG J, ZHANG Y D, WANG J P, et al. Using machine-learning technique for estrus onset detection in dairy cows from acceleration and location data acquired by a neck-tag[J].Biosystems Engineering, 2022, 214:193-206.

[17]

WANG J, ZHANG Y, BELL M, et al. Potential of an activity index combining acceleration and location for automated estrus detection in dairy cows[J].Information Processing in Agriculture, 2022, 9(2):288-299.

[18]

BENAISSA S, TUYTTENS F A M, PLETS D, et al. Calving and estrus detection in dairy cattle using a combination of indoor localization and accelerometer sensors[J].Computers and Electronics in Agriculture, 2020, 168:105153.

[19]

WANG R R, LI Y, TIAN F Y, et al. Estrus detection in dairy cows using advanced object tracking and behavioral analysis technologies[J].Computers and Electronics in Agriculture, 2025, 235:110331.

[20]

WANG J, ZHAO Y J, LI X X, et al. Multimodal fusion-based detection method of estrus cows using multisource data inspired by hidden Markov model algorithms[J].Computers and Electronics in Agriculture, 2025, 235:110391.

[21]

ZHOU X, QU Y, XU C, et al. Machine learning and shapely additive explanation-based interpretation for predicting mastitis in dairy cows[J].Animals, 2026, 16(2):204.

[22]

JANA R, DIXIT S, SHARMA M, et al. An explainable AI based approach for monitoring animal health [EB/OL]. (2025-08-13). https://arxiv.org/abs/2508.10210.

[23]

DENG M, ZHAO Z. The cow attitude recognition algorithm based on multi-sensor information fusion [C]//2019 IEEE International Conference on Artificial Intelligence and Computer Applications. Dalian, China: IEEE, 2019:283-288.

[24]

李蓝祁, 刘江静, 陈晓丽, 等. 奶牛发情期活动量变化规律研究 [J].畜牧兽医学报, 2018, 49(7):1387-1393.

[25]

XIE J Y, JIANG S, XIE W X, et al. An efficient global K-means clustering algorithm[J].Journal of Computers, 2011, 6(2):271-279.

[26]

COVER T, HART P. Nearest neighbor pattern classification[J].IEEE Transactions on Information Theory, 1967, 13(1):21-27.

[27]

VAPNIK V, CORTES C. Support-vector networks[J].Machine Laearning, 1995, 20(3):273-297.

[28]

文家璇, 王苗, 刘济. 基于时序分解和随机森林的时间序列多步预测算法 [J].华东理工大学学报 (自然科学版), 2023, 49(6):873-881.

[29]

CHAWLA N V, BOWYER K W, HALL L O, et al. SMOTE: Synthetic minority over-sampling technique[J].Journal of Artificial Intelligence Research, 2002, 16:321-357.

[30]

LUNDBERG S M, LEE S I. A unified approach to interpreting model predictions[C]//Proceedings of the 31st International Conference on Neural Information Processing Systems. Long Beach, CA, USA: Curran Associates, Inc, 2017:4768-4777.

基金资助

国家自然科学青年基金资助项目(62402182)

AI Summary AI Mindmap
PDF (5450KB)

0

访问

0

被引

详细

导航
相关文章

AI思维导图

/

〈 〉