Face liveness detection method based on color space fusion and recurrent neural network

By using color space fusion and recurrent neural network methods in face liveness detection, combined with rPPG signals, the problem of low detection accuracy of cross-dataset and multi-dimensional face forgery attacks is solved, and high-precision and highly practical human face detection is achieved. Face liveness detection.

CN114519897BActive Publication Date: 2024-09-24CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111663546.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2024-09-24
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

Existing face liveness detection algorithms have low detection accuracy in cross-dataset and multi-dimensional face forgery attacks. It is especially difficult to effectively identify finely crafted mask-like forged faces and cross-dataset forged face attacks.

Method used

A face liveness detection method based on color space fusion and recurrent neural network is used to construct a new color space by segmenting the face area and background area of ​​the original video, and uses the LSTM network combined with the rPPG signal to detect the face liveness, reducing the external environment. reduce the impact of environmental noise and improve detection accuracy.

Benefits of technology

It achieves stable and high-precision detection under multi-dimensional forged face attacks, enhances illumination robustness, and improves the accuracy and practicality of live face detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114519897B
    Figure CN114519897B
Patent Text Reader

Abstract

The present invention claims a method for face liveness detection based on color space fusion and recurrent neural network, and relates to the field of biological liveness detection technology. The present invention includes fusing a new color space; constructing a face liveness detection LSTM network; inputting the color features of a fake face attack video of a public data set into the constructed LSTM for training; and using the newly fused color space and the trained network model for face liveness detection. The face liveness detection algorithm proposed in the present invention can directly perform face liveness detection on the content captured by the camera, and can achieve accurate detection under two-dimensional fake face attacks and finely crafted three-dimensional fake face attacks, solving the problem of low stability of face liveness detection under multi-dimensional, cross-dataset fake face attacks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of biometric authentication and anti-counterfeiting, and specifically relates to a face liveness detection method based on color space fusion and recurrent neural network. Background Art

[0002] With the advent of the artificial intelligence era, people have begun to use their own biological characteristics as identity identification, making identity identification more convenient and secure. Among biometrics, face recognition accounts for a large proportion due to its advantages of low cost and no need to maintain equipment. With the development of face detection and recognition technology, face recognition has been widely used in daily life areas such as face payment, access control systems, and attendance systems.

[0003] A fake face attack is an attack on a face recognition system. It attempts to make the face recognition system authenticate an illegal user as a legitimate user by presenting a fake version of the legitimate user's face to the camera, thereby allowing the illegal user to gain the trust of the face recognition system.

[0004] Generally speaking, fake face attacks can be divided into two categories: two-dimensional fake face attacks and three-dimensional fake face attacks. Two-dimensional fake face attacks include photo attacks and video attacks. Photo attacks refer to illegal users printing out photos or pictures of legitimate users or displaying them on electronic devices to gain the trust of the face recognition system. Video attacks refer to illegal users using videos containing legitimate users' facial information to gain the trust of the face recognition system. Three-dimensional fake face attacks mainly refer to illegal users using various materials (such as silicone and latex) to make 3D face masks of legitimate users and gain the trust of the face recognition system by wearing 3D face masks.

[0005] In recent years, although people have conducted a lot of research on face liveness detection, there is still room for improvement in the existing face liveness detection algorithms in cross-dataset and multi-dimensional forged face attacks. Existing face liveness detection algorithms include LBP, LBP-TOP, Markov and other methods based on manual features, which mainly use the designed texture features to distinguish between real faces and forged face attacks; there are detection methods based on deep learning, such as CNN, CNN+LSTM, Deep Tree Net, etc., which use neural networks to learn the difference between real faces and forged faces to judge forged face attacks; there are methods based on life information (such as rPPG method), which use the life information unique to real faces to distinguish between real faces and forged face attacks. These methods have high detection accuracy when detecting two-dimensional or three-dimensional forged face attacks alone, but the detection accuracy is low in multi-dimensional and cross-dataset tests.

