Yijie Xiong, Guoming Li, Naomi C. Willard, Michael Ellis, Richard S Gates

Research output: Contribution to journalArticlepeer-review


Piglet body temperature can drop rapidly after birth, and the magnitude of this drop can delay recovery to homoeothermic status and compromise the vigor of piglets. Understanding piglet body temperature changes provides critical insights into piglet thermal comfort management and preweaning mortality prevention. However, measuring neonatal piglet body temperature at birth is not generally practical in production facilities, and alternative sensing and modeling methods should be explored. The objectives of this research were to (1) quantify the rectal temperature of wet neonatal piglets without any drying treatments across the first day of birth; (2) develop and evaluate thermography and machine learning models to predict piglet rectal temperature within the same period; and (3) compare the machine learning model's performance with a simple regression model using the piglets' thermographic information. Rectal temperatures and thermal images of the back of the ears were obtained at 0, 15, 30, 45, 60, 90, 120, 180, 240, and 1440 minutes after birth for 99 neonatal piglets from 9 litters. Maximum ear base temperature extracted from thermal images, piglet gender, initial weight, and environmental variables (room temperature, relative humidity, and wet-bulb temperature) were used as inputs for machine learning model evaluation. A simple regression and fourteen machine learning models were compared for their performance in predicting piglets' rectal temperature. Piglets dropped an average of 5.1°C in rectal temperature and reached the lowest temperature (33.6 ± 2.2°C) 30 (±15) minutes after birth, demonstrating a significant reduction from their birth rectal temperature (38.7 ± 0.8°C). The maximum ear base temperature had the highest feature importance score (= 0.606) among all input variables for the machine learning model's development. A direct regression of maximum ear base temperature against measured rectal temperature produced a standard error of prediction of 1.7°C, while the bestperforming machine-learning model (the Lasso regressor) produced a standard error of prediction of 1.5°C. Either prediction model is appropriate, with the direct regression model being more straightforward for field application.

Original languageEnglish (US)
Pages (from-to)193-204
Number of pages12
JournalJournal of the ASABE
Issue number2
StatePublished - 2023


  • Computer vision
  • Farrowing
  • Pre-wean mortality
  • Precision livestock farming

ASJC Scopus subject areas

  • Forestry
  • Food Science
  • Biomedical Engineering
  • Agronomy and Crop Science
  • Soil Science


Dive into the research topics of 'MODELING NEONATAL PIGLET RECTAL TEMPERATURE WITH THERMOGRAPHY AND MACHINE LEARNING'. Together they form a unique fingerprint.

Cite this