YOLOv11n-CGSD: Lightweight Detection of Dairy Cow Body Temperature from Infrared Thermography Images in Complex Barn Environments

Dairy cow body temperature is a key physiological indicator that reflects metabolic level, immune status, and environmental stress responses, and it has been widely used for early disease recognition. Infrared thermography (IRT), as a non-contact imaging technique capable of remotely acquiring the surface radiation temperature distribution of animals, is regarded as a powerful alternative to traditional temperature measurement methods. Under practical cowshed conditions, IRT images of dairy cows are easily affected by complex background interference and generally suffer from low resolution, poor contrast, indistinct boundaries, weak structural perception, and insufficient texture information, which lead to significant degradation in target detection and temperature extraction performance. To address these issues, a lightweight detection model named YOLOv11n-CGSD is proposed for dairy cow IRT images, aiming to improve the accuracy and robustness of region of interest (ROI) detection and body temperature extraction under complex background conditions. At the architectural level, a C3Ghost lightweight module based on the Ghost concept is first constructed to reduce redundant feature extraction while lowering computational cost and enhancing the network capability for preserving fine-grained features during feature propagation. Subsequently, a space-to-depth convolution module is introduced to perform spatial rearrangement of feature maps and achieve channel compression via non-strided convolution, thereby improving the sensitivity of the model to local temperature variations and structural details. Finally, a dynamic sampling mechanism is embedded in the neck of the network, where the upsampling and scale alignment processes are adaptively driven by feature content, enhancing the model response to boundary temperature changes and weak-texture regions. Experimental results indicate that the YOLOv11n-CGSD model can effectively shift attention from irrelevant background regions to ROI contour boundaries and increase attention coverage within the ROI. Under complex IRT conditions, the model achieves P, R, and mAP50 values of 89.11%, 86.80%, and 91.94%, which represent improvements of 3.11%, 5.14%, and 4.08%, respectively, compared with the baseline model. Using Tmax as the temperature extraction parameter, the maximum error (Max. Error) and mean error (MAE. Error) in the lower udder region are reduced by 33.3% and 25.7%, respectively, while in the around the anus region, the Max. Error and MAE. Error are reduced by 87.5% and 95.0%, respectively. These findings demonstrate that, under complex backgrounds and low-quality IRT imaging conditions, the proposed model achieves lightweight and high-performance detection for both lower udder (LU) and around the anus (AA) regions and provides a methodological reference and technical support for non-contact body temperature measurement of dairy cows in practical cowshed production environments.

Authors

Institutions

Publication Details

Journal
Agriculture
Published
2026-01-15
DOI
https://doi.org/10.3390/agriculture16020229
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

YOLOv11n-CGSD: Lightweight Detection of Dairy Cow Body Temperature from Infrared Thermography Images in Complex Barn Environments

Zhongwei Kang, Hang Song, Tomas Norton, Hang Xue et al.
Agriculture
Effects of Environmental Stressors on Livestock
article

YOLOv11n-CGSD: Lightweight Detection of Dairy Cow Body Temperature from Infrared Thermography Images in Complex Barn Environments

Zhongwei Kang, Hang Song, Tomas Norton, Hang Xue, Derui Bao, Chuang Yan, Miao Wu, Jun Hu, Hang Shi
article en

Abstract

Dairy cow body temperature is a key physiological indicator that reflects metabolic level, immune status, and environmental stress responses, and it has been widely used for early disease recognition. Infrared thermography (IRT), as a non-contact imaging technique capable of remotely acquiring the surface radiation temperature distribution of animals, is regarded as a powerful alternative to traditional temperature measurement methods. Under practical cowshed conditions, IRT images of dairy cows are easily affected by complex background interference and generally suffer from low resolution, poor contrast, indistinct boundaries, weak structural perception, and insufficient texture information, which lead to significant degradation in target detection and temperature extraction performance. To address these issues, a lightweight detection model named YOLOv11n-CGSD is proposed for dairy cow IRT images, aiming to improve the accuracy and robustness of region of interest (ROI) detection and body temperature extraction under complex background conditions. At the architectural level, a C3Ghost lightweight module based on the Ghost concept is first constructed to reduce redundant feature extraction while lowering computational cost and enhancing the network capability for preserving fine-grained features during feature propagation. Subsequently, a space-to-depth convolution module is introduced to perform spatial rearrangement of feature maps and achieve channel compression via non-strided convolution, thereby improving the sensitivity of the model to local temperature variations and structural details. Finally, a dynamic sampling mechanism is embedded in the neck of the network, where the upsampling and scale alignment processes are adaptively driven by feature content, enhancing the model response to boundary temperature changes and weak-texture regions. Experimental results indicate that the YOLOv11n-CGSD model can effectively shift attention from irrelevant background regions to ROI contour boundaries and increase attention coverage within the ROI. Under complex IRT conditions, the model achieves P, R, and mAP50 values of 89.11%, 86.80%, and 91.94%, which represent improvements of 3.11%, 5.14%, and 4.08%, respectively, compared with the baseline model. Using Tmax as the temperature extraction parameter, the maximum error (Max. Error) and mean error (MAE. Error) in the lower udder region are reduced by 33.3% and 25.7%, respectively, while in the around the anus region, the Max. Error and MAE. Error are reduced by 87.5% and 95.0%, respectively. These findings demonstrate that, under complex backgrounds and low-quality IRT imaging conditions, the proposed model achieves lightweight and high-performance detection for both lower udder (LU) and around the anus (AA) regions and provides a methodological reference and technical support for non-contact body temperature measurement of dairy cows in practical cowshed production environments.

AgricultureVol. 16(2)
Heilongjiang Bayi Agricultural University (CN), Daqing Normal University (CN), KU Leuven (BE)
Life in Land
Openalex Percentile: Top 86%
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.