[0006] Face liveness detection includes the detection of two-dimensional and three-dimensional fake face attacks. The detection method using mixed features (first detecting two-dimensional fake face attacks and then detecting three-dimensional fake face attacks) can achieve higher detection accuracy in multi-dimensional fake face attacks, but it takes a long time and is not conducive to practical use. The use of deep learning methods requires a variety of data for training. During the learning process, the generalization ability of the model tends to decrease. Therefore, solving the problem of cross-dataset and multi-dimensional fake face attacks is currently a hot topic in the field of face liveness detection.

[0007] Application Publication No. CN105354554A, a face liveness detection method based on color and singular value features, mainly solves the problems of complex calculation and low recognition rate of existing face authenticity recognition technology. Its implementation steps are: 1) mark the positive and negative samples of the face database and divide it into a training set and a test set; 2) divide the training set face images into blocks, and batch extract the color features and singular value features of the small blocks of the training set; 3) normalize the extracted feature vectors and send them to the support vector machine classifier for training to obtain a training model; 4) extract features from the test set data, use the training model to predict its features, and obtain the classification results. The present invention improves the classification efficiency and obtains a higher classification effect, which can be used for face authenticity detection in social networks or real life. The method trains and predicts the extracted color features through a support vector machine, and it is difficult to successfully detect finely crafted mask-type forged face attacks, because mask-type forged faces have feature information that is extremely similar to real faces. The present invention combines the pulse characteristics (rPPG signals) unique to real faces to perform face liveness detection, and has a high detection accuracy rate in three-dimensional forged face attacks.

[0008] CN111881815A, a method for face liveness detection by multi-model feature migration, by constructing and fusing heterogeneous data sets, adopting a multi-model feature migration method under multiple color spaces for liveness training, and improving the accuracy and generalization ability of the liveness detection model. The specific method is that in the training stage, the visible light images on the open source or private data sets are fused, and after face detection, alignment, and cropping, the RGB model and the YUV model are trained separately until the model converges; in the prediction stage, the collected visible light images are input into the trained RGB model and the YUV model respectively, and the results of the two models are obtained respectively, and the final score is obtained by the model score fusion strategy, and finally the liveness detection result is judged according to the score. The method has good generalization performance and high precision, and is suitable for industrial deployment. The method performs face liveness detection by a multi-model feature migration method under multiple color spaces, which can well avoid the influence of light on the detection results, but it has difficulty in detecting finely crafted mask-type forged face attacks and cross-dataset forged face attacks. The present invention can also avoid the influence of external lighting on the detection results through color space fusion, and the method combines the pulse characteristics (rPPG signal) unique to real faces to perform face liveness detection, and also has a high detection accuracy in multi-dimensional and cross-dataset forged face attacks. Summary of the invention

[0009] The present invention aims to solve the above problems of the prior art. A method for directly using the original video for face liveness detection is proposed, which does not require preprocessing of the image in the video, and is in line with actual application scenarios. At the same time, a face liveness detection method based on color space fusion and recurrent neural network has stable and high detection accuracy under cross-dataset and multi-dimensional forged face attacks. The technical solution of the present invention is as follows:

[0010] A method for face liveness detection based on color space fusion and recurrent neural network, comprising the following steps:

[0011] Perform face detection on each frame of the original video and segment the face area and background area in the image;

[0012] The new color space is constructed by using the correlation of rPPG signals between the face area and the background area.

[0013] Perform face detection on each frame of input image and segment the face area and background area in the image; convert the segmented image from RGB color space to HSV and YCbCr color space and segment it into 9 color channels, perform Fourier transform on each color channel, and obtain the rPPG signal of the face area and background area of ​​each color channel;

[0014] Taking advantage of the fact that the rPPG signals of the real face area and the background area have a smaller correlation, while the rPPG signals of the fake face area have a larger correlation, three color channels are selected to construct a new color space.

[0015] Build an LSTM network for face liveness detection;

[0016] Input the color features of the videos in the public dataset into the constructed LSTM network for training;

[0017] The new color space and the face liveness detection model trained by the LSTM network are used for face liveness detection.

