Your new experience awaits. Try the new design now and help us make it even better

ORIGINAL RESEARCH article

Front. Vet. Sci.

Sec. Veterinary Infectious Diseases

Machine Learning-based Clinical Mastitis Detection in Dairy Cows Using Milk Electrical Conductivity and Somatic Cell Count

Provisionally accepted
Lihong  PanLihong Pan1,2Xiao  ChenXiao Chen1,2Ding  HanDing Han1,2Nan  LiNan Li1Deyong  ChenDeyong Chen1,2Junbo  WangJunbo Wang1,2*Jian  ChenJian Chen1,2*Xiaoye  HuoXiaoye Huo1,2*
  • 1Chinese Academy of Sciences Aerospace Information Research Institute State Key Laboratory of Transducer Technology, Beijing, China
  • 2University of the Chinese Academy of Sciences, Beijing, China

The final, formatted version of the article will be published soon.

Bovine mastitis, a prevalent disease causing substantial economic losses in dairy production, requires accurate and robust detection methods. Traditional threshold-based approaches using electrical conductivity (EC) are limited by low specificity and farm-specific variability. While somatic cell count (SCC) offers a more reliable biomarker for intramammary inflammation, current SCC sensors often yield imprecise data and are costly to implement, resulting in a lack of accurate, quantitative, and widely applicable models for mastitis monitoring. This study presents an machine learning-based diagnostic framework integrating logistic regression (LR), support vector machines (SVM), and feedforward neural networks (FNN) to evaluate mastitis detection performance with EC, SCC, and their combined inputs. Using data from 93 cows across four dairy farms, we demonstrate that SCC-based models consistently outperform EC-based approaches. The SVM model achieved 95.6% accuracy and 100% sensitivity when utilizing SCC as input feature. The FNN model attained the highest AUC (0.981), highlighting neural networks' capability to capture complex patterns. Although the addition of EC to SCC did not improve performance across all metrics, it showed potential to enhance robustness in contexts where accurate SCC data are limited. These findings underscore the diagnostic superiority of SCC and the potential of tailored machine learning solutions in modern dairy production settings. Future work should focus on expanding datasets across multiple regions and integrating high-precision SCC sensors for real-time deployment in automated detection systems.

Keywords: Somatic cell count, electrical conductivity, Mastitis detection, machine learning, Neural Network, dairy cows

Received: 22 Jul 2025; Accepted: 28 Oct 2025.

Copyright: © 2025 Pan, Chen, Han, Li, Chen, Wang, Chen and Huo. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

* Correspondence:
Junbo Wang, jbwang@mail.ie.ac.cn
Jian Chen, chenjian@mail.ie.ac.cn
Xiaoye Huo, huoxy@aircas.ac.cn

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.