Related Experiment Video
Updated: May 28, 2025

06:30
Noninvasive, In-pen Approach Test for Laboratory-housed Pigs
Published on: June 5, 2019
8.3K
Machine-Learning-Based Activity Tracking for Individual Pig Monitoring in Experimental Facilities for Improved Animal
Frederik Deutch1,2, Marc Gjern Weiss1, Stefan Rahr Wagner3
1Department of Clinical Medicine, Aarhus University, 8000 Aarhus, Denmark.
Sensors (Basel, Switzerland)
|February 13, 2025
Summary
This study developed a machine learning model using video analysis to objectively monitor experimental pig welfare. The technology accurately tracks pig posture and activity, offering a continuous and reliable alternative to manual observation.
Area of Science:
- Animal Welfare Science
- Machine Learning Applications
- Agricultural Technology
Background:
- Current methods for monitoring experimental animal welfare rely on subjective and time-consuming physical observations.
- Objective and continuous monitoring is crucial for detecting early signs of animal misthriving in research settings.
Purpose of the Study:
- To develop and validate a machine learning model for objective monitoring of experimental pig posture and activity levels.
- To create a video-based pig tracking technology for enhanced animal welfare assessment.
Main Methods:
- A prototype system utilizing a microcomputer and ceiling-mounted camera was developed for live video recording.
- A combined machine learning model integrating Ultralytics YOLOv8n for object detection and Lucas-Kanade sparse optical flow for movement analysis was employed.
- The model was trained on images from experimental pigs in single-pig pens to classify postures (lying, standing, walking).
Main Results:
- The developed model successfully classified the posture and activity levels of individual pigs with high accuracy.
- Validation demonstrated a 90.66% accuracy, 90.91% precision, and 90.66% recall.
- A correlation coefficient of 84.53% was achieved when compared to observed ground truth.
Conclusions:
- Machine learning offers a viable and objective method for continuous monitoring of experimental animals.
- This technology has the potential to significantly improve animal welfare in research by enabling early detection of distress or illness.
- The validated pig tracking system provides a reliable tool for researchers focused on animal welfare.