[0018] Furthermore, the segmentation of the face area image and the background area image comprises the following steps:

[0019] Use the frontal_face_detector in the dlib library as a face detector to detect each frame of the original video;

[0020] Use shape_predictor_68_face_landmarks.dat face feature extraction extractor to locate and mark the face parts in the image;

[0021] The face area and the background area are divided and segmented according to the marked position information.

[0022] Furthermore, the construction of a new color space includes the following steps:

[0023] Capture each frame of the original video, detect faces, and segment the image into face and background parts;

[0024] Perform color space conversion on the face and background area images, converting them into HSV and YCbCr color spaces;

[0025] Split the three color spaces of RGB, HSV, and YCbCr to obtain 9 color channels;

[0026] Get the color features of each color channel of the segmented area of ​​each frame of the current video to form a list of 9 face color features and a list of 9 background color features;

[0027] Perform Fourier transform on the face color feature list and the background area color feature list to obtain the rPPG signal;

[0028] Calculate the correlation coefficient of the rPPG signal between the face area and the background area and record it;

[0029] For the average correlation coefficient value of each channel of all videos, for real face videos, the color channels are arranged in ascending order according to the correlation coefficient, while for fake face attack videos, the color channels are arranged in descending order. The three color channels with the highest overlap from the front to the back are selected as the new color space.

[0030] Furthermore, the calculation of the correlation coefficient of the rPPG signal of the face area and the background area specifically includes:

[0031]

[0032] {R1, R2, R3} = f min ({m1, m2, m3.......m9})

[0033] {F1, F2, F3} = f max ({m1, m2, m3.......m9})

[0034] Where m j The correlation coefficient of the rPPG signal generated by the same video of the face and background in the same channel, C i The average correlation coefficient f generated for n videos max To take the maximum 3 m values ​​of the 9 color channels, f min To take the smallest 3 m values ​​of the 9 color channels.

[0035] Furthermore, the construction of the LSTM network for face liveness detection includes the following steps: using the new color space to extract the color features of the face area and the original area of ​​each frame of the original video to form a Feature Map; passing the Feature Map into the LSTM network, using an LSTM layer with 100 hidden neurons, a fully connected layer and an FFT layer, and the LSTM is used to estimate the face with N f Frame input sequence The rPPG signal f,I j Representing the color features of each frame, the FFT layer converts the response of the fully connected layer into the Fourier domain to obtain the rPPG signal;

[0036] A Fourier transform layer is connected after the fully connected layer of the LSTM network, and then the Fourier transform layer is used to perform Fourier transform on the difference sequence output by the network to obtain frequency domain information;

[0037] Combine the LSTM prediction results with the correlation between the frequency information of each face area and the background area, and output the results.

[0038] Furthermore, the color features of the videos in the public dataset are input into the constructed LSTM network for training, including the following steps:

[0039] For real face videos in public datasets, the traditional rPPG method is used to obtain the rPPG signal of real face videos as the ground truth in the network training process. For fake face attack videos, their rPPG signal is set to 0.

[0040] Use the constructed new color space to extract color features from videos in the public dataset, and input the color feature sequence together with the set ground truth into the LSTM network for training;

[0041] A Fourier transform layer is inserted after the fully connected layer of the LSTM network to convert the color feature change sequence into rPPG signals for classification and prediction.

[0042] The advantages and beneficial effects of the present invention are as follows:

[0043] The method based on color space fusion and recurrent neural network proposed in the present invention can ensure stable and high detection accuracy under multi-dimensional forged face attacks in the face liveness detection task; the color space fusion method involved in it divides each frame of the image into the face area and the background area, calculates the correlation between each color channel of the face area and the background area, and statistically obtains the three color channels that can best present the changes in face color features, and combines them into a new color space, thereby reducing the impact of external environmental noise on the face liveness detection process, thereby improving the accuracy of face liveness detection. Compared with the existing methods, this method can combine the rPPG method with the recurrent neural network, and by constructing a new color space, it can capture the color feature changes of each frame of the video as much as possible, so that the illumination robustness is enhanced, and compared with other methods, the accuracy and practicality are greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a flowchart of a method for face liveness detection based on color space fusion and recurrent neural network in a preferred embodiment of the present invention.

