YOLOv8-DMC: Enabling Non-Contact 3D Cattle Body Measurement via Enhanced Keypoint Detection
Accurate and non-contact measurement of cattle body dimensions is essential for precision livestock management. This study presents YOLOv8-DMC, a lightweight deep learning model optimized for anatomical keypoint detection in side-view images of cattle. The model integrates three attention modules-DRAMiTransformer, MHSA-C2f, and CASimAM-to improve robustness under occlusion and lighting variability. Following keypoint prediction, a 16-neighborhood depth completion and pass-through filtering process are applied to generate clean, colored point clouds. This enables precise 3D localization of keypoints by matching them to valid depth values. The model achieves [email protected] of 0.931 and AP@[0.50:0.95] of 0.868 on a dataset of over 7000 images, improving baseline accuracy by 2.14% and 3.09%, respectively, with only 0.35 M additional parameters and 0.9 GFLOPs in complexity. For real-world validation, strictly lateral-view RGB-D images from 137 cattle were collected, with ground-truth manual measurements. Compared with manual measurements, the average relative errors are 2.43% for body height, 2.26% for hip height, 3.65% for body length, and 4.48% for cannon circumference. The system supports deployment on edge devices, providing an efficient and accurate solution for 3D cattle measurement in real-world farming conditions.
Authors
- Caili Gong (ORCID: https://orcid.org/0000-0001-9840-8044)
- Zhi Weng (ORCID: https://orcid.org/0000-0001-8102-6875)
- Wenwen Hao
- Zhiqiang Zheng (ORCID: https://orcid.org/0009-0007-8059-4513)
Institutions
- Inner Mongolia University (CN)
- Ministry of Agriculture and Rural Affairs (CN)
- Institute of Grassland Research (CN)
Publication Details
- Journal
- Animals
- Published
- 2025-09-19
- DOI
- https://doi.org/10.3390/ani15182738
- Primary Topic
- Animal Behavior and Welfare Studies
- Type
- article
- Field-Weighted Citation Impact
- 0.00