# An Automatic Ear Temperature Monitoring Method for Group-Housed Pigs Adopting Infrared Thermography

**Authors:** Changzhen Zhang, Xiaoping Wu, Deqin Xiao, Xude Zhang, Xiaopeng Lei, Sicong Lin

PMC · DOI: 10.3390/ani15152279 · Animals : an Open Access Journal from MDPI · 2025-08-04

## TL;DR

This paper introduces an automated system using infrared thermography and computer vision to monitor the ear temperature of group-housed pigs, enabling early health detection without stressing the animals.

## Contribution

The novel contribution is a fully automated, reliable system for non-invasive pig ear temperature monitoring using infrared thermography and computer vision.

## Key findings

- The automated system achieved 93.74% precision in detecting pig ears using a neural network model.
- Algorithm-derived temperatures correlated strongly with manual measurements (R² of 0.97 for maximum and 0.88 for average values).
- The system is feasible and reliable for early health warning in group-housed pigs.

## Abstract

A pig’s ear temperature serves as a crucial and reliable indicator for the early detection of potential health issues, though manual monitoring in group settings is challenging and can induce stress in the animals. Infrared thermography, which measures temperature from a distance, offers a non-invasive solution. In this study, we developed a fully automated system that uses computer vision technology to constantly monitor the ear temperature of pigs housed in a group. Our method first uses a highly accurate computer vision model to locate pig ears in thermal images and then automatically extracts the temperature data from that specific region. The results showed that our automated system is reliable, and its measurements are very close to those taken manually. This technology provides a practical and powerful tool for farmers to receive early warnings of potential health issues, which can improve animal welfare and farm management.

The goal of this study was to develop an automated monitoring system based on infrared thermography (IRT) for the detection of group-housed pig ears temperature. The aim in the first part of the study was to recognize pigs’ ears by using neural network analysis (SwinStar-YOLO). In the second part of the study, the goal was to automatically extract the maximum and average values of the temperature in the ear region using morphological image processing and a temperature matrix. Our dataset (3600 pictures, 10,812 pig ears) was processed using 5-fold cross-validation before training the ear detection model. The model recognized pigs’ ears with a precision of 93.74% related to threshold intersection over union (IoU). Correlation analysis between manually extracted and algorithm-derived ear temperatures from 400 pig ear samples showed coefficients of determination (R2) of 0.97 for maximum and 0.88 for average values. This demonstrates that our proposed method is feasible and reliable for automatic pig ear temperature monitoring, serving as a powerful tool for early health warning.

## Linked entities

- **Species:** Sus scrofa (taxon 9823)

## Full-text entities

- **Species:** Sus scrofa (pig, species) [taxon 9823]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12345434/full.md

## Figures

12 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12345434/full.md

## References

30 references — full list in the complete paper: https://tomesphere.com/paper/PMC12345434/full.md

---
Source: https://tomesphere.com/paper/PMC12345434