[0045] Figure 2 4 is a flow chart of face area and background area segmentation in an embodiment of the present invention.

[0046] Figure 3 4 is a flow chart of color space fusion in an embodiment of the present invention.

[0047] Figure 4 This is a partial structural diagram of a recurrent neural network in an embodiment of the present invention. DETAILED DESCRIPTION

[0048] The following will describe the technical solutions in the embodiments of the present invention in detail in conjunction with the accompanying drawings in the embodiments of the present invention. The described embodiments are only part of the embodiments of the present invention.

[0049] The technical solution of the present invention to solve the above technical problems is:

[0050] In order to realize face liveness detection, the face liveness detection method based on color space fusion and recurrent neural network provided in the embodiment of the present invention includes three stages: face area and background area segmentation, color space fusion, and introduction of LSTM network to predict rPPG signal, including the following steps:

[0051] Face area and background area segmentation stage

[0052] S1: Perform face detection on each frame of the original video and segment the face area and background area in the image.

[0053] Color space fusion stage

[0054] S2: Use the correlation between the rPPG signals in the face area and the background area to construct a new color space;

[0055] Introducing recurrent neural network to predict rPPG signal phase

[0056] S3: Introducing the LSTM network for face liveness detection;

[0057] S4: Input the color features of the videos in the public dataset into the constructed recurrent neural network for training;

[0058] S5: Use the new color space and LSTM network to train the face liveness detection model for face liveness detection.

[0059] In the above S1, segmenting the face area image and the background area image includes the following steps (such as Figure 2 shown):

[0060] S11: Use the frontal_face_detector in the dlib library as a face detector to detect each frame of the original video;

[0061] S12: Use shape_predictor_68_face_landmarks.dat face feature extraction extractor to locate and mark the face parts in the image;

[0062] S13: Divide the face area and the background area according to the marked position information and segment them. This mainly includes the following steps:

[0063] A1: Find the midpoint of the vertical position of the face;

[0064] Further, according to the identification information of the 68 feature points, the position information 28 representing the midpoint of the eyes is found and represented by the variable name x1, and then the position information 34 representing the midpoint of the nose is found and represented by the variable name x2, and then the position information 9 representing the midpoint of the chin is found and represented by the variable name x3;

[0065] Furthermore, through the position information of x1, x2, and x3, the x_mid_up variable is used to save the value of (x1+x3) / 2, which represents the vertical position information of the upper middle part of the face, and the x_mid_down variable is used to save the value of (x2+x3) / 2, which represents the vertical position information of the lower middle part of the face.

[0066] A2: Find the midpoint of the horizontal position of the face;

[0067] Further, according to the identification information of the 68 feature points, the position information 3 representing the middle contour point on the left side of the face is found and represented by the variable name y1, and then the position information 30 representing the middle and upper point in the vertical direction of the face is found and represented by the variable name y2, and then the position information 13 representing the middle and lower contour point on the right side of the face is found and represented by the variable name y3;

[0068] Furthermore, through the position information of y1, y2, and y3, the y_mid_left variable is used to save the value of (y1+y2) / 2, which represents the position information of the nose on the left side of the face, and the x_mid_right variable is used to save the value of (y2+y3) / 2, which represents the position information of the nose on the right side of the face.

[0069] A3: Segment the face area according to the values ​​of x1, x2, x3, y1, y2, y3;

[0070] A4: Find the location information of the background area around the face;

[0071] Furthermore, according to the position information of y_mid_left and y1, create a distance variable to store the value of y_mid_left-y1. In order to avoid the appearance of faces, set y0 = y1-distance×3, y4 = y3+distance×3 and reset the values ​​of y1 and y3 to achieve the purpose of increasing the distance, so that y1 = y1-distance×2, y3 = y3+distance×2;

