Abstract:Key point detection of sheep faces was regarded as a fundamental step for sheep face recognition, facial expression analysis, and head posture estimation.To address the challenges posed by variable orientations and inconsistent scales of sheep faces in natural breeding environments, an improved YOLO v8n-pose network model, named YOLO v8n-DCL-pose, was proposed.This model significantly improved the detection accuracy of key points on multi-view and multi-scale sheep faces while maintaining a lightweight structure.Specifically, several enhancements were made: firstly, an improved deformable convolution module, DCA, was employed to replace the original c2f module.A dynamic sampling mechanism was utilized to enhance the model's adaptability to sheep face deformations and varying scales.Secondly, a 160 pixel×160 pixel small-object detection layer was added at the feature fusion stage to strengthen the model's ability to detect key points on small-scale, long-distance sheep faces.Finally, a lightweight asymmetric decoupled head (LADH-Head) was adopted, in which the original coupled detection head was decomposed into separate branches for classification, regression, and IoU prediction, thereby improving the precision of key point detection.Experiments on a self-built dataset showed that the improved YOLO v8n-DCL-pose model increased the parameter size by only 6×10^5, while maintaining computational efficiency.The overall AP was improved by 5.2 percentage points, mAP50 by 5.1 percentage points, and mAP95 by 9.9 percentage points compared with that of the original model, demonstrating superior performance in key point detection.These results indicated that the proposed YOLO v8n-DCL-pose model served as an effective key point extractor, which was capable of providing critical feature support for downstream tasks such as sheep face recognition.