Use of Infrared Thermography for Predicting the Infectious Etiology of Subclinical Bovine Mastitis in a Robotic Milking System Using Machine Learning
Preprint
- 25 May 2026
- preprint
- Published by Springer Nature in Research Square
Abstract
Mastitis is a major challenge for dairy producers, and infrared thermography (IRT) is a potential method for identifying affected cows. However, its reliability is influenced by various factors, including animal and environmental conditions. Machine learning techniques can enhance thermal diagnosis. This study aimed to assess IRT for predicting the infectious etiology of subclinical bovine mastitis using machine learning in a voluntary milking system for pasture-raised cows. Eighty-nine lactating cows from a farm in São Carlos, Brazil, underwent thermographic analyses of their udders over six months. Mean (TMED), minimum (TCOLD), and maximum (THOT) udder temperatures were recorded. Microbiological examination, fat level evaluation, and somatic cell count (SCC) in milk samples were performed. Additional data, such as lactation stage, breed, parity, milking time, cleanliness index, ambient temperature, and humidity, were collected. Supervised machine learning techniques were applied to predict mastitis and its infectious etiology. Logistic regression models showed that udder thermal parameters correlated with body temperature. The ROC curve (AUC) for mastitis prediction using IRT was 0.96. Multinomial logistic regression demonstrated high specificity (> 0.95) for identifying S. aureus, S. uberis , and S. dysgalactiae . The AUC ROC for predicting infectious etiology was 0.90. SCC significantly predicted mastitis and these pathogens, while fat levels were not significant. The Holstein breed was relevant in the multinomial model. IRT combined with machine learning shows promise for detecting subclinical mastitis in pasture-raised cows, optimizing pathogen identification in dairy herds.Keywords
All Related Versions
This publication has 27 references indexed in Scilit:
- Automated prediction of mastitis infection patterns in dairy herds using machine learningScientific Reports, 2020
- Comprehensive analysis of machine learning models for prediction of sub-clinical mastitis: Deep Learning and Gradient-Boosted Trees outperform other modelsComputers in Biology and Medicine, 2019
- Comparison of standard and on-plate extraction protocols for identification of mastitis-causing bacteria by MALDI-TOF MSBrazilian Journal of Microbiology, 2019
- High-performance medicine: the convergence of human and artificial intelligenceNature Medicine, 2019
- Udder skin surface temperature variation pre- and post- milking in dairy cows as determined by infrared thermographyJournal of Dairy Research, 2018
- A comparison of THI indices leads to a sensible heat-based heat stress index for shaded cattle that aligns temperature and humidity stressInternational Journal of Biometeorology, 2016
- Rectal temperatures, respiratory rates, production, and reproduction performances of crossbred Girolando cows under heat stress in northeastern BrazilInternational Journal of Biometeorology, 2015
- Predicting mastitis in dairy cows using neural networks and generalized additive models: A comparisonComputers and Electronics in Agriculture, 2013
- pROC: an open-source package for R and S+ to analyze and compare ROC curvesBMC Bioinformatics, 2011
- On Bayesian model and variable selection using MCMCStatistics and Computing, 2002