[0072] A5: Segment the background area;

[0073] Further, the size of y0 is determined. When y0<0, the background area on the left side of the face is cut into img[x1:x3,0:y1]; when y0>0, the background area on the left side of the face is cut into img[x1:x3,y0:y1];

[0074] Further, the size of y4 is determined. When y4>640, the background area on the right side of the face is cut into img[x1:x3,y3:640]; when y4<640, the background area on the right side of the face is cut into img[x1:x3,y3:y4];

[0075] In S2, color space fusion includes the following steps (such as Figure 3 shown):

[0076] S21: According to the principle that the rPPG signals extracted from each area of ​​the face have a low correlation with the rPPG signals extracted from the background area, while the rPPG signals extracted from each part of the forged face have a high correlation with the rPPG signals from the background area, the segmented face area and the background area are converted into color space, and the RGB color space is converted into HSV and YCbCr color space;

[0077] S22: Segment the RGB, HSV, and YCbCr color spaces of the face region and the background region images to obtain nine color channels of R, G, B, H, S, V, Y, Cb, and Cr of the face region and the background region;

[0078] S23: Obtain color features of each color channel of the segmented area of ​​each frame of the current video to form 9 face color feature lists and 9 background color feature lists;

[0079] S24: Perform Fourier transform on the face color feature list and the background area color feature list to obtain an rPPG signal;

[0080] S25: Calculate the correlation coefficient of the rPPG signal between the face area and the background area, and record it using the formula Get the average correlation coefficient value of each channel of all videos, where M j The correlation coefficient of the rPPG signal generated by the same video of the face and background in the same channel, C i is the average correlation coefficient generated for n videos;

[0081] S26: By formula {R1, R2, R3}=f min ({x1, x2, x3......x9}){F1, F2, F3}=f max ({x1, x2, x3.......x9}) to obtain the three color channels to be recorded, where f maxWhen the original video is a fake face attack video, the color channels are arranged in descending order according to the correlation coefficient, and the three color channels with the largest correlation coefficient between the face area and the background area are recorded. min When the original video is a real face video, the color channels are arranged in ascending order according to the correlation coefficient, the three color channels with the smallest correlation coefficient between the face area and the background area are recorded, and the three color channels with the highest overlap from the front to the back are selected as the new color space;

[0082] In S3, constructing a recurrent neural network for face liveness detection includes the following steps (e.g. Figure 3 shown):

[0083] S31: Use the new color space combined in S2 to extract the color features of the face area and the original area in each frame of the original video to form a Feature Map;

[0084] S32: Pass the Feature Map into the LSTM network and use an LSTM layer with 100 hidden neurons. The purpose of LSTM is to estimate the N f Frame input sequence The rPPG signal f;

[0085] S33: A fully connected layer is connected after the LSTM layer, and a Fourier transform layer is connected after the fully connected layer, and the Fourier transform layer is used to perform Fourier transform on the difference sequence output by the network to obtain frequency domain information;

[0086] S34: Combine the prediction result of LSTM with the correlation of the frequency information of each face area and the background area, and output the result.

[0087] In S4, the color features of the videos in the public dataset are input into the constructed recurrent neural network for training, which includes the following steps:

[0088] S41: For real face videos in the public dataset, use the traditional rPPG method to obtain the rPPG signal of the real face video as the ground truth in the network training process. For the fake face attack video, set its rPPG signal to 0;

[0089] S42: Use the color space constructed in S2 to extract color features from videos in the public dataset, and input the color feature sequence together with the set ground truth into the recurrent neural network for training. Its objective function is set to where θ R is the RNN parameter, F j is the face region feature map, N s is the number of frame sequences, f iRepresents the ground truth of the i-th frame;

[0090] S43: A Fourier transform layer is inserted after the fully connected layer of the LSTM network to convert the color feature change sequence into rPPG signals for classification and prediction.

[0091] The detection results obtained by using the above-mentioned detection method based on color space fusion and recurrent neural network are more stable and have better accuracy than the existing methods.

