Internal and external validation of computer vision-based algorithms for tail length measurement in finishing pigs at slaughterhouses

Introduction Reliable, high-throughput indicators of pig welfare at slaughter are needed to benchmark tail docking practices and detect tail-biting retrospectively at the farm level. Measuring tail length on a continuous scale offers better information than categorical scoring but requires automated, validated tools that operate robustly in commercial slaughterhouses. The objective of the study was to develop, compare, and validate—internally and externally—real-time CV algorithms that estimated pig tail length as a continuous variable at the slaughter line. Methods A camera system, comprising stereo 3D and 2D color cameras, was installed in two European slaughterhouses. A deep learning model segmented tails on carcasses. Subsequently three geometric centerline methods (A, B, C) were applied to estimate tail length in cm. Manually measured postmortem tail length served as the reference. Internal validation used 686 carcasses at slaughterhouse A; external validation used 434 carcasses at slaughterhouse B. Results Performance was assessed by mean absolute error, Bland–Altman bias and limits of agreement against a prespecified interchangeability margin of ±2.00 cm, and Spearman rank correlations. Tail segmentation achieved high accuracy (precision and recall ≈ 0.98). Internally, the reference mean tail length was 20.2 cm. Method A had the lowest mean absolute error (1.63 cm) and minimal bias (+0.20 cm), while Method C showed mean absolute error of 2.31 cm with modest underestimation (−1.72 cm); rank correlations with the reference were high (0.93–0.96). Externally, where tails were shorter on average (11.7 cm), Method C performed best (mean absolute error 2.88 cm; bias −0.86 cm), yet all methods fell outside the interchangeability margin and correlations with the reference were lower (0.49–0.66). Discussion Likely causes of reduced translatability included camera angle constraints, lens soiling, and line-speed variation. Automated, real-time measurement of pig tail length at slaughter was feasible and showed good internal performance, but current systems were not yet interchangeable with manual measurements across sites. Standardized hardware configurations, improved calibration to handle short tails and variable geometries, harmonized data-collection protocols, and prospective multicenter validation are needed before deployment for cross-site benchmarking and regulatory use.

Authors

Institutions

Publication Details

Journal
Frontiers in Animal Science
Published
2026-11-24
DOI
https://doi.org/10.3389/fanim.2026.1968278
Primary Topic
Smart Agriculture and AI
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Internal and external validation of computer vision-based algorithms for tail length measurement in finishing pigs at slaughterhouses

Johannes Baumgartner, T.B. Rodenburg, Martijn Bouwknegt, Kristina Maschat et al.
Frontiers in Animal Science
Smart Agriculture and AI
article

Internal and external validation of computer vision-based algorithms for tail length measurement in finishing pigs at slaughterhouses

Johannes Baumgartner, T.B. Rodenburg, Martijn Bouwknegt, Kristina Maschat, Sagar Kalburgi, R.E. Klont, Christina Pfeiffer, Christoph Bonk, Alexander Voß, T. Bas. Rodenburg
article en

Abstract

Introduction Reliable, high-throughput indicators of pig welfare at slaughter are needed to benchmark tail docking practices and detect tail-biting retrospectively at the farm level. Measuring tail length on a continuous scale offers better information than categorical scoring but requires automated, validated tools that operate robustly in commercial slaughterhouses. The objective of the study was to develop, compare, and validate—internally and externally—real-time CV algorithms that estimated pig tail length as a continuous variable at the slaughter line. Methods A camera system, comprising stereo 3D and 2D color cameras, was installed in two European slaughterhouses. A deep learning model segmented tails on carcasses. Subsequently three geometric centerline methods (A, B, C) were applied to estimate tail length in cm. Manually measured postmortem tail length served as the reference. Internal validation used 686 carcasses at slaughterhouse A; external validation used 434 carcasses at slaughterhouse B. Results Performance was assessed by mean absolute error, Bland–Altman bias and limits of agreement against a prespecified interchangeability margin of ±2.00 cm, and Spearman rank correlations. Tail segmentation achieved high accuracy (precision and recall ≈ 0.98). Internally, the reference mean tail length was 20.2 cm. Method A had the lowest mean absolute error (1.63 cm) and minimal bias (+0.20 cm), while Method C showed mean absolute error of 2.31 cm with modest underestimation (−1.72 cm); rank correlations with the reference were high (0.93–0.96). Externally, where tails were shorter on average (11.7 cm), Method C performed best (mean absolute error 2.88 cm; bias −0.86 cm), yet all methods fell outside the interchangeability margin and correlations with the reference were lower (0.49–0.66). Discussion Likely causes of reduced translatability included camera angle constraints, lens soiling, and line-speed variation. Automated, real-time measurement of pig tail length at slaughter was feasible and showed good internal performance, but current systems were not yet interchangeable with manual measurements across sites. Standardized hardware configurations, improved calibration to handle short tails and variable geometries, harmonized data-collection protocols, and prospective multicenter validation are needed before deployment for cross-site benchmarking and regulatory use.

Frontiers in Animal ScienceVol. 7
University of Veterinary Medicine Vienna (AT), Utrecht University (NL), Vion Food Group (Netherlands) (NL), Wageningen University & Research (NL)
European Commission, HORIZON EUROPE Framework Programme
Zero hunger
Smart Agriculture and AI
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.

Laika access coming soon