| With the rise of the agricultural industry recent years,livestock farming is developing in the direction of large-scale breeding and precision management,to realize this,intelligence farming has become an inevitable choice,which is based on accurately identify the individual identities of livestock and establish a database in the process of livestock breeding.In general,farms use invasive identification methods such as ear tags,ear plates and spraying to distinguish the identity of livestock,which can easily cause problems such as biting of tags,diseases and unattractive appearance.Non-invasive biometric identification methods have great advantages over traditional methods,both in terms of cost and security.In the field of individual identification,more and more researchers are using deep learning methods,which have higher accuracy and robustness compared with traditional individual identification techniques.Therefore,this paper adopts a non-invasive biometric approach to pig face recognition based on deep learning,and the main research contents are as follows.(1)Production of a pig image dataset and a pig face image dataset.At present,there is no public dataset related to pigs.In this paper,the video data of 15 pigs collected from large farms and the video data of pigs in the JDD2017 competition are selected to make a related dataset,in which the dataset for detection contains about 23000 images of pigs and the dataset for pig face recognition contains 100000 images of pigs’ faces.(2)An improved pig face detection algorithm is proposed based on the Center Net network model for face detection.Res Net18 is used as the backbone feature extraction network,and hole convolution is introduced to improve the convolutional layer structure of the network,enhance the perceptual field of the network,and improve the accuracy of the network detection.The experimental results show that the method has strong robustness in various environments,including detection accuracy of 96.5% and detection time of 27 ms.(3)For the pig face recognition problem,an individual identity recognition algorithm based on Face Net network model with residual depth-separable convolution is proposed.The model combines the residual structure and the depth-separable convolution module to build a pig face feature extraction network,which greatly reduces the parameter size of the model,and adds Cross-Entropy Loss to the training network to assist Triplet Loss.The experimental results show that the loss function based on metric learning is better than the loss function based on classification features for pig face recognition,and the method achieves 94.9% recognition accuracy while greatly reducing the parameter size.(4)Pig face detection and pig face recognition software was designed and developed based on PyQT5 platform.The software has a complete graphical interface,which can realize the functions of file operation,identity registration,individual recognition and result display. |