[0092] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0093] The above embodiments should be understood to be only used to illustrate the present invention and not to limit the protection scope of the present invention. After reading the contents of the present invention, technicians can make various changes or modifications to the present invention, and these equivalent changes and modifications also fall within the scope defined by the claims of the present invention.

Claims

1. A method for face liveness detection based on color space fusion and recurrent neural network. It is characterized in that The following steps are involved: Perform face detection on each frame of the original video and segment the face area and background area in the image; The new color space is constructed by using the correlation of rPPG signals between the face area and the background area. Perform face detection on each frame of input image and segment the face area and background area in the image; The segmented image is converted from RGB color space to HSV and YCbCr color space and divided into 9 color channels. Fourier transform is performed on each color channel to obtain the rPPG signals of the face area and background area of ​​each color channel; Based on the principle that the rPPG signal correlation between the real face area and the background area is small, while the correlation between the fake face area is large, three color channels are selected to construct a new color space; Build an LSTM network for face liveness detection; Input the color features of the videos in the public dataset into the constructed LSTM network for training; Use the new color space and LSTM network to train the face liveness detection model for face liveness detection; Segmenting the face area image and the background area image includes the following steps: Use the frontal_face_detector in the dlib library as a face detector to detect each frame of the original video; Use shape_predictor_68_face_landmarks.dat face feature extraction extractor to locate and mark the face parts in the image; Divide the face area and the background area according to the marked position information and segment them; The construction of a new color space comprises the following steps: Capture each frame of the original video, detect faces, and segment the image into face and background parts; Perform color space conversion on the face and background area images, converting them into HSV and YCbCr color spaces; Split the three color spaces of RGB, HSV, and YCbCr to obtain 9 color channels; Get the color features of each color channel of the segmented area of ​​each frame of the current video to form a list of 9 face color features and a list of 9 background color features; Perform Fourier transform on the face color feature list and the background area color feature list to obtain the rPPG signal; Calculate the correlation coefficient of the rPPG signal between the face area and the background area and record it; For the average correlation coefficient values ​​of each channel of all videos, for real face videos, the color channels are arranged in ascending order according to the correlation coefficient, while for fake face attack videos, the color channels are arranged in descending order. The three color channels with the highest overlap from the front to the back are selected as the new color space; The calculating the correlation coefficient of the rPPG signal of the face area and the background area specifically includes: {R 1 ,R 2 ,R 3 }=f min ({m1,m2,m3……m9}) {F 1 ,F 2 ,F 3 }=f max ({m1,m2,m3……m9}) Where m j The correlation coefficient of the rPPG signal generated by the same video of the face and background in the same channel, C i The average correlation coefficient f generated for n videos max To take the maximum 3 m values ​​of the 9 color channels, f min To take the smallest 3 m values ​​of 9 color channels; The construction of the LSTM network for face liveness detection includes the following steps: using the new color space to extract the color features of the face area and the original area of ​​each frame of the original video to form a Feature Map; passing the Feature Map into the LSTM network, using an LSTM layer with 100 hidden neurons, a fully connected layer and an FFT layer, and the LSTM is used to estimate the face with N f Frame input sequence The FFT layer converts the response of the fully connected layer into the Fourier domain to obtain the rPPG signal f; A Fourier transform layer is connected after the fully connected layer of the LSTM network, and then the Fourier transform layer is used to perform Fourier transform on the difference sequence output by the network to obtain frequency domain information; Combine the LSTM prediction results with the correlation between the frequency information of each face area and the background area, and output the results; The color features of the videos in the public dataset are input into the constructed LSTM network for training, including the following steps: For real face videos in public datasets, the traditional rPPG method is used to obtain the rPPG signal of real face videos as the ground truth in the network training process. For fake face attack videos, their rPPG signal is set to 0. Use the constructed new color space to extract color features from videos in the public dataset, and input the color feature sequence together with the set ground truth into the LSTM network for training; A Fourier transform layer is inserted after the fully connected layer of the LSTM network to convert the color feature change sequence into rPPG signals for classification and prediction.