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
- Johannes Baumgartner (ORCID: https://orcid.org/0000-0001-8555-1378)
- T.B. Rodenburg (ORCID: https://orcid.org/0000-0002-3371-1461)
- Martijn Bouwknegt (ORCID: https://orcid.org/0000-0002-3446-5338)
- Kristina Maschat (ORCID: https://orcid.org/0000-0002-8295-9180)
- Sagar Kalburgi
- R.E. Klont (ORCID: https://orcid.org/0000-0001-6395-3229)
- Christina Pfeiffer (ORCID: https://orcid.org/0000-0002-9158-5563)
- Christoph Bonk
- Alexander Voß
- T. Bas. Rodenburg
Institutions
- University of Veterinary Medicine Vienna (AT)
- Utrecht University (NL)
- Vion Food Group (Netherlands) (NL)
- Wageningen University & Research (NL)
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
- European Commission
- HORIZON EUROPE Framework Programme