Skip to main content

Artificial intelligence as a tool in ethology and animal welfare research

By Andrew Michael Janczak

Forsker Marko Ocepek som sitter i en binge med slaktegris i forbindelse med et dyrevelferdsforsøk ved NMBU.
Researcher Marko Ocepek studying pig behavior up close. Photo: Janne Karin Brodin

At NMBU, researchers show how artificial intelligence can deliver more precise data on the welfare of farm animals, built on a foundation of ethological knowledge.

The seminar ‘‘Use of AI in studies of farm animal behaviour and welfare – visions and reality’’ brought together researchers from four faculties in Auditorium Hippocampus on Wednesday 20 May 2026, hosted by the DyreBar Collaboration Arena for Sustainable Livestock Production, Animal Health and Animal Welfare at NMBU. Professor Inger Lise Andersen, researcher Marko Ocepek and doctoral research fellow Talha Laique from the Faculty of Biosciences showed how cameras, computer vision, video, sensor technology and machine learning open new opportunities to study the behaviour and welfare of farm animals. At the same time, they raised a central point: there is still some distance between vision and practice.

From observation to AI-ready data

The seminar was based on Tinbergen's four questions, which form the foundation of ethology: how a behavior impacts survival, what mechanisms trigger it, how it develops over an individual's lifespan, and its evolutionary history. This foundational knowledge is also essential when developing AI models for behavioral research.

The presentation demonstrated how insights into animal welfare can be systematically transformed into objective, continuous, and actionable data: moving from manual observation and ethograms to expert-defined reference standards, followed by image and video annotation, which are ultimately used to train AI models to recognize the behavioral indicators independently.

Manual observation and ethological expertise form the backbone of this technology by ensuring the data remains biologically meaningful. When AI models are trained on this foundation, they become powerful tools that enable continuous monitoring, more objective recording, and early detection of behavioral anomalies over extended periods and across large groups of animals.

From pen-level dynamics to individual behavioral patterns

A major focus of the seminar was on pig research. Several examples demonstrated how computers can be trained to recognize body parts, movements, postures, and behaviors in video footage from group-housed pigs under commercial conditions.

In the DigiPig project, researchers have worked on making the pig "visible" to the computer through the automated detection of the body, head, and tail (Ocepek et al., 2022). Other studies have utilized electronic ID tags and sensor technology to track individual finisher pigs over a 20-day period. One of the key findings highlighted was that activity patterns varied significantly both between individuals and from day to day. The conclusion was that welfare monitoring should not rely solely on group averages, but rather on what constitutes normal behavior for each individual animal (Ocepek, 2026).

The researchers also presented work involving depth cameras, alongside new models capable of classifying various types of behavior and posture, including exploration, play, aggression, and tail biting. The goal is not merely to count the frequency of a behavior, but also to understand behavioral sequences and context: what happens before and after play, exploration, or conflict? Over time, such analyses can provide a far richer picture of animal welfare than simple frequency counts alone.

Spots that reveal stress in salmon 

In the final part of the seminar, PhD candidate Talha Laique presented his work on melanin-based spots on the operculum of Atlantic salmon. Previous research has shown that these spots may be linked to stress responses and behavior, and the project investigates whether computer vision can be used to analyze these changes automatically.

Using detection and segmentation models, images of the salmon were analyzed before and after a controlled stress event. The results showed that the spots became lighter following the stressor, suggesting that such visual markers can provide relevant information about the fish's condition. This work illustrates how AI-based methods can also play an important role in fish welfare research. The study is published in the journal Fishes (Laique et al., 2026, "Quantification of Opercular Pigmentation Changes in Farmed Atlantic Salmon: A Novel Application for Computer Vision in Fish Welfare Assessment"). The general-purpose tool developed for image labeling and analysis has been made openly available on GitHub.

Domain expertise as a prerequisite for the tool

A recurring theme throughout the seminar was the role of AI as a tool. Before a model can recognize behavior, ethological expertise must form the foundation to define what should be observed, what is biologically relevant, and how the indicators should be interpreted.

When this tool is developed on a foundation of robust behavioral science, it makes research more precise, scalable, and relevant for practical animal welfare efforts.

The way forward

Andersen, Ocepek, and Laique are members of the research group Computational Ethology and Precision Animal Welfare, which combines classical behavioral and welfare science with neurobiology and computational methods to study animal welfare across species. The group is affiliated with the Faculty of Veterinary Medicine, the Faculty of Biosciences, and the Faculty of Chemistry, Biotechnology and Food Science, and is led by Professor Andrew M. Janczak. The group members collaborated on two separate grant applications for AI-based monitoring submitted for the Research Council of Norway spring 2026 deadline, and are part of the interdisciplinary collaboration arena DyreBar (Collaboration Arena for Sustainable Livestock Production, Animal Health and Animal Welfare). Both the research group and DyreBar work to develop new knowledge and tools for the early detection of health and welfare challenges in livestock.

The seminar concluded with a shared vision to foster stronger interdisciplinary research on AI, behavior, and animal welfare at NMBU, potentially in the form of a joint SFI (Centre for Research-based Innovation) application. The goal is to develop AI-based methods to identify and analyze behavioral, physiological, and physical indicators related to animal health, welfare, resilience, and disease. This work spans various species and academic disciplines, from pigs and cattle to farmed fish, and from ethology and neurobiology to sensor technology and machine learning. Through this approach, NMBU aims to contribute new knowledge and innovative tools for the future of livestock research.

Contributions

Andrew wrote the first draft of this article, Veslemøy Oma reviewed and edited the manuscript, and Marko, Inger Lise, and Talha contributed to final edits and revisions.

References

Ocepek, M., Žnidar, A., Lavrič, M., Škorjanc, D., & Andersen, I. L. (2022). DigiPig: First developments of an automated monitoring system for body, head and tail detection in intensive pig farming. Agriculture, 12(1), 2. https://doi.org/10.3390/agriculture12010002 

Ocepek, M. (2026). Diurnal and day-to-day movement patterns of finishing pigs on deep straw bedding during the last 20 d before slaughter. Journal of Animal Science, 104, skag122. https://doi.org/10.1093/jas/skag122 

Laique, T., Gunnes, M., Folkedal, O., Nilsson, J., Green, E. A. L., Gundersen, H. N., Øverli, Ø., & Ullah, H. (2026). Quantification of Opercular Pigmentation Changes in Farmed Atlantic Salmon: A Novel Application for Computer Vision in Fish Welfare Assessment. Fishes, 11(5), 271. https://doi.org/10.3390/fishes11050271 

Published - Updated