Abstract:Aiming to address the problem that posture variations in beef cattle have a considerable influence on the accuracy of automatic body size measurement, an automatic body size measurement method for beef cattle was proposed based on improved YOLO 11n – Pose and effective posture frame screening. Firstly, YOLO 11n – Pose was used as the baseline model. The SimAM attention mechanism was embedded, the ADown module was adopted to replace part of the stride convolution downsampling structures in the YOLO 11n – Pose backbone network, and a Pose_LQE localization quality estimation branch was introduced to enhance the local feature representation and localization quality evaluation capability of body size keypoints while reducing model complexity. Secondly, effective posture frames were screened from the collected RGB – D image data. Four posture reference variables, namely head pitch angle, head yaw angle, forelimb stride angle, and hindlimb stride angle, were defined, and an effective posture frame screening strategy was constructed to remove high-error-risk frames caused by head lifting, head lowering, head turning, and large deviations in forelimb and hindlimb stance. Finally, the three-dimensional coordinates of keypoints were recovered by using depth information, and body height, rump height, chest width, hook width, and hip width were automatically measured. To verify the effectiveness of the proposed method, dual-view RGB – D image data were collected from 130 fattening Simmental beef cattle, and a dataset containing 2 000 pairs of RGB – D images was constructed. The experimental results showed that the improved YOLO 11n – Pose model achieved mAP @0.5 and mAP@0.5:0.95 values of 96.8% and 93.8% , respectively, with 2.22×10? parameters and 5.73×10?. The frame rate and average inference time were 134.77 f/s and 7.42 ms, respectively. After effective posture frame screening, the relative errors of body height, rump height, chest width, hook width, and hip width were reduced to 1.95% , 1.32% , 1.73% , 1.76% , and 2.14% , respectively. The results indicated that the proposed method can reduce the influence of non-ideal postures on automatic body size measurement accuracy and provide technical support for non-contact automatic body size measurement of beef cattle in fixed-channel scenarios.