A modular open-source computer vision pipeline enables individual-level behavior analysis of group-housed pigs

Abstract Animal behavior analysis is central to understanding welfare, health, and productivity in livestock, yet manual observation is time-consuming, subjective, and difficult to scale. We present a modular pipeline that integrates open-source, state-of-the-art computer vision models to automate individual-level behavior analysis in group-housing environments. The pipeline does not introduce a new learning algorithm or training paradigm; instead, it combines existing zero-shot object detection, motion-aware segmentation and tracking, and vision-transformer feature extraction into a reproducible end-to-end workflow that isolates each animal from its background before behavior is recognized. This individual-level, background-independent design directly targets the poor cross-environment generalization that limits group-level approaches, and it addresses challenges such as occlusion and crowding in indoor pig monitoring. We validated the system on the Edinburgh Pig Behavior Video Dataset across detection, tracking, and behavior-classification tasks. A temporal model achieved 94.2% overall accuracy on nine behaviors, a 21.2 percentage-point improvement over the previous benchmark, while tracking reached 93.3% identity preservation (IDF1) and detection reached 89.3% average precision. The same pipeline, unchanged in structure, transfers across species and tasks: companion studies report 97.6% accuracy for calf play behavior and 98.3% for dairy-cow posture. By releasing an open-source, end-to-end implementation, this work provides a reproducible and scalable tool for automated, objective, and continuous behavior monitoring in precision livestock farming and welfare assessment.

Authors

Publication Details

Journal
Scientific Reports
Published
2026-08-24
DOI
https://doi.org/10.1038/s41598-026-67803-4
Primary Topic
Animal Behavior and Welfare Studies
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
article

A modular open-source computer vision pipeline enables individual-level behavior analysis of group-housed pigs

Jennifer Sun, Puchun Niu, Sébastien Franceschini, Meike van Leerdam et al.
Scientific Reports
Animal Behavior and Welfare Studies
article

A modular open-source computer vision pipeline enables individual-level behavior analysis of group-housed pigs

Jennifer Sun, Puchun Niu, Sébastien Franceschini, Meike van Leerdam, Haiyu Yang, Miel Hostens, Enhong Liu, Sumit Sharma
article en

Abstract

Abstract Animal behavior analysis is central to understanding welfare, health, and productivity in livestock, yet manual observation is time-consuming, subjective, and difficult to scale. We present a modular pipeline that integrates open-source, state-of-the-art computer vision models to automate individual-level behavior analysis in group-housing environments. The pipeline does not introduce a new learning algorithm or training paradigm; instead, it combines existing zero-shot object detection, motion-aware segmentation and tracking, and vision-transformer feature extraction into a reproducible end-to-end workflow that isolates each animal from its background before behavior is recognized. This individual-level, background-independent design directly targets the poor cross-environment generalization that limits group-level approaches, and it addresses challenges such as occlusion and crowding in indoor pig monitoring. We validated the system on the Edinburgh Pig Behavior Video Dataset across detection, tracking, and behavior-classification tasks. A temporal model achieved 94.2% overall accuracy on nine behaviors, a 21.2 percentage-point improvement over the previous benchmark, while tracking reached 93.3% identity preservation (IDF1) and detection reached 89.3% average precision. The same pipeline, unchanged in structure, transfers across species and tasks: companion studies report 97.6% accuracy for calf play behavior and 98.3% for dairy-cow posture. By releasing an open-source, end-to-end implementation, this work provides a reproducible and scalable tool for automated, objective, and continuous behavior monitoring in precision livestock farming and welfare assessment.

Scientific Reports
No poverty
Openalex Percentile: Top 8%
Animal Behavior and Welfare Studies
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.