[0028] The present invention will be further described in detail below in conjunction with the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
[0029] Such as figure 1 As shown, an identity authentication system based on living body detection and face verification includes:
[0030] The face verification module is used to compare the obtained face of the verified person with the face on the ID card to determine whether it matches;
[0031] The lip recognition and verification module is used to prompt the verified person to read the randomly provided number combination after the face verification module is verified, and determine whether the action of the outer lip contour of the verified person's lips in the camera area is the same as that of the readout The lips and outer lip contour movements of the combination of numbers match, if they match, they are deemed to be alive and pass the identity authentication.
[0032] In the specific implementation, the image of the person to be verified and the image of the ID card are collected, the face in the image of the person being verified and the face on the ID card are processed, and the features are extracted to compare to determine whether they match. If the match is successful, then enter the step of lip language recognition and verification. The lip language recognition and verification module prompts the person to be verified to read the randomly provided number combination, and then according to the lip language recognition technology to identify whether the lip language matches the number required to be read If the combined information is matched, the lip-language recognition verification is carried out. According to the verification result, whether it is a living body is identified and the verification result is given. After the verification is successful, the identity authentication is passed.
[0033] When performing face verification and recognition detection, the system will randomly display the area where the ID card is placed. In the lip recognition phase, the system will let the verifier read out a random combination of numbers, thus preventing photo and video attacks, thereby realizing the face Live detection.
[0034] By combining face verification with lip language recognition verification, the present invention solves the problem of easy deception by using photos and videos for verification, can realize the identity authentication function of the integration of human and certificate, and can achieve high-precision face recognition and living body Detection function.
[0035] Wherein, there are multiple ID card verification areas, which can be displayed on the human-computer interaction interface. Specifically, the designated ID card verification area is randomly designated by the prompt unit in the ID card verification area and displayed on the human-machine interface. The interactive interface is prompted by pop-up boxes and output prompt description text. In the present invention, the ID card verification area 1 is preferably six, which are distributed in the upper and lower positions of the image display area 2 on the human-computer interaction interface of the person to be verified, three for each, such as figure 2 Shown.
[0036] In terms of specific implementation, the number combination is a randomly generated number combination from 1-9, such as 1234, 3456 or 4367, etc. Of course, the lip recognition verification can also be a combination of words and other languages that can be read by the verifier information.
[0037] Further, in the present invention, the identity authentication system based on living body detection and face verification further includes a result indicating module to realize prompting of face detection results, face verification results, and lip recognition results, specifically, such as figure 2 As shown, it can be located at the corresponding position of the human-computer interaction interface, and the specific result indicating module includes:
[0038] The first indicator light 3 is used to indicate when the person's face is detected in the camera area;
[0039] The second indicator light 4 is used to indicate after the face verification match is successful;
[0040] The third indicator light 5 is used for prompting after successful lip recognition verification.
[0041] When the result indicating module is instructed, it can indicate that the verification of the corresponding stage is successful through the indicator light turning green, otherwise it will turn red.
[0042] In terms of specific implementation, in the present invention, the face verification module includes:
[0043] The face detection unit is used to detect the face in the real-time image collected by the camera module;
[0044] The prompting unit is used to prompt the verified person to place the ID card in the designated ID card verification area to obtain the image of the ID card after the face detection unit detects the face;
[0045] The face verification unit is used to compare the person on the verified person’s ID card through the processing sequence of face alignment, face feature extraction, and face similarity comparison after the person verifies the ID card in the designated ID card verification area The face and the image of the face detected by the face detection unit determine whether they match.
[0046] It should be noted that, in the present invention, the face verification module and the lip language recognition verification module can be implemented using corresponding face recognition verification and lip language recognition verification software programs.
[0047] Wherein, when the face verification module performs face verification, it includes three steps: face alignment, face feature extraction, and face similarity comparison. When the lip language recognition verification module verifies, it includes lip movement detection and feature Extraction and lip recognition. The specific description is as follows:
[0048] Specifically, the present invention can use the SDK supporting the network camera to realize the collection of video frames, and realize the real-time image display and human-machine interaction through the human-machine interface developed by QT. The face detection unit uses the image collected by the network camera as input to obtain face position information. After the face image is detected, the first indicator light turns green, and the prompt unit prompts the user to place the ID card in the designated ID card verification area, and at the same time, detect the face in the ID card in the designated ID card verification area.
[0049] Among them, face detection can use opencv's haarcascade_frontalface_atl2.xml model to detect. If a face is detected in the face detection unit, the prompt unit prompts the verifier to put the ID card in the designated ID card verification area to obtain the image of the ID card To perform one-step verification of face correspondence.
[0050] After the user puts the ID card into the designated ID card verification area with physical actions, the opencv haarcascade_frontalface_atl2.xml model is also used to detect the face in the ID card. After the face in the ID card is detected, the face detection unit is detected The detected face and the detected ID face are feature extracted and compared in real time to determine whether the identities are consistent. The process is mainly divided into face alignment, feature extraction and similarity comparison of the faces detected by the camera display area and the ID display area:
[0051] 1. Face alignment
[0052] Retrieve the input image, perform operations such as panning and zooming the input image, and match it with the face template. The matching result is obtained through the alignment algorithm.
[0053] Suppose the gray matrix of the face template is:
[0054] T={t ij }(i=0,1,...,m-1; j=0,1,...,n-1) (1)
[0055] The input image matrix is:
[0056] R={r ij }(i=0,1,...,m-1; j=0,1,...,n-1) (2)
[0057] The Euclidean distance between the input image and the face template is:
[0058]
[0059] The width of the image matrix is m and the height is n, i and j are pixel coordinates. When the distance d is smaller than the preset threshold and the value of d is smaller, it means that the matching degree between the input image and the template is higher.
[0060] Perform symmetry constraint processing on the image matrix to be detected. The left half of the image RL and the right half of the image RR with the longitudinal center axis as the boundary of the input image matrix R are respectively obtained, and the difference between the gray values of the two images is calculated as θ=RL-RR. When the value of θ takes the minimum value, it can be considered that the input image is the most symmetrical left and right, which is the best position of the face image. The calculated Euclidean distance d can be added to the symmetry constraint value θ, δ=d+θ. When δ reaches the minimum value, it is considered that the input image has the smallest sum of Euclidean distance and symmetry constraint, and the image and template have the best alignment effect at this time. δ is the final result. The face template size adopted by this system is 36×36 pixels. If the detected face image is inconsistent with the face template size, the detected image will be scaled to make it consistent with the face template size. Based on this, the edge of the image area is enlarged by 8 pixels to reserve space for subsequent template matching.
[0061] 2. Feature extraction
[0062] After face alignment is performed on the input face image, facial features are extracted through the AlexNet network model to obtain the feature vector and feature transformation matrix of the face.
[0063] Convolutional Neural Network (CNN), as a deep learning architecture, can accurately extract image features while reducing model complexity. Aiming at the advantages of CNN in image recognition, a CNN-based facial image feature extraction method is proposed. In CNN, a small part of the image (local receptive area) is used as the input of the lowest layer of the hierarchical structure, and the information is transmitted to different layers in turn, and each layer passes through a digital filter to obtain the most significant features of the observed data. This method can obtain salient features of observation data that are invariant to translation, zoom, and rotation, because the local receptive area of the image allows neurons or processing units to access the most basic features. The system uses an AlexNet model with an 8-layer network structure to extract features of the fused face image, and then uses a support vector machine (SVM) for classification prediction. There are 8 layers in AlexNet, 5 of which are convolutional layers, 2 are fully connected layers, and 1 is the output classification layer. Among them: (1) The first and second convolutional layers are followed by a normalization layer (norm layer) respectively; (2) The sub-sampling operation is immediately followed by the first and second norm layers, and the fifth volume After layering; (3) The penultimate layer of AlexNet can well describe the global features of the image, so the output of the penultimate layer is used as the feature of the image, which can describe the image well and is very suitable for image classification .
[0064] 3. Comparison of similarity
[0065] Compare the facial features of the extracted ID card image with the real-time facial image to obtain the recognition result. If the comparison is successful, the system will randomly select another area again and ask the user to put the ID card in the designated area for verification. When the two verification results are correct, the second indicator light turns green and the face verification is passed.
[0066] In the present invention, when the lip language recognition verification module performs lip language recognition, it includes the steps of lip movement detection, feature extraction and lip language recognition in order. Lip movement detection is used to locate the lips of the input image and detect whether there is mouth opening and closing; feature extraction is used to extract the effective mouth shape features of lip language; lip reading recognition is to identify through the extracted effective mouth shape features Lip language content.
[0067] Specifically, in the present invention, the lip language recognition verification module adopts a support vector machine algorithm (Support Vector Machine, SVM) to detect the contour of the outer lip of the lips to extract the shape of the mouth, which can well eliminate irrelevant facial information. At the same time, its accuracy and speed are guaranteed. The dynamic clustering algorithm based on the K-means algorithm is used to identify the lips, and the conditions of the lips are tightly closed, slightly opened and opened. After the lip language recognition is verified, the third indicator light turns green to indicate the lips Language recognition verification passed.
[0068] In order to further improve the reliability of face verification, in the present invention, after the first verification of the face verification module is successful, a second verification is required, and after the second verification is successful, the lip recognition verification module is entered again Verification. If the second verification is unsuccessful, the verification fails and the face verification can be performed again. Only after the required face verification step is successful can the lip recognition verification phase be entered. Of course, you can also set more verifications as needed, and the specifics are not limited.
[0069] In order to further improve the reliability of lip language recognition and verification, in the present invention, the lip language recognition and verification module verifies at least three times, and prompts that the identity authentication is successful after multiple tests are successful. Specifically, after the first verification is successful, after the system provides the first number combination, the system randomly provides the second set of number combination, and the verifier reads out the second set of number combination, and then performs verification. If the second lip recognition verification is passed, the third verification will be performed. The system will randomly provide a third set of numbers, and the verifier will read out the third set of numbers, and then perform verification. After three successful verifications, it will be prompted to pass the verification. . Of course, you can also set more verifications as needed, and the specifics are not limited.
[0070] In terms of specific implementation, in the present invention, the identity authentication system based on living body detection and face verification further includes a camera module for acquiring real-time images and ID card images of the verified person, and the camera module is a network camera. After the network camera obtains the real-time image and ID image of the person being verified, the face verification module performs face verification according to the aforementioned method, and the lip language recognition verification module performs lip language recognition verification .
[0071] When working, obtain images from the network camera in real time; detect faces in the designated area of the image; randomly display the ID card into the ID card verification area, prompt the user to put the ID card in the designated ID card verification area; Face detection, face alignment, feature extraction, and similarity comparison between the image and the ID card image in the ID verification area displayed randomly; after the contrast score reaches the preset threshold, it enters the lip recognition stage, and the verifier sends it according to the system. The instruction reads the number displayed randomly, and if the recognition is successful, it is judged as a living body.
[0072] Further, the identity authentication system based on living body detection and face verification also includes an industrial computer, a liquid crystal display that can display real-time collected images of the verified person and ID card images on the display interface; the web camera module passes The network is connected to the network port of the industrial computer, and the liquid crystal display is connected to the industrial computer through an HDMI cable. The real-time verified image and ID card image collected by the network camera module can be displayed on the display interface of the liquid crystal display to realize face verification and lip language recognition verification.
[0073] The identity authentication system based on living body detection and face verification also includes a keyboard and a mouse, which are respectively connected to the industrial computer.
[0074] It should be noted that, in the present invention, since the combination of the ID card verification area that the system prompts to put in the ID card and the number prompt to read out are random, it is impossible for the user to pass live detection by playing video, so the present invention can It can better prevent fraudulent behaviors such as photos and video editing methods in living body detection, making living body detection more reliable and safe, and at the same time, realizing high-precision face recognition.
[0075] Compared with the prior art, the present invention adds face comparison and live detection technology, and specifically solves the problem that the existing identity authentication system is vulnerable to photo and video attacks. Using this identity authentication technology, it can accurately determine The identity of the verifier and whether it is a living body enhances the reliability and security of the identity authentication system.
[0076] The above are only the preferred embodiments of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and modifications can be made. These improvements and Retouching should also be regarded as the protection scope of the present invention.