Benchmarking pig detection and tracking under diverse and challenging conditions

To ensure animal welfare and effective management in pig farming, monitoring individual behavior is a crucial prerequisite. While monitoring tasks have traditionally been carried out manually, advances in machine learning have made it possible to collect individualized information in an increasingly automated way. Central to these methods is the localization of animals across space (object detection) and time (multi-object tracking). Despite extensive research of these two tasks in pig farming, a systematic benchmarking study has not yet been conducted. In this work, we address this gap by curating two datasets: PigDetect for object detection and PigTrack for multi-object tracking. The datasets are based on diverse image and video material from realistic barn conditions, and include challenging scenarios such as occlusions or bad visibility. For object detection, we show that challenging training images improve detection performance beyond what is achievable with randomly sampled images alone. Comparing different approaches, we found that state-of-the-art models offer substantial improvements in detection quality over real-time alternatives. For multi-object tracking, we observed that SORT-based methods achieve superior detection performance compared to end-to-end trainable models. However, end-to-end models show better association performance, suggesting they could become strong alternatives in the future. We also investigate characteristic failure cases of end-to-end models, providing guidance for future improvements. The detection and tracking models trained on our datasets perform well in unseen pens, suggesting good generalization capabilities. This highlights the importance of high-quality training data. The datasets and research code are made publicly available to facilitate reproducibility, re-use and further development. • We developed a diverse and challenging benchmark dataset for pig detection and tracking. • We evaluated state-of-the-art methods, revealing their strengths, weaknesses, and areas for improvement. • Our models generalize well to unseen pens, highlighting the importance of high-quality training data. • Our benchmark datasets enable systematic method comparison and monitoring of capabilities of new methods.

Authors

Institutions

Publication Details

Journal
Computers and Electronics in Agriculture
Published
2025-12-01
DOI
https://doi.org/10.1016/j.compag.2025.111264
Citations
4
Primary Topic
Animal Behavior and Welfare Studies
Type
article
Field-Weighted Citation Impact
9.42
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Benchmarking pig detection and tracking under diverse and challenging conditions

Thomas Kneib, Ramin Yahyapour, Christian Post, Imke Traulsen et al.
4 citations
Computers and Electronics in Agriculture
Animal Behavior and Welfare Studies
9.42
article

Benchmarking pig detection and tracking under diverse and challenging conditions

Thomas Kneib, Ramin Yahyapour, Christian Post, Imke Traulsen, Jonathan Henrich, Maximilian Zilke, Parth Shiroya, Emma Chanut, Amir Mollazadeh Yamchi
article en
4 citations

Abstract

To ensure animal welfare and effective management in pig farming, monitoring individual behavior is a crucial prerequisite. While monitoring tasks have traditionally been carried out manually, advances in machine learning have made it possible to collect individualized information in an increasingly automated way. Central to these methods is the localization of animals across space (object detection) and time (multi-object tracking). Despite extensive research of these two tasks in pig farming, a systematic benchmarking study has not yet been conducted. In this work, we address this gap by curating two datasets: PigDetect for object detection and PigTrack for multi-object tracking. The datasets are based on diverse image and video material from realistic barn conditions, and include challenging scenarios such as occlusions or bad visibility. For object detection, we show that challenging training images improve detection performance beyond what is achievable with randomly sampled images alone. Comparing different approaches, we found that state-of-the-art models offer substantial improvements in detection quality over real-time alternatives. For multi-object tracking, we observed that SORT-based methods achieve superior detection performance compared to end-to-end trainable models. However, end-to-end models show better association performance, suggesting they could become strong alternatives in the future. We also investigate characteristic failure cases of end-to-end models, providing guidance for future improvements. The detection and tracking models trained on our datasets perform well in unseen pens, suggesting good generalization capabilities. This highlights the importance of high-quality training data. The datasets and research code are made publicly available to facilitate reproducibility, re-use and further development. • We developed a diverse and challenging benchmark dataset for pig detection and tracking. • We evaluated state-of-the-art methods, revealing their strengths, weaknesses, and areas for improvement. • Our models generalize well to unseen pens, highlighting the importance of high-quality training data. • Our benchmark datasets enable systematic method comparison and monitoring of capabilities of new methods.

Computers and Electronics in AgricultureVol. 241
Christian-Albrechts-Universität zu Kiel (DE), Gesellschaft für wissenschaftliche Datenverarbeitung mbH Göttingen (DE), University of Göttingen (DE)
Openalex Percentile: Top 2%
Animal Behavior and Welfare Studies
9.42
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.