This is an early access version, the complete PDF, HTML, and XML versions will be available soon.
Open AccessArticle
A Two-Stage Deep Learning Method for Non-Invasive Sow Body Temperature Prediction Fusing Thermal Imaging and Environmental Parameters
by
Shengyong Xu
Shengyong Xu 1,2,
Ziyi Qin
Ziyi Qin 1,
Qiao Huang
Qiao Huang 1,
Chen Tan
Chen Tan 3,
Xuewen Xu
Xuewen Xu 3
and
Xuan Li
Xuan Li 1,2,*
1
College of Engineering, Huazhong Agricultural University, Wuhan 430070, China
2
Ministry of Agriculture Key Laboratory of Agricultural Machinery for the Middle and Lower Reaches of the Yangtze River, Wuhan 430070, China
3
The College of Animal Science & Technology and College of Veterinary Medicine, Huazhong Agricultural University, Wuhan 430070, China
*
Author to whom correspondence should be addressed.
Submission received: 11 May 2026
/
Revised: 26 May 2026
/
Accepted: 28 May 2026
/
Published: 31 May 2026
(This article belongs to the Section
Pigs)
Simple Summary
Traditional rectal temperature measurement in pigs is stressful, time-consuming, and carries a risk of cross-infection. This study proposes a non-invasive method based on infrared thermography to acquire thermal images of the pig’s ear, eye, and vulva regions, while ambient temperature, humidity, wind speed, and illumination are recorded simultaneously. An image processing algorithm is employed to automatically identify the target regions and extract their maximum temperature values. A two-stage artificial intelligence model is established to integrate thermal distribution features with environmental parameters for predicting rectal temperature. Experimental results demonstrate that the combination of the eye and vulva achieves optimal prediction accuracy, with an average error of 0.18 °C. The proposed method enables rapid and stress-free body temperature monitoring in pigs, thereby promoting the development of automated and animal-friendly livestock health management systems.
Abstract
Traditional rectal temperature measurement in pigs induces stress in animals, imposes a heavy labor burden on staff, and increases the risk of cross-infection. This study proposes a non-invasive deep learning approach to predict porcine rectal temperature by combining infrared thermal images of thermal windows with environmental parameters. A multimodal dataset is constructed by synchronously collecting thermal images, environmental parameters, and actual rectal temperatures. Mask Region-based Convolutional Neural Network (Mask R-CNN), You Only Look Once version 8 small (YOLOv8s), and YOLOv11s are employed to automatically detect or segment thermal window regions, from which the maximum temperature of each region is extracted. To enhance model generalization under varying environmental conditions, a two-stage hybrid regression framework is established. In this framework, a Convolutional Neural Network (CNN) extracts spatial features from thermal images, a fully connected network (FCNN) encodes regional surface temperatures and environmental parameters, and a Transformer module captures cross-modal dependencies to generate a preliminary prediction. Subsequently, a Random Forest (RF) regressor is applied for residual correction and final output optimization. Comparative experiments on single-region, dual-region, and triple-region combinations demonstrate that the “eye + vulva” dual-region scheme yields the optimal performance, with a mean absolute error (MAE) of 0.1796 °C and a coefficient of determination (R2) of 0.8212. The prediction error of this scheme is reduced by 42.3% compared with the best-performing unimodal model. The proposed method provides a fast, accurate, and stress-free solution for porcine body temperature monitoring, thereby supporting the development of intelligent health management in livestock farming.
Share and Cite
MDPI and ACS Style
Xu, S.; Qin, Z.; Huang, Q.; Tan, C.; Xu, X.; Li, X.
A Two-Stage Deep Learning Method for Non-Invasive Sow Body Temperature Prediction Fusing Thermal Imaging and Environmental Parameters. Animals 2026, 16, 1692.
https://doi.org/10.3390/ani16111692
AMA Style
Xu S, Qin Z, Huang Q, Tan C, Xu X, Li X.
A Two-Stage Deep Learning Method for Non-Invasive Sow Body Temperature Prediction Fusing Thermal Imaging and Environmental Parameters. Animals. 2026; 16(11):1692.
https://doi.org/10.3390/ani16111692
Chicago/Turabian Style
Xu, Shengyong, Ziyi Qin, Qiao Huang, Chen Tan, Xuewen Xu, and Xuan Li.
2026. "A Two-Stage Deep Learning Method for Non-Invasive Sow Body Temperature Prediction Fusing Thermal Imaging and Environmental Parameters" Animals 16, no. 11: 1692.
https://doi.org/10.3390/ani16111692
APA Style
Xu, S., Qin, Z., Huang, Q., Tan, C., Xu, X., & Li, X.
(2026). A Two-Stage Deep Learning Method for Non-Invasive Sow Body Temperature Prediction Fusing Thermal Imaging and Environmental Parameters. Animals, 16(11), 1692.
https://doi.org/10.3390/ani16111692
Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details
here.
Article Metrics
Article Access Statistics
For more information on the journal statistics, click
here.
Multiple requests from the same IP address are counted as one view.