| As a key pre-security measure of face recognition system,face anti-spoofing detection technology has become more and more important with the popularization of face recognition system.At present,most of the existing face anti-spoofing detection methods need the cooperation of users,or need additional devices.So these methods still have limitations.At the same time,the existing face anti-spoofing detection technology can only detect the authenticity of the face,it can not provide further specific face spoofing attack types for the forensics work.Aiming at the above two problems,this paper introduces the self-attention mechanism into the field of face anti-spoofing detection.Through the combination of self-attention mechanism and convolutional neural network,and the combination of self-attention mechanism and recurrent neural network,two fine-grained face anti-spoofing detection methods using only static RGB images are proposed to accurately identify face spoofing attacks and distinguish the specific type of attack.Firstly,a fine-grained face anti-spoofing detection method based on convolutional self attention mechanism is proposed.Aiming at the problem that the existing face anti-spoofing detection methods cannot effectively extract long-distance features in face images,the self-attention mechanism is introduced into the field of face anti-spoofing,and the convolution operation is used to optimize it.First of all,the convolution operation is used to extract the local features of the image,and then the correlation between the internal features of the image is calculated by combining the self attention mechanism.In the long range,the features with high correlation in the image are fused,so as to correlate and use the long distance features in time.Experiments are carried out on OULU,Si W,Ce FA and WMCA datasets,and the accuracy is nearly 100% in the best case and 89% in the worst case.In addition,on the basis of better accuracy than the baseline method,it also has the ability to further distinguish the attack type.This verifies the effectiveness of the proposed method.Then,this paper proposes a face anti-spoofing detection method based on recursive self attention mechanism and multi-scale fusion.Aiming at the above problem that it is difficult to train due to the large number of parameters,this method introduces the design idea of recurrent neural network into the self attention mechanism,and combines multiple self attention blocks with shared weights in the form of recursion to deepen the depth of the model under the premise of reducing the number of model parameters.Moreover,the dilated convolution is combined with the self attention mechanism.By using the dilated convolution with different dilated coefficients,the output of the dilated convolution is weighted and summed,which provides the ability of multi-scale fusion for the self attention mechanism.Experiments are carried out on three datasets Ce FA,WMCA and Hi Fi Mask.The accuracy is close to 100% in the best case and 91% in the worst case,and the number of model parameters is reduced by about 50% compared with the previous method,which verfies the effectiveness of the proposed method. |