In recent years,face recognition technology has developed swiftly and face recognition systems are being extensively utilized in life.However,fake faces made by print and replay pose tremendous security risks to face recognition systems,and it becomes essential to judge the genuineness of faces.In this paper,the face detection algorithm based on deep learning is studied in depth.An unbalanced pyramid convolution combined with Local Binary Pattern(LBP)self-supervision branch for face anti-spoofing algorithm is proposed to address the problem that existing methods do not give enough importance to texture information.In order to meet the model lightweight requirement of face anti-spoofing,a face anti-spoofing algorithm with a lightweight self-supervision branch was designed based on Shuffle Net V2.Considering that efficiency and cost need to be balanced in the actual deployment process,the algorithm in this paper focuses on the identification of single frame images of monocular RGB cameras.The main work and contributions are as follows:(1)The face anti-spoofing algorithm based on unbalanced pyramid convolution and LBP self-supervision branch is designed.The algorithm is divided into a backbone network and an auxiliary self-supervision branch.The backbone network designed unbalanced pyramid convolution and global atrous spatial pyramid pooling to extract multi-scale features of the image.The network performance is improved by feature fusion,attention mechanism and focal loss function.The auxiliary selfsupervision branch uses LBP to extract image texture features as supervision information,and uses the mean square error loss function to optimize network parameters,which enhances the network’s ability to represent image texture features.For the two different loss functions generated by the backbone network and the auxiliary self-supervision branch,the homoscedastic uncertainty was introduced to unify the loss function for the first time to complete the classification task.Experimental results show that the proposed algorithm can increase the receptive field,make full use of shallow information and auxiliary supervision information,effectively reduce the classification error rate and improve the generalization performance.(2)Focus on specific business scenarios,design a lightweight algorithm in face anti-spoofing.Using real business images,a dataset of live detection containing photo attacks and replay attacks was constructed.Aiming at the lightweight requirements of field deployment,the lightweight LBP self-supervision branch was designed,and the lightweight live detection algorithm was designed based on Shuffle Net V2.The algorithm was evaluated by means of the open data set and the self-built live detection data set.The experimental results show that the algorithm has a relatively high detection performance while having a small number of parameters and computation,and can meet the business requirements.Finally,the algorithm is embedded into the face recognition system of a domestic technology company to complete the algorithm deployment and solve the face spoofing problem in the telecommunications business handling in a country in Africa. |