Machine Learning Techniques Associated With Infrared Thermography to Optimize the Diagnosis of Bovine Subclinical Mastitis - Santana, Raul Costa Mascarenhas [UNESP]; Guimarães, Edilson da Silva; Caracuschanski, Fernando David [UNESP]; Brassolatti, Larissa Cristina [UNESP]; Silva, Maria Laura da; Garcia, Alexandre Rossetto; Pezzopane, José Ricardo Macedo; Alves, Teresa Cristina; Tholon, Patrícia; Santos, Marcos Veiga dos; Zafalon, Luiz Francisco (Wiley, 2025)
Bovine subclinical mastitis (SCM) is the costliest disease for the dairy industry. Technologies aimed at the early diagnosis of this condition, such as infrared thermography (IRT), can be used to generate large amounts of data that provide valuable information when analyzed using learning techniques. The objective of this study was to evaluate and optimize the use of machine learning by applying the Extreme Gradient Boosting (XGBoost) algorithm in the diagnosis of bovine SCM, based on udder thermogram analysis. Over 14 months, a total of 1035 milk samples were collected from 97 dairy cows subjected to an automatic milking system. Somatic cell counts were performed by flow cytometry, and the health status of the mammary gland was determined based on a cutoff of 200,000 cells/mL of milk. The attributes analyzed collectively included air temperature, relative humidity, temperature-humidity index, breed, body temperature, teat dirtiness score, parity, days in milk, mammary gland position, milk yield, electrical conductivity, milk fat, coldest and hottest points in the mammary gland region of interest, average mammary gland temperature, thermal amplitude, and the difference between the average temperature of the region of interest and the animal’s body temperature, as well as the microbiological evaluation of the milk. Using the XGBoost algorithm, the most relevant variables for solving the classification problem were identified and selected to construct the final model with the best fit and performance. The best area under the receiver operating characteristic curve (AUC: 0.843) and specificity (Sp: 93.3%) were obtained when using all thermographic variables. The coldest point in the region of interest was considered the most important for decision making in mastitis diagnosis. The use of XGBoost can enhance the diagnostic capability for SCM when IRT is employed. The developed optimized model can be used as a confirmatory mechanism for SCM.
Keywords: dairy cattle; Extreme Gradient Boosting; robotic milking system