Featured image: Øyvind Nordbø and Muhammad Umair Hassan are part of the Topigs Norsvin team leading the development of AI models for pig behavior detection.
Pigs communicate their health and well-being through social interactions, postures, and movement patterns. Deviations from normal group dynamics are considered unwanted behaviors, which can compromise pigs’ welfare, health, and productivity. These behaviors often stem from environmental factors like overcrowding or barren housing and can lead to injuries, decreased growth, and increased stress.
Topigs Norsvin has developed machine learning models based on artificial intelligence (AI) to automate the observation of unwanted behaviors. Muhammad Umair Hassan, Øyvind Nordbø and Kristine Hov Martinsen have been leading contributors to this research and development process.
Video Surveillance: Footage from Delta Norway showing TN Duroc pigs. The video captures tail positioning (tail down) and tail biting behavior, recorded with varying confidence scores using AI-based detection models.
What Is the Potential of AI-Powered Models for behavioral traits?
“The combination of video surveillance and artificial intelligence is becoming an important tool for analyzing behavioral traits in livestock,” says Hassan. “In our breeding program, these technologies pave the way for more targeted selection, helping us breed pigs that are healthier, less stressed, and better adapted to their environment.”
“We’re currently developing computer models that can automatically detect and record unwanted behaviors, patterns that are difficult or even impossible to capture manually.”
“The goal is to gather comprehensive, reliable, and objective data on behavioral traits, so we can include these traits in the Topigs Norsvin breeding programs in the future. In addition, continuous, objective monitoring can help flag potential issues, such as tail biting in long-tail facilities or other stress-related behaviors, which supports proactive management and improved animal welfare.”
Muhammad Umair Hassan, PhD
What traits are relevant for AI-powered analysis?
“We focus on detecting a range of unwanted behaviors, like tail– and ear biting, belly nosing and welfare indicators, like tail positioning,” explains Hassan. “Tail biting is particularly problematic in growing finishers and is considered one of the most damaging behaviors in pig production. Ear biting and belly nosing are also strong indicators of discomfort and stress.”
The development process:
From barn cameras to smart models
Topigs Norsvin is developing AI-powered models through a structured, four-phase approach that combines video data, manual annotations, and machine learning techniques to enable automatic detection of behavioral traits in pigs.
Video footage from cameras installed in pig barns is fed into machine learning models. The research team manually labels the data for traits such as tail biting, belly nosing, ear biting, and tail positioning. After labeling, the data is processed and cleaned before being used to train the models.
4-step process for model development
Annotation
All behavioral annotations must be created from scratch, making manual labeling of data a time-consuming step.
Data Preprocessing
The data is normalized and then divided into training, validation, and testing sets.
Model Training
The cleaned data is used to train the machine learning model to recognize behavioral patterns.
Testing and Validation
The model is evaluated for accuracy using ground truth data to ensure reliable performance.
Prediction results from the trained model: (a) A tail biting event is recorded with 34% confidence score. Image (b) and (c) show belly nosing behavior recorded at different time intervals and confidence scores. (d) Tail positioning (tail down) and tail biting are recorded within the same frame, but with different confidence scores.
Summary
The use of AI technology in pig behavior analysis is paving the way for healthier and more resilient pigs. The developed AI models enable automatic detection of behavioral issues that were previously difficult to observe. The plan is to integrate these objectively measured behavioral traits into the breeding program, enabling selection for improved welfare and lower incidence of stress-related behaviors.
Follow along for more: Improving means imitating the brain
To improve prediction performance, the Topigs Norsvin research team is working on an optimized AI model. Inspired by how the human brain perceives motion, the new model processes video at different frame rates and resolutions to detect undesirable behaviors more accurately.
Stay tuned for more insights into how Topigs Norsvin are building and training these models.
We Breed Sustainable Pork
In times of climate change, where reducing greenhouse gas emissions is a top priority, the pig plays a key role in the sustainable provision of premium proteins to a growing world population. Topigs Norsvin takes responsibility for breeding pigs that thrive in future production environments—stronger, healthier, and more efficient.
AI AND SUSTAINABILITY
Animal welfare and behavior are core elements of sustainable production. By using AI to analyze pig behavior, we can identify early signs of stress or abnormality. This allows for better welfare, proactive management, and supports our goal of integrating behavioral traits into our breeding programs.
RESPONSIBLE USE
The growing use of AI brings with it important ethical considerations—such as transparency, bias, and responsible resource use. At Topigs Norsvin, by utilizing AI in the development of animal behavior technology, we strive to implement AI as a tool for positive contribution to society in the improvement of health and welfare of our pigs.