AI-driven analysis of animal cleanliness: A data-fusion model using RGB and thermal imaging

• RGB-Thermal imaging was used to evaluate dairy cow cleanliness automatically. • A two-stage machine learning pipeline (segmentation + score prediction) was developed. • Thermal input boosted segmentation accuracy over RGB alone (mIoU + 48 %) • CNN outperformed MLR (on dirt pixel counts) for predicting human cleanliness scores. • The approach supports interpretable, objective monitoring in livestock barn environment. Accurate assessment of dairy cow cleanliness is essential for ensuring animal welfare, maintaining udder health, and optimising milk production. Traditional visual inspections are subjective and often fail to distinguish dirt from natural coat patterns, especially in spotted breeds. This research investigates the applicability of a two-stage approach for automated cleanliness evaluation, consisting of (i) semantic segmentation of dirt areas on cow coats and (ii) regression from the resulting masks to numerical cleanliness scores. The first stage was implemented using the U-Net and DeepLabV3 architectures, which were trained on either RGB-only or RGB-Thermal (RGB-T) images. Incorporating thermal information significantly improved segmentation accuracy: U-Net achieved a mean Intersection over Union (mIoU) of 0.5244 on RGB-T images, compared to 0.3537 on RGB images, while DeepLabV3 on RGB-T images reached an mIoU of 0.5049. The second stage compared two regression strategies: multiple linear regression (MLR) on the number of pixels classified as dirt, and convolutional neural networks (CNNs) trained directly on the masks. CNN-based regression consistently outperformed MLR, with the best performance obtained by combining RGB-T segmentation and CNN regression (DeepLabV3 + CNN: MAPE 23.05 %; U-Net + CNN: MAPE 25.24 %). These findings support the feasibility of a two-stage RGB-T-based approach for objective cleanliness evaluation, highlighting the benefits of thermal information for segmentation and CNNs for score prediction.

Authors

Institutions

Publication Details

Journal
Computers and Electronics in Agriculture
Published
2026-01-20
DOI
https://doi.org/10.1016/j.compag.2026.111462
Primary Topic
Effects of Environmental Stressors on Livestock
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

AI-driven analysis of animal cleanliness: A data-fusion model using RGB and thermal imaging

S. Frattini, Giulia Bugin, Andrea Pezzuolo, Maddi Aguirrebengoa et al.
Computers and Electronics in Agriculture
Effects of Environmental Stressors on Livestock
article

AI-driven analysis of animal cleanliness: A data-fusion model using RGB and thermal imaging

S. Frattini, Giulia Bugin, Andrea Pezzuolo, Maddi Aguirrebengoa, Francesco Marinello, Alberto Carraro
article en

Abstract

• RGB-Thermal imaging was used to evaluate dairy cow cleanliness automatically. • A two-stage machine learning pipeline (segmentation + score prediction) was developed. • Thermal input boosted segmentation accuracy over RGB alone (mIoU + 48 %) • CNN outperformed MLR (on dirt pixel counts) for predicting human cleanliness scores. • The approach supports interpretable, objective monitoring in livestock barn environment. Accurate assessment of dairy cow cleanliness is essential for ensuring animal welfare, maintaining udder health, and optimising milk production. Traditional visual inspections are subjective and often fail to distinguish dirt from natural coat patterns, especially in spotted breeds. This research investigates the applicability of a two-stage approach for automated cleanliness evaluation, consisting of (i) semantic segmentation of dirt areas on cow coats and (ii) regression from the resulting masks to numerical cleanliness scores. The first stage was implemented using the U-Net and DeepLabV3 architectures, which were trained on either RGB-only or RGB-Thermal (RGB-T) images. Incorporating thermal information significantly improved segmentation accuracy: U-Net achieved a mean Intersection over Union (mIoU) of 0.5244 on RGB-T images, compared to 0.3537 on RGB images, while DeepLabV3 on RGB-T images reached an mIoU of 0.5049. The second stage compared two regression strategies: multiple linear regression (MLR) on the number of pixels classified as dirt, and convolutional neural networks (CNNs) trained directly on the masks. CNN-based regression consistently outperformed MLR, with the best performance obtained by combining RGB-T segmentation and CNN regression (DeepLabV3 + CNN: MAPE 23.05 %; U-Net + CNN: MAPE 25.24 %). These findings support the feasibility of a two-stage RGB-T-based approach for objective cleanliness evaluation, highlighting the benefits of thermal information for segmentation and CNNs for score prediction.

Computers and Electronics in AgricultureVol. 244
University of Padua (IT)
Openalex Percentile: Top 82%
Effects of Environmental Stressors on Livestock
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.