Simple SummaryThe accurate identification of individual animals is an important step in precision breeding. However, the traditional identification methods have large defects. With the continuous development of computer vision and deep learning technologies, it is possible to establish accurate biological recognition models. In this study, we built a lightweight sheep face recognition model using convolutional neural networks (CNNs) to face the challenges in sheep identity recognition. The model not only achieved high accuracy in recognition tasks but also was friendly for edge devices. The research results indicate that the proposed recognition model can identify sheep accurately and can be further deployed on the mobile end.AbstractThe accurate identification of sheep is crucial for breeding, behavioral research, food quality tracking, and disease prevention on modern farms. As a result of the time-consuming, expensive, and unreliable problems of traditional sheep-identification methods, relevant studies have built sheep face recognition models to recognize sheep through facial images. However, the existing sheep face recognition models face problems such as high computational costs, large model sizes, and weak practicality. In response to the above issues, this study proposes a lightweight sheep face recognition model named LSR-YOLO. Specifically, the ShuffleNetv2 module and Ghost module were used to replace the feature extraction module in the backbone and neck of YOLOv5s to reduce floating-point operations per second (FLOPs) and parameters. In addition, the coordinated attention (CA) module was introduced into the backbone to suppress non-critical information and improve the feature extraction ability of the recognition model. We collected facial images of 63 small-tailed Han sheep to construct a sheep face dataset and further evaluate the proposed method. Compared to YOLOv5s, the FLOPs and parameters of LSR-YOLO decreased by 25.5% and 33.4%, respectively. LSR-YOLO achieved the best performance on the sheep face dataset, and the mAP@0.5 reached 97.8% when the model size was only 9.5 MB. The experimental results show that LSR-YOLO has significant advantages in recognition accuracy and model size. Finally, we integrated LSR-YOLO into mobile devices and further developed a recognition system to achieve real-time recognition. The results show that LSR-YOLO is an effective method for identifying sheep. The method has high recognition accuracy and fast recognition speed, which gives it a high application value in mobile recognition and welfare breeding.