Automatic identification of individual animals is an important step in modern livestock production.With the development of machine vision,sheep face recognition as one of the sheep individual recognition methods has received wide attention.With the popularization of large-scale automated farming,the need for sheep face recognition has become more and more urgent,and the traditional recognition methods can no longer meet the production needs.In order to better serve the animal husbandry industry,in this thesis we develop a sheep face recognition model by deep transfer learning method,and achieve individual identity recognition through sheep face images.The specific work is as follows.1.Considering the unstable recognition effect caused by the single angle of sheep face images in the training set,five types of sheep face images were captured to extract more robust facial features.Thirty sheep face images of 1~2 years old were taken,and 1548 sheep face images were collected for one month.Since the small number of images could not be trained effectively in the later model,data augmentation was used to expand the dataset to facilitate the later training.2.The improved Faster-R-CNN model was used for sheep face detection,and the sheep face dataset was constructed from the collected sheep face images,and the feature pyramid network was added to the original model to enhance the extraction of features at different scales,and the cascade mechanism was introduced to better define the positive and negative samples.The results showed that the improved model achieved a detection accuracy of90.53%,an improvement of 5.03%,and the m AP value improved by 0.05.3.The Face Net deep learning model was selected as the migration network to build the sheep face recognition dataset,and the Inception-V2 with smaller convolutional kernel was used as the feature extraction network of the model after comparison,and the distance between positive and negative samples was calculated by ternary function to identify whether it was the same sheep,and the parameters were adjusted by fine-tuning to enhance the learning ability of the model by pre-training first,and further The convolutional attention module(CBAM)is introduced to improve the feature extraction ability of this model,and an improved Face Net-CBAM sheep face recognition model is established,mainly by embedding the CBAM attention module after the Face Net feature extraction network to enhance the focus on the key information and obtain better recognition results.The Face NetCBAM model is tested using 920 sheep face images with data enhancement as the dataset.The results show that the Face Net-CBAM-TL model achieves 97.23% accuracy for individual sheep face recognition,which is better than the 91.65% recognition accuracy of the original model,with an accuracy improvement of 5.83%.By comparing with the model after the introduction of the SE module,it is found to be a larger improvement than the 1.99%improvement of the improved Face Net-SE-TL model,and also better than the Face Net-fine tuning-TL,and the recognition accuracy of Face Net-CBAM is improved by 10.47 and 12.03 percentage points compared with Res Net-50 and Google Net models,respectively.4.Built a sheep face recognition control system,defined the functional and performance requirements of the system according to the actual needs,designed the recognition process of the system,and completed the system testing and analysis to verify the effectiveness of the system.The Face Net-CBAM-TL model proposed in this study achieved good recognition results with a smaller data set,and the proposed method is non-invasive and more beneficial to animal welfare,which meets the current needs of digital farm breeding integrating artificial intelligence,big data and remote automatic control. |