| As a biometric identification,facial recognition has the characteristics of safety,reliability,and convenient collection.The application of facial recognition technology to realize identity recognition in pig breeding will obtain the advantages of high efficiency,non-contact and no stress that traditional methods do not have.Due to the specificity of the biological characteristics of pig faces and the difference of environmental factors in application scenarios,the direct application of existing facial recognition technology to pig face recognition is often not ideal.Against these characteristics of pig facial recognition tasks,this article aims to build a set of facial recognition processes based on facial recognition technology to realize accurate and reliable recognition of pig faces.The face recognition process is mainly composed of face detection algorithm and face recognition algorithm.Against these two algorithms,the main work of this paper is as follows:1.Pig face recognition system.This paper studies the current research status of pig facial recognition and classic facial recognition algorithms,and proposes a feasible pig facial recognition system process.2.Pig face dataset.This paper produces a face detection data set with annotation information,a total of 1000 images,and produces an aligned face recognition data set with identity information,a total of 290 identities to complete the experiment.3.Improved face detection algorithm based on Retina Face.Based on the characteristics of pig facial structure,this paper designs a three-point key point annotation method to solve the problem of inaccurate key point positioning,and designs a mask multi-task to solve the problem of background noise affecting subsequent recognition tasks.The ablation experiment proves that the improvement measures are effective.Compared with the classic face detection algorithm,the experimental results prove that the improved face detection algorithm based on Retina Face is more effective and instrumental to achieve better results in subsequent recognition.This paper designs a model deployment method with NCNN framework to implement model conversion and inference post-processing code.Experiments prove that the algorithm in this paper can be inferred in real time on mobile devices.4.Improved facial recognition algorithm based on Arc Face.For the biological characteristics of pigs and the characteristics of the data set,this paper designs a difficult sample mining method to solve the problem of insufficient learning of difficult samples,and designs a Multi-Head structure based on migration learning to alleviate the problem of insufficient data set size,and proves the improvement through ablation experiments The measures are effective.Compared with the classic facial recognition algorithm,the experimental results prove that the improved facial recognition algorithm based on Arc Face is more effective. |