Automated Pig Body Length Measurement via Enhanced Keypoint Detection and Posture-Aware Correction
Accurate and repeatable pig body length measurement is important for phenotypic assessment and genetic evaluation. However, posture variation can reduce the reliability of measurements obtained from three-dimensional point clouds. This study proposes an Enhanced Keypoint Detection and Posture-Aware Correction (EKD-PAC) framework for automated pig body length measurement. The framework employs a Point Transformer encoder–decoder network enhanced with Efficient Channel Attention to extract multiscale geometric features from dorsal point clouds, while joint semantic segmentation and boundary prediction are used to identify candidate regions for body length keypoints. Contour constraints are further applied to refine the detected keypoints and fit the dorsal midline for body length calculation. Based on the detected keypoints, posture-related geometric features were used to correct measurement deviations. For keypoint candidate region detection, EKD-PAC achieved a pointwise classification accuracy of 97.05% and a mean intersection over union (mIoU) of 77.40%. Final keypoint localization achieved a mean absolute error (MAE) of 11.24 mm, demonstrating the ability of EKD-PAC to capture anatomically meaningful keypoints from point clouds with different postures. Compared with manual measurements, the posture-corrected body length estimates achieved an MAE of 30.5 mm and a mean relative error (MRE) of 2.40%, demonstrating the effectiveness of the proposed framework.
Authors
- Xiying Li (ORCID: https://orcid.org/0000-0002-4753-8022)
- Heng Liu (ORCID: https://orcid.org/0000-0003-3937-4985)
- Yuqing Zou
- Mai He
Institutions
- Sun Yat-sen University (CN)
Publication Details
- Journal
- Animals
- Published
- 2026-12-01
- DOI
- https://doi.org/10.3390/ani16233823
- Primary Topic
- Smart Agriculture and AI
- Type
- article
- Field-Weighted Citation Impact
- 0.00