| Monitoring equipment has become the basic facility of sheep farms.Based on computer vision technology to detect sheep faces,and then identify different sheep,it has become one of the solutions for intelligent identification in the field of intelligent breeding.In this study,the existing animal detection and recognition models are large in size and lack the research work of lightweight models as the research background,and the dairy goat and Tan sheep are the research objects.Using the real-time video stream data obtained by the camera,the video sheep face recognition work is carried out.Firstly,the sheep face area is marked by the sheep face detection model,and then the individual classification and recognition is realized through the sheep face recognition model,and a feasible and effective sheep face recognition method under real-time video surveillance is obtained.Aiming at the problem that sheep faces have a large similarity,and the probability of misclassification of sheep faces of a single color in longdistance scenes is higher and difficult to distinguish,the main research contents and results are as follows:(1)Research on the construction method of the lightweight sheep face detection model G-Retina Face.Aiming at the problems of low detection accuracy and large scale of the detection model due to the presence of sheep’s side faces in the video,this study constructed a lightweight sheep face detection model G-Retina Face.Firstly,the key points of the sheep face are designed according to the facial features and positional relationship of the sheep face region,then the parameter scale of the Retina Face detection model is optimized by using the lightweight Ghost Net network and the improved multi-task loss function,and finally the lightweight sheep face is constructed.Detection model G-Retina Face.Compared with the Retina Face model,the F1 score of the G-Retina Face model is improved by 1.10%,the running time is 181 milliseconds faster,and the model size is reduced by 107.1MB.The experimental results show that the G-Retina Face model can better carry out the side face culling of sheep face detection in videos and pictures according to the positional relationship and distance of sheep face key points,and can provide technical support for real-time sheep face detection and recognition.(2)Research on the construction method of the lightweight sheep face recognition model ECAS-MFC.Aiming at the problem that the high similarity of sheep leads to low accuracy of long-distance recognition,this study constructed a lightweight sheep face recognition model ECAS-MFC.Firstly,an Efficient channel and spatial attention(ECAS)module that integrates spatial information is constructed according to the sheep face contour and facial features.Then,by introducing the ECAS module into the deep feature extraction layer of the Mobile Face Net network,a lightweight sheep face recognition is constructed.Model ECAS-MFC.Compared with the Mobile Face Net model,the recognition rate of the ECAS-MFC model in the open set verification is increased by 7.21%,the recognition rate in the closed set verification is increased by 2.61%,and the model size is reduced by 0.3MB.The experimental results show that the ECAS-MFC model has a higher recognition rate,the model is more lightweight,and has a better effect on individual sheep recognition for sheep face recognition tasks with smaller inter-class distances.Based on the above research,this paper designs an effective and stable lightweight sheep face recognition method,which can realize sheep face recognition under video surveillance in real scenarios,and can provide solutions for intelligent breeding of sheep farms. |