Abstract:With the intelligent development of animal husbandry, computer-vision-based individual cattle recognition is playing an increasingly important role in modern cattle farming. However, in practical applications, the rapid changes in the angles of cattle faces, frequent fluctuations in the number of cattle, and limitations in model recognition speed severely affect the accuracy and efficiency of recognition. To address these challenges, an individual recognition method for Simmental cattle was proposed based on improved YOLO v8 keypoint detection. The method consisted of two stages: in the cattle face detection stage, the improved YOLO v8 model automatically detected keypoints in cattle face images and performed correction alignment and background cropping to make the angles of the cattle face images more consistent. In the cattle face recognition stage, depthwise separable convolution was firstly introduced to reduce the number of parameters, and then residual connections and attention mechanisms were utilized to enhance the model’s feature extraction capabilities, thereby improving recognition accuracy and speed. To validate the effectiveness of the method, a dataset of cattle face images containing 159 Simmental cattle was constructed. Experimental results showed that the proposed model had significant improvements in the number of parameters and inference speed, with processing time for a single image reduced to within 39ms and a recognition accuracy of 95.8%, an average improvement of 4.8 percentage points compared with that of other models. Additionally, the proposed method supported real-time updates to the cattle database, maintaining high accuracy even after adding new cattle face images.