Objective To quickly, efficiently, and accurately measure beef cattle body size, and design a lightweight automatic measurement strategy for cattle body size.
Method Based on a self-built dataset of cattle side-view images and using YOLO11n-pose as the baseline model, the RepGhost (reparameterization), CoT (context information fusion), and SaE modules were introduced. We proposed RCS-YOLO (RepGhost-CoT-SaE-YOLO), a lightweight strategy for cattle body size keypoint detection. Based on RCS-YOLO we obtained 11 key body size points, including the highest point of the withers, ground contact point of the front hoof, sternum base point, posterior edge point of the withers, the lowest point of the abdomen, lumbar vertebrae point, dorsal cross point, posterior edge point of the ischial tuberosity, anterior edge point of the shoulder, endpoints of the left front cannon bone. Using coordinate transformation algorithms between keypoint pixel values and actual values, along with specific body size formulas, we realized the automated measurement of seven body size parameters: Body height, body slanting length, chest depth, abdominal depth, withers height, rump length, and cannon circumference.
Result Experiments on the self-built dataset showed that compared to the original baseline model, RCS-YOLO achieved 45.8% reduction in parameter size, 53.6% in computational cost, and 43.1% in model size while maintaining model accuracy. The average error between predicted and manually annotated keypoints was 8.2 pixels, and the overall average relative error of the model measurement and manual measurement for various parameters was 3.7%.
Conclusion The RCS-YOLO model can rapidly, efficiently, and cost-effectively automate cattle body size data measurement. It meets the data requirements for cattle breeding and is well-suited for practical deployment in local beef cattle farm settings.