A face living body detection method, system, terminal device and storage medium

By combining color and infrared facial images, calculating feature differences and performing color space conversion, and utilizing a support vector machine model, the problem of facial recognition systems being deceived is solved, improving the accuracy of liveness detection and the security of identity verification.

CN115880787BActive Publication Date: 2026-06-12SHENZHEN JULONG CHUANGSHI TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN JULONG CHUANGSHI TECH CO LTD
Filing Date
2022-12-15
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing facial recognition systems are easily fooled by tools such as photos or 3D facial models, leading to a decrease in the accuracy of liveness detection.

Method used

A method combining color and infrared facial images is used to generate feature vectors by calculating the differences in the feature values ​​of the four corner coordinates of the face and color space transformation. A support vector machine model is then used for liveness detection.

🎯Benefits of technology

It improves the accuracy of face liveness detection, effectively distinguishing real faces from photos or models, thus enhancing the security of identity verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115880787B_ABST
    Figure CN115880787B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of identity recognition, in particular to a face living body detection method and system, a terminal device and a storage medium, which comprises the following steps: calculating the four-corner coordinates of a color face image and an infrared face image according to a face detection algorithm; then calculating the corresponding face feature values according to the four-corner coordinates algorithm; if the corresponding feature difference values between the face feature values meet preset feature difference value standards; converting the color face image according to a preset image conversion rule to generate a corresponding color space image; processing the color space image according to a feature extraction algorithm to generate a corresponding enhanced feature vector; and performing judgment processing on the enhanced feature vector according to a preset feature normalization model to output a corresponding living body judgment result; and determining whether the face is a living body according to the specific judgment value of the living body judgment result. The face living body detection method and system, the terminal device and the storage medium provided by the application have the effect of improving the face living body detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of identity recognition technology, and in particular to a face liveness detection method, system, terminal device and storage medium. Background Technology

[0002] Facial recognition is a biometric technology that identifies individuals based on their facial features. It involves using cameras or webcams to capture images or video streams containing faces, automatically detecting and tracking faces in the images, and then performing facial recognition on the detected faces. It is also commonly known as portrait recognition or face recognition.

[0003] Facial recognition is currently the mainstream method for identifying people. However, due to the existence of tools such as photos or videos of faces, 3D facial models, etc., that deceive and attack facial recognition systems, the accuracy of facial recognition systems in identifying and detecting whether a face is alive has decreased. Summary of the Invention

[0004] To improve the accuracy of face liveness detection, this application provides a face liveness detection method, system, terminal device, and storage medium.

[0005] This application provides a face liveness detection method, which includes the following steps:

[0006] Acquire color and infrared facial images of the object to be identified;

[0007] Based on the face detection algorithm, the coordinates of the first face corners corresponding to the color face image and the coordinates of the second face corners corresponding to the infrared face image are obtained respectively.

[0008] The four-corner coordinates of the first face and the four-corner coordinates of the second face are calculated according to the four-corner coordinate algorithm, and the first face feature value corresponding to the four-corner coordinates of the first face and the second face feature value corresponding to the four-corner coordinates of the second face are generated respectively.

[0009] Determine whether the feature difference value between the first facial feature value and the second facial feature value is less than a preset feature difference value threshold;

[0010] If the feature difference between the first facial feature value and the second facial feature value is less than the preset feature difference value threshold, then the color facial image is converted according to the preset image conversion rules to generate a corresponding color space image;

[0011] The color space image is processed according to a feature extraction algorithm to generate a corresponding feature vector;

[0012] The feature vector is normalized to generate the corresponding enhanced feature vector;

[0013] The enhanced feature vector is processed according to the preset feature training model, and the corresponding liveness detection result is output.

[0014] If the liveness determination result is the first determination value, then the object to be identified is determined to be a live human face;

[0015] If the liveness determination result is the second determination value, then the object to be identified is determined to be a non-live human face.

[0016] By adopting the above technical solution, the first step is to determine whether the feature difference value between the color face image and the infrared face image of the object to be identified meets the preset feature difference value standard. If it meets the standard, it means that the color face image and the infrared face image match, and the face of the object to be identified can be preliminarily determined to be a live object, and the next step can be carried out. If it does not meet the standard, the face of the object to be identified is preliminarily determined to be a non-live object. Based on the above analysis and judgment, a preliminary liveness detection can be performed on the face of the object to be identified in advance. Then, according to the preset image conversion rules, the color space of the color face image corresponding to the object to be identified is converted, and the feature vector corresponding to the color space image in the color space is extracted and processed to obtain the corresponding enhanced feature vector, i.e., face texture features. Finally, it is handed over to the trained preset feature training model for discrimination and the corresponding liveness judgment result is output. If the judgment result is the first judgment value, the face of the object to be identified is finally determined to be a live object. If the judgment result is the second judgment value, the face of the object to be identified is finally determined to be a non-live object, thereby improving the accuracy of face liveness detection.

[0017] Optionally, the step of processing the color space image according to the feature extraction algorithm to generate the corresponding feature vector includes the following steps:

[0018] Based on the color space image, obtain the corresponding target component image;

[0019] According to the feature extraction algorithm, local features corresponding to the target component map are extracted;

[0020] Identify the local features and generate the corresponding feature vector.

[0021] By adopting the above technical solution, local features are extracted from the Y component map, Cb component map and Cr component map, which facilitates the generation of feature vectors of facial texture features of the object to be identified based on these local features.

[0022] Optionally, the first facial feature value includes the coordinates of the region center, the second facial feature value includes pixel values, and the step of determining whether the feature difference value between the first facial feature value and the second facial feature value meets the preset feature difference value standard includes the following steps:

[0023] The center coordinate values ​​of the regions corresponding to the color face image and the infrared face image are calculated according to the preset center coordinate algorithm, and the corresponding region center coordinate difference values ​​are generated.

[0024] If the difference value of the center coordinates of the region is greater than the preset center coordinate difference threshold, then the pixel values ​​corresponding to the color face image and the infrared face image are calculated according to the preset pixel value algorithm to generate the corresponding pixel difference value.

[0025] If the pixel difference value is greater than a preset pixel difference threshold, it is determined that the feature difference value between the first facial feature value and the second facial feature value meets the preset feature difference value standard.

[0026] If the pixel difference value is less than or equal to the preset pixel threshold, it is determined that the feature difference value between the first facial feature value and the second facial feature value does not meet the preset feature difference value standard.

[0027] By adopting the above technical solution, this embodiment provides a face liveness detection method. By determining whether the difference in the center coordinates and pixel values ​​of the region corresponding to the color face image and the region corresponding to the infrared face image both meet the corresponding preset difference standards, it is possible to analyze and determine whether the color face image and the infrared face image of the object to be identified match based on multiple face feature values, thereby further improving the accuracy of face liveness detection.

[0028] Optionally, after determining whether the feature difference value between the first facial feature value and the second facial feature value meets the preset feature difference value standard, the following steps are also included:

[0029] If it is determined that the feature difference value between the first facial feature value and the second facial feature value does not meet the preset feature difference value standard, then a corresponding first facial dynamic feature acquisition instruction is generated;

[0030] According to the first facial dynamic feature acquisition instruction, the first facial dynamic feature corresponding to the object to be identified is acquired;

[0031] Determine whether the first facial dynamic feature conforms to the preset facial dynamic feature standard;

[0032] If the first facial dynamic feature does not meet the preset facial dynamic feature standard, a facial anomaly recognition prompt is generated.

[0033] By adopting the above technical solution, it is determined whether the first facial dynamic feature of the current subject meets the preset facial dynamic feature standard set by the system, thereby improving the accuracy of liveness detection of passersby.

[0034] Optionally, after determining whether the first facial dynamic feature meets the preset facial dynamic feature standard, the following steps are also included:

[0035] If the first facial dynamic feature matches the preset facial dynamic feature standard, then the authentication identity information of the object to be identified is obtained;

[0036] Based on the authentication identity information, obtain and generate the corresponding second facial dynamic feature acquisition instruction according to the corresponding historical facial dynamic features;

[0037] According to the second facial dynamic feature acquisition instruction, the second facial dynamic features of the object to be identified are acquired;

[0038] Determine whether the second facial dynamic feature matches the historical facial dynamic feature;

[0039] If the second facial dynamic feature does not match the historical facial dynamic feature, then the facial anomaly recognition prompt is generated.

[0040] By adopting the above technical solution, based on the authentication identity information of the tested object, the historical facial dynamic features recorded by the tested object when setting authentication information are obtained, and it is further determined whether the second facial dynamic features of the current tested object match its historical facial dynamic features, thereby improving the security of the tested object's identity verification.

[0041] Optionally, determining whether the second facial dynamic feature matches the historical facial dynamic feature includes the following steps:

[0042] Obtain the facial dynamic feature verification items corresponding to the historical facial dynamic features;

[0043] If there are multiple facial dynamic feature verification items, then the corresponding facial dynamic feature recognition item in the second facial dynamic feature is obtained;

[0044] If the number of facial dynamic feature recognition items is equal to the number of facial dynamic feature verification items, then the verification order corresponding to the facial dynamic feature verification items is obtained;

[0045] Determine whether the recognition order of the facial dynamic feature recognition items conforms to the verification order;

[0046] If the recognition order of the facial dynamic feature recognition item matches the verification order, then it is determined that the second facial dynamic feature matches the historical facial dynamic feature;

[0047] If the recognition order of the facial dynamic feature recognition item does not conform to the verification order, it is determined that the second facial dynamic feature does not conform to the historical facial dynamic feature.

[0048] By adopting the above technical solution, based on the fact that the number of facial dynamic feature recognition items and facial dynamic feature verification items are equal, it is further determined whether the recognition order of facial dynamic feature recognition items conforms to the verification order, thereby improving the security of the identity recognition of the tested object.

[0049] Optionally, determining whether the second facial dynamic feature matches the historical facial dynamic feature includes the following steps:

[0050] Obtain the facial dynamic feature recognition item corresponding to the second facial dynamic feature;

[0051] Identify the facial dynamic feature recognition item and match the facial dynamic feature verification item corresponding to the historical facial dynamic feature;

[0052] Determine whether the facial dynamic duration corresponding to the facial dynamic feature recognition item is within the threshold range of the facial dynamic duration corresponding to the facial dynamic feature verification item.

[0053] If the duration of facial dynamics corresponding to the facial dynamics recognition item is within the threshold range of the duration of facial dynamics corresponding to the facial dynamics verification item, then it is determined that the second facial dynamics feature conforms to the historical facial dynamics feature.

[0054] If the duration of facial dynamics corresponding to the facial dynamics recognition item exceeds the threshold range of the duration of facial dynamics corresponding to the facial dynamics verification item, then it is determined that the second facial dynamics feature does not conform to the historical facial dynamics feature.

[0055] By adopting the above technical solution, it is determined whether the facial dynamic duration corresponding to the facial dynamic feature recognition item is within the threshold range of the facial dynamic duration corresponding to the facial dynamic feature verification item, thereby further improving the security of identity verification of the tested object.

[0056] Secondly, this application provides a face liveness detection system, characterized in that it includes:

[0057] The first acquisition module is used to acquire color face images and infrared face images of the object to be identified;

[0058] The second acquisition module is used to acquire the first face corner coordinates corresponding to the color face image and the second face corner coordinates corresponding to the infrared face image according to the face detection algorithm.

[0059] The calculation module is used to calculate the four-corner coordinates of the first face and the four-corner coordinates of the second face according to the four-corner coordinate algorithm, and generate the first face feature value corresponding to the four-corner coordinates of the first face and the second face feature value corresponding to the four-corner coordinates of the second face respectively.

[0060] The judgment module is used to determine whether the feature difference value between the first facial feature value and the second facial feature value is less than a preset feature difference value threshold.

[0061] The conversion module is configured to convert the color face image according to a preset image conversion rule and generate a corresponding color space image if the feature difference value between the first face feature value and the second face feature value is less than the preset feature difference value threshold.

[0062] The processing module is used to process the color space image according to the feature extraction algorithm to generate the corresponding feature vector;

[0063] The generation module is used to normalize the feature vector and generate a corresponding enhanced feature vector.

[0064] The output module is used to process the enhanced feature vector according to the preset feature training model and output the corresponding liveness detection result.

[0065] If the liveness determination result is a first determination value, the first determination module is used to determine that the object to be identified is a live face.

[0066] If the liveness determination result is a second determination value, the second determination module is used to determine that the object to be identified is a non-live human face.

[0067] By adopting the above technical solution, the four-corner coordinates of the first face and the two faces are calculated according to the four-corner coordinate algorithm in the calculation module. This allows the judgment module to determine whether the feature difference between the first and second face feature values ​​calculated by the calculation module is less than a preset feature difference threshold. If it is less, it indicates that the color face image matches the infrared face image, thus leading to a preliminary judgment that the face is alive. Subsequently, the color face image is converted by the conversion module according to the preset image conversion rules to generate a corresponding color space image. Based on the generated color space image, the corresponding feature vector, i.e., the face texture feature, in the color face image is obtained by the processing module. The enhanced feature vector corresponding to the face texture feature is further processed and judged by the preset feature training model trained in the output module, and the corresponding liveness judgment result is output. Finally, the face of the object to be identified is determined to be alive or not alive based on the first or second judgment value of the liveness judgment result, thereby improving the accuracy of face liveness detection.

[0068] Thirdly, this application provides a terminal device, which adopts the following technical solution:

[0069] A terminal device includes a memory and a processor. The memory stores computer instructions that can be executed on the processor. When the processor loads and executes the computer instructions, it employs the aforementioned face liveness detection method.

[0070] By adopting the above technical solution, a face liveness detection method is used to generate computer instructions, which are then stored in a memory for loading and execution by a processor. This allows for the creation of a terminal device based on the memory and processor, making it convenient to use.

[0071] Fourthly, this application provides a computer-readable storage medium, which adopts the following technical solution:

[0072] A computer-readable storage medium storing computer instructions, wherein when the computer instructions are loaded and executed by a processor, the aforementioned face liveness detection method is employed.

[0073] By adopting the above technical solution, a face liveness detection method is used to generate computer instructions, which are then stored in a computer-readable storage medium for loading and execution by a processor. The computer-readable storage medium facilitates the reading and storage of the computer instructions.

[0074] In summary, this application includes at least one of the following beneficial technical effects: First, it determines whether the feature difference value between the color face image and the infrared face image of the object to be identified meets the preset feature difference value standard. If it meets the standard, it indicates that the color face image and the infrared face image match, and thus the face of the object to be identified can be preliminarily determined to be a live object, and the next step can be carried out. If it does not meet the standard, the face of the object to be identified is preliminarily determined to be a non-live object. Thus, through the above analysis and judgment, a preliminary liveness detection can be performed on the face of the object to be identified in advance. Then, according to the preset image conversion rules, the color space of the color face image corresponding to the object to be identified is converted, and the feature vector corresponding to the color space image in the color space is extracted and processed to obtain the corresponding enhanced feature vector, i.e., face texture features. Finally, it is handed over to the trained preset feature training model for discrimination and the corresponding liveness judgment result is output. If the judgment result is the first judgment value, the face of the object to be identified is finally determined to be a live object. If the judgment result is the second judgment value, the face of the object to be identified is finally determined to be a non-live object, thereby improving the accuracy of face liveness detection. Attached Figure Description

[0075] Figure 1 This is a flowchart illustrating steps S101 to S110 of a face liveness detection method according to this application.

[0076] Figure 2 This is a flowchart illustrating steps S201 to S203 of a face liveness detection method according to this application.

[0077] Figure 3 This is a flowchart illustrating steps S301 to S304 of a face liveness detection method according to this application.

[0078] Figure 4 This is a first face four-corner coordinate map corresponding to a color face image and a second face four-corner coordinate map corresponding to an infrared face image in a face liveness detection method of this application.

[0079] Figure 5 This is a flowchart illustrating steps S401 to S404 of a face liveness detection method according to this application.

[0080] Figure 6 This is a flowchart illustrating steps S501 to S505 of a face liveness detection method according to this application.

[0081] Figure 7 This is a flowchart illustrating steps S601 to S606 of a face liveness detection method according to this application.

[0082] Figure 8 This is a flowchart illustrating steps S701 to S705 of a face liveness detection method according to this application.

[0083] Figure 9 This is a schematic diagram of a face liveness detection system according to this application.

[0084] Explanation of reference numerals in the attached figures:

[0085] 1. First acquisition module; 2. Second acquisition module; 3. Calculation module; 4. Judgment module; 5. Conversion module; 6. Processing module; 7. Generation module; 8. Output module; 9. First judgment module; 10. Second judgment module. Detailed Implementation

[0086] The following is in conjunction with the appendix Figure 1-9 This application will be described in further detail.

[0087] This application discloses a method for face liveness detection, such as... Figure 1 As shown, it includes the following steps:

[0088] S101. Acquire the color face image and infrared face image of the object to be identified;

[0089] S102. Based on the face detection algorithm, obtain the coordinates of the four corners of the first face corresponding to the color face image and the coordinates of the four corners of the second face corresponding to the infrared face image;

[0090] S103. Calculate the four-corner coordinates of the first face and the four-corner coordinates of the second face according to the four-corner coordinate algorithm, and generate the first face feature value corresponding to the four-corner coordinates of the first face and the second face feature value corresponding to the four-corner coordinates of the second face respectively.

[0091] S104. Determine whether the feature difference value between the first facial feature value and the second facial feature value meets the preset feature difference value standard;

[0092] S105. If the feature difference between the first facial feature value and the second facial feature value meets the preset feature difference value standard, then the color facial image is converted according to the preset image conversion rules to generate the corresponding color space image;

[0093] S106. Process the color space image according to the feature extraction algorithm to generate the corresponding feature vector;

[0094] S107. Normalize the feature vector and generate the corresponding enhanced feature vector;

[0095] S108. Process the enhanced feature vector according to the preset feature training model and output the corresponding liveness detection result;

[0096] S109. If the liveness detection result is the first detection value, then the object to be identified is determined to be a live face;

[0097] S110. If the liveness detection result is the second detection value, then the object to be identified is determined to be a non-live face.

[0098] The object to be identified in step S101 refers to the person whose face needs to be detected for liveness detection. The color face image refers to the color face image obtained by taking a picture of the object to be identified through an ordinary color camera. The infrared face image is the infrared face image obtained by taking a picture of the object to be identified through an infrared camera.

[0099] In practical applications, paper photos or facial images displayed on electronic device screens can be imaged normally by ordinary color cameras, but cannot be imaged normally by infrared cameras. Therefore, in order to improve the accuracy of facial activity detection of the subject to be identified, both ordinary color cameras and infrared cameras are used to capture images of the subject to be identified, obtaining corresponding color facial images and infrared facial images. Then, according to the facial detection algorithm, the first four-corner coordinates of the color facial image and the second four-corner coordinates of the infrared facial image are obtained. Then, the four-corner coordinate algorithm is used to calculate the first four-corner coordinates of the first face and the second four-corner coordinates of the second face, respectively, to obtain the first facial feature value corresponding to the first four-corner coordinates and the second facial feature value corresponding to the second four-corner coordinates of the second face.

[0100] It should be noted that the method for extracting the first face corner coordinates and the second face coordinates according to the face detection algorithm is as follows: First, the color face image and infrared face image to be processed are scaled into images of 6 different sizes. Then, the images of different sizes are input into a fully convolutional network to generate face candidate boxes and regression vectors. Next, the candidate boxes obtained in the previous step are input into the fully convolutional network and processed using bounding box regression and non-maximum suppression to remove a large number of duplicate candidate boxes, thereby filtering out some better candidate boxes. Finally, the candidate boxes obtained from the better candidate boxes are input into the fully convolutional network and processed using bounding box regression and non-maximum suppression to obtain the optimal selection box, and the marked positions of the facial key points are output. The coordinates of the optimal selection box obtained at this time are the four corner coordinates of the face of the object to be identified.

[0101] Furthermore, it is determined whether the feature difference value between the first facial feature value and the second facial feature value meets the preset feature difference value standard. The preset feature difference value standard refers to the maximum allowable difference between the first facial feature value and the second facial feature value. If the feature difference value meets the preset feature difference value, it means that the color facial image and the infrared facial image match, and the face of the subject to be identified is initially judged to be a live person. If the feature difference value does not meet the preset feature difference value threshold, it means that the color facial image and the infrared facial image do not match, and the face of the subject to be identified is initially judged to be a non-live person.

[0102] For example, the first facial feature values ​​are the center coordinates of the regions corresponding to the color facial image and the infrared facial image, respectively. The corresponding feature difference value is the difference between the center coordinates of the regions corresponding to the color facial image and the infrared facial image. The preset feature difference value standard is the range of region center coordinate differences that the feature difference value should fall within. If the feature difference value is within the above-mentioned region center coordinate difference range, it is determined that the feature difference value meets the corresponding preset feature difference value standard, indicating that the feature difference value matches the color facial image and the infrared facial image, and the face of the subject to be identified is initially judged to be a live person. If the feature difference value exceeds the above-mentioned region center coordinate difference range, it is determined that the feature difference value does not meet the corresponding preset feature difference value standard, indicating that the feature difference value matches the color facial image and the infrared facial image, and the face of the subject to be identified is initially judged to be a live person.

[0103] For example, the second facial feature values ​​are the pixel values ​​corresponding to the color facial image and the infrared facial image, respectively. The corresponding feature difference value is the difference between the pixel values ​​corresponding to the color facial image and the infrared facial image. The preset feature difference value standard is the range of pixel size difference that the feature difference value should fall within. If the feature difference value is within the above-mentioned range of pixel size difference, it is determined that the feature difference value meets the corresponding preset feature difference value standard, indicating that the feature difference value matches the color facial image and the infrared facial image, and the face of the subject to be identified is initially judged to be a live person. If the feature difference value exceeds the above-mentioned range of pixel size difference, it is determined that the feature difference value does not meet the corresponding preset feature difference value standard, indicating that the feature difference value matches the color facial image and the infrared facial image, and the face of the subject to be identified is initially judged to be a live person.

[0104] In the case of a paper photograph and a real live face being imaged by a color camera, it is not easy to distinguish whether the captured face is live in the RGB color space. However, in the YCbCr color space, the texture features of a real live face can be clearly distinguished. Therefore, the color face image in the RGB color space is converted according to the preset image conversion rules to generate the corresponding color space image in the YCbCr color space. The preset image conversion rules can be processed by OpenCV, a cross-platform computer vision and machine learning software library that can implement many general algorithms in image processing and computer vision. The RGB color space is based on three primary colors: R (Red), G (Green), and B (Blue). Different degrees of superposition are used to produce rich and wide colors, hence the name three primary color mode. The YCbCr color space is a set of color spaces used as part of the color image pipeline in video and digital photography. Y is the luminance signal, Cb is the blue chromaticity component, and Cr is the red chromaticity component.

[0105] It should be noted that the color space image in the YCbCr color space is processed according to the feature extraction algorithm. The feature extraction algorithm is the graphics processing algorithm in OpenCV. The face image is separated into the corresponding Y, Cb and Cr color components, and the corresponding feature vectors are generated. Then, the above feature vectors are normalized and processed to form the corresponding enhanced feature vector, which is the feature vector representing the overall color texture of the face.

[0106] In order to further determine whether the face of the object to be identified is a live object based on the enhanced feature vector, the enhanced feature vector is handed over to a preset feature training model for judgment processing. The preset feature training model is a trained SVM. The trained SVM mainly uses training set and test set, sets training parameters, calls training interface to train to obtain preliminary model, and then fine-tunes model parameters through cross-validation to obtain optimal model, and training is completed.

[0107] SVM, also known as Support Vector Machine, is a data-oriented classification algorithm. Its goal is to determine a classification hyperplane to separate different data. The output of SVM, namely the liveness detection result, serves as the final judgment on whether the face of the object to be identified is live.

[0108] It should be noted that support vector machine (SVM) learning methods include building models from simple to complex: linearly separable SVMs, linear SVMs, and nonlinear SVMs. When the training data is linearly separable, a linear classifier is learned by maximizing the hard margin, i.e., a linearly separable SVM, also known as a hard-margin SVM. When the training data is approximately linearly separable, a linear classifier is also learned by maximizing the soft margin, i.e., a linear SVM, also known as a soft-margin SVM. When the training data is linearly inseparable, a nonlinear SVM is learned by using kernel tricks and soft-margin maximization.

[0109] Furthermore, the obtained enhanced feature vectors are input into the mathematical model training the SVM. After relevant calculations by the mathematical model, for example, if the SVM returns a liveness detection result of 1 (the first detection value), the face of the object to be identified is determined to be live; if the SVM returns a liveness detection result of 0 (the second detection value), the face of the object to be identified is determined to be non-live. It should be noted that in practical applications, the first and second detection values ​​can be ASCII codes, natural numerical values, or NAND codes.

[0110] The face liveness detection method provided in this embodiment first determines whether the feature difference value between the color face image and the infrared face image of the object to be identified meets the preset feature difference value standard. If it meets the standard, it means that the color face image and the infrared face image match, and the face of the object to be identified can be preliminarily determined to be live, and the next step can be performed. If it does not meet the standard, the face of the object to be identified is preliminarily determined to be non-live. Through the above analysis and judgment, the face of the object to be identified can be preliminarily detected for liveness. Then, according to the preset image conversion rules, the color face image corresponding to the object to be identified is converted to color space, and the feature vector corresponding to the color space image in the color space is extracted and processed to obtain the corresponding enhanced feature vector, i.e., face texture features. Finally, it is handed over to the trained preset feature training model for discrimination and outputs the corresponding liveness judgment result. If the judgment result is the first judgment value, the face of the object to be identified is finally determined to be live. If the judgment result is the second judgment value, the face of the object to be identified is finally determined to be non-live, thereby improving the accuracy of face liveness detection.

[0111] In one embodiment of this example, such as Figure 2 As shown, step S106, which involves processing the color space image using a feature extraction algorithm to generate the corresponding feature vector, includes the following steps:

[0112] S201. Obtain the corresponding target component image based on the color space image;

[0113] S202. Extract the local features corresponding to the target component map according to the feature extraction algorithm;

[0114] S203. Identify local features and generate corresponding feature vectors.

[0115] The color space image in step S201 is a color face image converted from the RGB color space to the YCbCr color space using OpenCV.

[0116] Furthermore, the corresponding target component map is obtained based on the color space image. The target component map includes the Y component map, Cb component map, and Cr component map. In order to further extract the facial features in the target component map, the local features corresponding to the target component map are extracted by the feature extraction algorithm, and then the corresponding feature vector is generated by recognizing the local features.

[0117] It should be noted that the feature extraction algorithm is the LBP algorithm. After LBP feature extraction is performed on the Y component map, Cb component map and Cr component map respectively, three corresponding feature values ​​will be obtained. These three feature values ​​are all high-dimensional vectors, and the PCA method is needed to reduce the dimensionality.

[0118] Among them, the Local Binary Pattern (LBP) algorithm is a local binary pattern algorithm, capable of describing image texture and possessing advantages such as rotation invariance and grayscale invariance. The most basic LBP algorithm, like some image processing algorithms, defines a basic operator, applies it to the entire image, and extracts image texture through a sliding window. Similarly, LBP features are operators used to describe local image features. PCA is a data dimensionality reduction algorithm. The feature values ​​obtained after LBP feature extraction from the Y-component, Cb-component, and Cr-component images are dimensionality reduced using PCA, minimizing information loss while compressing data.

[0119] The face liveness detection method provided in this embodiment extracts local features from the Y component map, Cb component map and Cr component map, which facilitates the generation of feature vectors of the facial texture features of the object to be identified based on these local features.

[0120] In one embodiment of this example, such as Figure 3 As shown, the first facial feature value includes the coordinates of the region center, the second facial feature value includes pixel values, and step S104, which determines whether the feature difference value between the first facial feature value and the second facial feature value meets the preset feature difference value standard, includes the following steps:

[0121] S301. Calculate the center coordinate values ​​of the regions corresponding to the color face image and the infrared face image according to the preset center coordinate algorithm, and generate the corresponding region center coordinate difference value;

[0122] S302. If the difference value of the center coordinates of the region is greater than the preset center coordinate difference threshold, then the pixel values ​​corresponding to the color face image and the infrared face image are calculated according to the preset pixel value algorithm, and the corresponding pixel difference value is generated.

[0123] S303. If the pixel difference value is greater than the preset pixel difference threshold, it is determined that the feature difference value between the first face feature value and the second face feature value meets the preset feature difference value standard.

[0124] S304. If the pixel center difference value is less than or equal to the preset pixel threshold, it is determined that the feature difference value between the first face feature value and the second face feature value does not meet the preset feature difference value standard.

[0125] In practical applications, to further improve the accuracy of liveness detection of the face of the object to be identified, the center coordinates and pixel size of the corresponding regions of the two images, color face image and infrared face image, can be analyzed and judged simultaneously.

[0126] For example, such as Figure 4 The image shown is a graph of the four corner coordinates of a color face image and an infrared face image, where X... aRepresents the X and Y coordinates of point a. a Represents the Y-coordinate and X-coordinate of point a. A Represents the X and Y coordinates of point A. A H represents the Y coordinate of point A. n W represents the height of the rectangle containing point a. n H represents the width of the rectangle containing point a. m W represents the height of the rectangle containing point A. m This represents the width of the rectangle containing point A.

[0127] The preset center coordinate algorithm is: w = Min(X) a +(X) b -X a ), X A +(X) B -X A ))-Max(X a X A ), h=Min(Y a Y A )-Max(Y d Y D Min represents finding the minimum value, Max represents finding the maximum value, and the center coordinates of the region corresponding to the color face image are X. a and Y a The center coordinates of the region corresponding to the infrared face image are X. A and Y A The difference values ​​of the center coordinates of the regions are w (X coordinate difference) and h (Y coordinate difference). The preset center coordinate difference threshold is: w≤0, h≤0. If w≤0 or h≤0, it can be determined that the difference value of the center coordinates of the regions is less than the preset center coordinate difference threshold, indicating that the color face image and the infrared face image have failed to match. If w>0, h>0, it can be determined that the difference value of the center coordinates of the regions is greater than the preset center coordinate difference threshold, and proceed to the next step of judgment.

[0128] Furthermore, the calculation formula corresponding to the preset pixel value algorithm is relust = (w × h) / (H) n ×W n +H m ×W m -w×h), the pixel value corresponding to the color face image is H. n and W n H corresponding to infrared face image m and W mThe preset pixel difference threshold is 0.5. Relust is the pixel difference value between the color face image and the infrared face image. The pixel difference value also represents the size of the overlapping part of the color face image and the infrared face image. If relust > 0.5, it can be determined that the pixel center difference value is greater than the preset pixel difference threshold, indicating that the color face image and the infrared face image are successfully matched. If relust ≤ 0.5, it can be determined that the pixel center difference value is less than or equal to the preset pixel difference threshold, indicating that the color face image and the infrared face image are not matched.

[0129] This embodiment provides a face liveness detection method. By determining whether the differences in the center coordinates and pixel values ​​of the region corresponding to the color face image and the region corresponding to the infrared face image both meet the corresponding preset difference standards, it is possible to analyze and determine whether the color face image and the infrared face image of the object to be identified match based on multiple face feature values, thereby further improving the accuracy of face liveness detection.

[0130] In one embodiment of this example, such as Figure 5 As shown, after step S104, which determines whether the feature difference value between the first facial feature value and the second facial feature value meets the preset feature difference value standard, the following steps are also included:

[0131] S401. If the feature difference value between the first facial feature value and the second facial feature value does not meet the preset feature difference value standard, then generate the corresponding first facial dynamic feature acquisition instruction;

[0132] S402. Collect the first facial dynamic features corresponding to the object to be identified according to the first facial dynamic feature acquisition instruction;

[0133] S403. Determine whether the first facial dynamic feature conforms to the preset facial dynamic feature standard;

[0134] S404. If the first facial dynamic feature does not meet the preset facial dynamic feature standard, a facial anomaly recognition prompt is generated.

[0135] In practical applications, if the feature difference between the first facial feature value and the second facial feature value does not meet the preset feature difference value standard, the object to be identified can be determined to be non-living. However, in order to further improve the accuracy of liveness detection, a facial expression detection instruction is sent to the object to be identified, namely the first facial dynamic feature acquisition instruction in step S401. The first facial dynamic feature acquisition instruction includes a standard that indicates the object to be identified to make corresponding facial movements, namely the preset facial dynamic feature standard in step S403. Then, the current facial dynamic features of the object to be identified are acquired, namely the first facial dynamic features in step S402. The object to be identified can make corresponding facial movements according to the prompt information of the preset facial dynamic feature standard.

[0136] For example, the preset facial dynamic feature standard is opening and closing the mouth 3 times. According to the first facial dynamic feature acquisition instruction, the system uses a regular color camera to acquire the dynamic image of the face of the object to be identified within a reasonable time. The system analyzes the dynamic image to obtain the first facial dynamic feature of the object to be identified. The first facial dynamic feature is the number of times the object's mouth opens and closes. The system counts the number of times the object's mouth opens and closes in real time. If the count is equal to 3 times, the system determines that the first facial dynamic feature of the object to be identified meets the corresponding preset facial dynamic feature standard, and the system then proceeds to the next step of face recognition detection.

[0137] For example, if the number of mouth opening and closing movements counted is not equal to 3, it can be determined that the first facial dynamic feature of the object to be identified does not meet the corresponding preset facial dynamic feature standard. The system will then generate a facial abnormality recognition prompt message to alert the relevant facial recognition detection personnel.

[0138] The face liveness detection method provided in this embodiment determines whether the first facial dynamic feature of the current subject meets the preset facial dynamic feature standard set by the system, thereby improving the accuracy of face liveness detection.

[0139] In one embodiment of this example, such as Figure 6 As shown, after step S403, which determines whether the first facial dynamic feature meets the preset facial dynamic feature standard, the following steps are also included:

[0140] S501. If the first facial dynamic feature meets the preset facial dynamic feature standard, then obtain the authentication identity information of the object to be identified;

[0141] S502. Based on the authentication identity information, obtain and generate the corresponding second facial dynamic feature acquisition instruction according to the corresponding historical facial dynamic features;

[0142] S503. Collect the second facial dynamic features of the object to be identified according to the second facial dynamic feature acquisition instruction;

[0143] S504. Determine whether the second facial dynamic feature matches the historical facial dynamic feature;

[0144] S505. If the second facial dynamic feature does not match the historical facial dynamic feature, a facial anomaly recognition prompt is generated.

[0145] In practical applications, in order to further enhance the security of identity verification of the object to be identified, a backup facial dynamic feature corresponding to the person who has been verified by the system is set up, namely the historical facial dynamic feature in step S502. The backup facial dynamic feature can be entered after the person has been verified by the system.

[0146] It should be noted that, based on the first facial dynamic feature meeting the preset facial dynamic feature standard, the next step of the system is to detect facial liveness. First, the system obtains the authentication identity information of the person to be identified. The authentication identity information is the identity record information corresponding to the person after real-name authentication by the system. The facial information of the person to be identified can be captured by the facial recognition camera.

[0147] The system includes an authentication information database that stores facial authentication information of individuals who have undergone real-name authentication. If the system matches the corresponding facial authentication information from the database based on the facial information of the person to be identified, it indicates that the person to be identified is a real-name authenticated individual, and the system outputs the authentication identity information of the person to be identified. If no corresponding facial authentication information is matched from the database based on the facial information of the person to be identified, it indicates that the person to be identified is an unknown person, and the system outputs a message indicating that the identity authentication failed.

[0148] Furthermore, based on the authentication identity information, a corresponding second facial dynamic feature acquisition instruction is obtained and generated according to the corresponding historical facial dynamic features. The historical facial dynamic features are different depending on the authentication identity information. The second facial dynamic feature acquisition instruction includes a facial dynamic information acquisition instruction generated based on the historical facial dynamic features. The system controls the face recognition camera to acquire the facial dynamic features of the current object to be identified within a reasonable time according to the second facial dynamic feature acquisition instruction, which is the second facial dynamic feature in step S503.

[0149] For example, if the historical facial dynamic feature corresponding to the identity information of person A is that the mouth opens and closes 6 times, the system will collect the second facial dynamic feature of the current person to be identified based on the historical facial dynamic feature. The second facial dynamic feature is the number of times the mouth opens and closes. If the number of times the mouth opens and closes is 6, it can be determined that the second facial dynamic feature matches the corresponding historical facial dynamic feature, and the system will then proceed to the next step of face recognition detection.

[0150] For example, if the system collects the second facial dynamic feature, namely the number of times the mouth opens and closes, which is 5 times, it can be determined that the second facial dynamic feature does not conform to the corresponding historical facial dynamic feature. The system will then generate a facial anomaly recognition prompt to alert the relevant personnel in the facial recognition detection.

[0151] The face liveness detection method provided in this embodiment obtains the historical facial dynamic features recorded by the tested object when setting the authentication information based on the authenticated identity information of the tested object, and further determines whether the second facial dynamic features of the current tested object match its historical facial dynamic features, thereby improving the security of the tested object's identity verification.

[0152] In one embodiment of this example, such as Figure 7 As shown, step S504, which determines whether the second facial dynamic feature matches the historical facial dynamic feature, includes the following steps:

[0153] S601. Obtain the facial dynamic feature verification items corresponding to historical facial dynamic features;

[0154] S602. If there are multiple facial dynamic feature verification items, then obtain the corresponding facial dynamic feature recognition item in the second facial dynamic feature.

[0155] S603. If the number of facial dynamic feature recognition items and the number of facial dynamic feature verification items are equal, then obtain the verification order corresponding to the facial dynamic feature verification items;

[0156] S604. Determine whether the recognition order of facial dynamic feature recognition items conforms to the verification order;

[0157] S605. If the recognition order of the facial dynamic feature recognition items conforms to the verification order, then it is determined that the second facial dynamic feature conforms to the historical facial dynamic feature.

[0158] S606. If the recognition order of the facial dynamic feature recognition items does not conform to the verification order, it is determined that the second facial dynamic feature does not conform to the historical facial dynamic feature.

[0159] The facial dynamic feature verification item in step S601 refers to the number of facial dynamic features corresponding to the historical facial dynamic features. For example, historical facial dynamic features include opening and closing the mouth 6 times and blinking the eyes 3 times, where opening and closing the mouth 6 times and blinking the eyes 3 times are two facial dynamic feature verification items.

[0160] In practical applications, if there are multiple facial dynamic feature verification items, it is further determined whether the number of facial dynamic feature recognition items corresponding to the second facial dynamic feature is equal to the number of facial dynamic feature verification items. Facial dynamic feature recognition items refer to the facial dynamic features performed by the current object to be identified relative to the facial dynamic feature verification items. In this process, the system will send facial dynamic feature collection prompt information to the object to be identified in advance, prompting the object to be identified to perform facial actions corresponding to the facial dynamic feature verification items within a reasonable time.

[0161] For example, historical facial dynamic features include opening and closing the mouth 6 times and blinking the eyes 3 times. The system will send prompts about mouth opening and closing and blinking to the subject to be identified in advance. If the subject opens and closes the mouth 6 times and blinks the eyes 3 times, the next step of judgment will be carried out.

[0162] Furthermore, the verification order corresponding to the facial dynamic feature verification items is obtained. For example, if the facial dynamic feature verification items are opening and closing the mouth 6 times and blinking the eyes 3 times, the corresponding verification order is to first verify the facial dynamic feature of blinking the eyes 3 times, and then verify the facial dynamic feature of opening and closing the mouth 6 times.

[0163] For example, the system captures the facial dynamic information of the subject to be identified using a face recognition camera within a reasonable shooting time. After analyzing the facial dynamic information, the facial dynamic feature recognition items are the mouth opening and closing 6 times and the eyes blinking 3 times. The subject to be identified first performed the facial dynamic feature of blinking 3 times and then performed the facial dynamic feature of opening and closing the mouth 6 times. It can be determined that the recognition order of the facial dynamic feature recognition items conforms to the corresponding verification order.

[0164] For example, analyzing the facial dynamic information of the object to be identified reveals that the facial dynamic features are mouth opening and closing 6 times and eyes blinking 3 times. The object to be identified first performed the facial dynamic feature of mouth opening and closing 6 times, and then performed the facial dynamic feature of eyes blinking 3 times. It can be determined that the recognition order of the facial dynamic features does not conform to the corresponding verification order.

[0165] The face liveness detection method provided in this embodiment, based on the fact that the number of facial dynamic feature recognition items and facial dynamic feature verification items are equal, further determines whether the recognition order of the facial dynamic feature recognition items conforms to the verification order, thereby improving the security of the identity recognition of the tested object.

[0166] In one of the first embodiments of this example, such as Figure 8 As shown, step S604, which determines whether the second facial dynamic feature matches the historical facial dynamic feature, includes the following steps:

[0167] S701. Obtain the facial dynamic feature recognition item corresponding to the second facial dynamic feature;

[0168] S702. Identify facial dynamic feature recognition items and match the facial dynamic feature verification items corresponding to historical facial dynamic features;

[0169] S703. Determine whether the duration of facial dynamics corresponding to the facial dynamics recognition item is within the threshold range of the duration of facial dynamics corresponding to the facial dynamics verification item.

[0170] S704. If the duration of facial dynamics corresponding to the facial dynamics recognition item is within the threshold range of the duration of facial dynamics corresponding to the facial dynamics verification item, then the second facial dynamics feature is determined to conform to the historical facial dynamics feature.

[0171] S705. If the duration of facial dynamics corresponding to the facial dynamics recognition item exceeds the threshold range of the duration of facial dynamics corresponding to the facial dynamics verification item, it is determined that the second facial dynamics feature does not conform to the historical facial dynamics feature.

[0172] The facial dynamic duration in step S703 refers to the duration of a single facial dynamic feature recognition item performed by the current object to be identified, and the facial dynamic duration threshold range refers to the verification standard duration corresponding to the facial dynamic duration.

[0173] For example, the facial dynamic feature verification items are opening and closing the mouth 6 times and blinking the eyes 3 times. The corresponding facial dynamic duration threshold ranges are: the time threshold range for blinking the eyes 3 times is 3 seconds < S1 < 5 seconds, and the time threshold range for opening and closing the mouth 6 times is 6 seconds < S1 < 10 seconds. After the system collects the facial dynamic feature recognition items of the object to be identified, it can be found that the time taken for blinking the eyes 3 times is 4 seconds, and the time taken for opening and closing the mouth 6 times is 8 seconds. Therefore, it can be determined that the facial dynamic duration corresponding to the facial dynamic feature recognition item of the object to be identified is within the facial dynamic duration threshold range corresponding to the facial dynamic feature verification item. Therefore, the second facial dynamic feature conforms to the historical facial dynamic feature.

[0174] For example, after the system collects the facial dynamic features of the object to be identified, it can be found that the time taken for the eyes to blink 3 times is 2 seconds and the time taken for the mouth to open and close 6 times is 11 seconds. Therefore, it can be determined that the facial dynamic duration corresponding to the facial dynamic feature recognition item of the object to be identified exceeds the facial dynamic duration threshold range corresponding to the facial dynamic feature verification item. Therefore, the second facial dynamic feature does not conform to the historical facial dynamic feature.

[0175] The face liveness detection method provided in this embodiment determines whether the facial dynamic duration corresponding to the facial dynamic feature recognition item is within the facial dynamic duration threshold range corresponding to the facial dynamic feature verification item, thereby further improving the security of identity verification of the tested object.

[0176] This application also discloses a face liveness detection system, such as... Figure 9As shown, it includes:

[0177] The first acquisition module 1 is used to acquire a color face image and an infrared face image of the object to be identified;

[0178] The second acquisition module 2 is used to acquire the coordinates of the first face corners corresponding to the color face image and the coordinates of the second face corners corresponding to the infrared face image according to the face detection algorithm.

[0179] Calculation module 3 is used to calculate the four-corner coordinates of the first face and the four-corner coordinates of the second face according to the four-corner coordinate algorithm, and generate the first face feature value corresponding to the four-corner coordinates of the first face and the second face feature value corresponding to the four-corner coordinates of the second face respectively.

[0180] Module 4 is used to determine whether the feature difference value between the first facial feature value and the second facial feature value is less than a preset feature difference value threshold.

[0181] If the feature difference between the first facial feature value and the second facial feature value is less than a preset feature difference value threshold, the conversion module 5 is used to convert the color facial image according to the preset image conversion rules and generate the corresponding color space image.

[0182] Processing module 6 is used to process the color space image according to the feature extraction algorithm and generate the corresponding feature vector;

[0183] Module 7 is used to normalize the feature vectors and generate corresponding enhanced feature vectors.

[0184] Output module 8 is used to process the enhanced feature vector according to the preset feature training model and output the corresponding liveness detection result.

[0185] If the liveness determination result is the first determination value, the first determination module 9 is used to determine that the object to be identified is a live face.

[0186] If the liveness determination result is the second determination value, the second determination module 10 is used to determine that the object to be identified is a non-live face.

[0187] The face liveness detection system provided in this embodiment calculates the four-corner coordinates of the first face and the two face according to the four-corner coordinate algorithm in the calculation module 3. This allows the judgment module 4 to determine whether the feature difference between the first and second face feature values ​​calculated by the calculation module 3 is less than a preset feature difference threshold. If it is less, it indicates that the color face image matches the infrared face image, thus leading to a preliminary judgment that the face is alive. Subsequently, the conversion module 5 converts the color face image according to a preset image conversion rule to generate a corresponding color space image. Based on the generated color space image, the processing module 6 obtains the corresponding feature vector, i.e., the face texture feature, in the color face image. The enhanced feature vector corresponding to the face texture feature is further processed and judged by the preset feature training model trained in the output module 8, outputting the corresponding liveness judgment result. Finally, based on the first or second judgment value displayed by the liveness judgment result, the first judgment module 9 or the second judgment module 10 determines whether the face of the object to be identified is alive or not, thereby improving the accuracy of face liveness detection.

[0188] It should be noted that the face liveness detection system provided in this application embodiment also includes various modules and / or corresponding sub-modules corresponding to the logical functions or logical steps of any of the above-mentioned face liveness detection methods, achieving the same effect as each logical function or logical step, which will not be elaborated here.

[0189] This application also discloses a terminal device, including a memory, a processor, and computer instructions stored in the memory and capable of running on the processor, wherein the processor executes the computer instructions using any of the face liveness detection methods described in the above embodiments.

[0190] The terminal device can be a computer device such as a desktop computer, a laptop computer, or a cloud server. The terminal device includes, but is not limited to, a processor and a memory. For example, the terminal device may also include input / output devices, network access devices, and buses.

[0191] The processor can be a central processing unit (CPU). Of course, depending on the actual use, it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc., and this application does not limit it.

[0192] The memory can be an internal storage unit of the terminal device, such as a hard disk or RAM of the terminal device, or an external storage device of the terminal device, such as a plug-in hard disk, smart memory card (SMC), secure digital card (SD), or flash memory card (FC) equipped on the terminal device. Furthermore, the memory can be a combination of internal storage units and external storage devices of the terminal device. The memory is used to store computer instructions and other instructions and data required by the terminal device. The memory can also be used to temporarily store data that has been output or will be output. This application does not limit this.

[0193] In this terminal device, any one of the face liveness detection methods in the above embodiments is stored in the memory of the terminal device and loaded and executed on the processor of the terminal device for convenient use.

[0194] This application also discloses a computer-readable storage medium, which stores computer instructions, wherein when the computer instructions are executed by a processor, any of the face liveness detection methods described in the above embodiments are employed.

[0195] The computer instructions can be stored in a computer-readable medium. The computer instructions include computer instruction code, which can be in the form of source code, object code, executable file, or certain middleware. The computer-readable medium includes any entity or device capable of carrying computer instruction code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the computer-readable medium includes, but is not limited to, the above-mentioned components.

[0196] In this computer-readable storage medium, any one of the face liveness detection methods in the above embodiments is stored in the computer-readable storage medium and loaded and executed on the processor to facilitate the storage and application of the above methods.

[0197] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.

Claims

1. A method for detecting human face liveness, characterized in that, Includes the following steps: Acquire color and infrared facial images of the object to be identified; Based on the face detection algorithm, the coordinates of the first face corners corresponding to the color face image and the coordinates of the second face corners corresponding to the infrared face image are obtained respectively. The four-corner coordinates of the first face and the four-corner coordinates of the second face are calculated according to the four-corner coordinate algorithm, and the first face feature value corresponding to the four-corner coordinates of the first face and the second face feature value corresponding to the four-corner coordinates of the second face are generated respectively. Determine whether the feature difference value between the first facial feature value and the second facial feature value meets the preset feature difference value standard; If the feature difference value between the first facial feature value and the second facial feature value meets the preset feature difference value standard, then the color facial image is converted according to the preset image conversion rules to generate the corresponding color space image; The color space image is processed according to a feature extraction algorithm to generate a corresponding feature vector; The feature vector is normalized to generate the corresponding enhanced feature vector; The enhanced feature vector is processed according to the preset feature training model, and the corresponding liveness detection result is output. If the liveness determination result is the first determination value, then the object to be identified is determined to be a live human face; If the liveness determination result is the second determination value, then the object to be identified is determined to be a non-live human face; The first facial feature value includes the coordinates of the region center, the second facial feature value includes pixel values, and the step of determining whether the feature difference value between the first facial feature value and the second facial feature value meets the preset feature difference value standard includes the following steps: The center coordinate values ​​of the regions corresponding to the color face image and the infrared face image are calculated according to the preset center coordinate algorithm, and the corresponding region center coordinate difference values ​​are generated. If the difference value of the center coordinates of the region is greater than the preset center coordinate difference threshold, then the pixel values ​​corresponding to the color face image and the infrared face image are calculated according to the preset pixel value algorithm to generate the corresponding pixel difference value. If the pixel difference value is greater than a preset pixel difference threshold, it is determined that the feature difference value between the first facial feature value and the second facial feature value meets the preset feature difference value standard. If the pixel difference value is less than or equal to the preset pixel difference threshold, it is determined that the feature difference value between the first facial feature value and the second facial feature value does not meet the preset feature difference value standard. After determining whether the feature difference value between the first facial feature value and the second facial feature value meets the preset feature difference value standard, the following steps are also included: If it is determined that the feature difference value between the first facial feature value and the second facial feature value does not meet the preset feature difference value standard, then a corresponding first facial dynamic feature acquisition instruction is generated; According to the first facial dynamic feature acquisition instruction, the first facial dynamic feature corresponding to the object to be identified is acquired; Determine whether the first facial dynamic feature conforms to the preset facial dynamic feature standard; If the first facial dynamic feature does not conform to the preset facial dynamic feature standard, a facial anomaly recognition prompt is generated; After determining whether the first facial dynamic feature meets the preset facial dynamic feature standard, the following steps are also included: If the first facial dynamic feature matches the preset facial dynamic feature standard, then the authentication identity information of the object to be identified is obtained; Based on the authentication identity information, obtain and generate the corresponding second facial dynamic feature acquisition instruction according to the corresponding historical facial dynamic features; According to the second facial dynamic feature acquisition instruction, the second facial dynamic features of the object to be identified are acquired; Determine whether the second facial dynamic feature matches the historical facial dynamic feature; If the second facial dynamic feature does not match the historical facial dynamic feature, then the facial anomaly recognition prompt is generated.

2. The face liveness detection method according to claim 1, characterized in that, The step of processing the color space image according to the feature extraction algorithm to generate the corresponding feature vector includes the following steps: Based on the color space image, obtain the corresponding target component image; According to the feature extraction algorithm, local features corresponding to the target component map are extracted; Identify the local features and generate the corresponding feature vector.

3. The face liveness detection method according to claim 1, characterized in that, The step of determining whether the second facial dynamic feature matches the historical facial dynamic feature includes the following steps: Obtain the facial dynamic feature verification items corresponding to the historical facial dynamic features; If there are multiple facial dynamic feature verification items, then the corresponding facial dynamic feature recognition item in the second facial dynamic feature is obtained; If the number of facial dynamic feature recognition items is equal to the number of facial dynamic feature verification items, then the verification order corresponding to the facial dynamic feature verification items is obtained; Determine whether the recognition order of the facial dynamic feature recognition items conforms to the verification order; If the recognition order of the facial dynamic feature recognition item matches the verification order, then it is determined that the second facial dynamic feature matches the historical facial dynamic feature; If the recognition order of the facial dynamic feature recognition item does not conform to the verification order, it is determined that the second facial dynamic feature does not conform to the historical facial dynamic feature.

4. The face liveness detection method according to claim 1, characterized in that, The step of determining whether the second facial dynamic feature matches the historical facial dynamic feature includes the following steps: Obtain the facial dynamic feature recognition item corresponding to the second facial dynamic feature; Identify the facial dynamic feature recognition item and match the facial dynamic feature verification item corresponding to the historical facial dynamic feature; Determine whether the facial dynamic duration corresponding to the facial dynamic feature recognition item is within the threshold range of the facial dynamic duration corresponding to the facial dynamic feature verification item. If the duration of facial dynamics corresponding to the facial dynamics recognition item is within the threshold range of the duration of facial dynamics corresponding to the facial dynamics verification item, then it is determined that the second facial dynamics feature conforms to the historical facial dynamics feature. If the duration of facial dynamics corresponding to the facial dynamics recognition item exceeds the threshold range of the duration of facial dynamics corresponding to the facial dynamics verification item, then it is determined that the second facial dynamics feature does not conform to the historical facial dynamics feature.

5. A face liveness detection system, characterized in that, The method for performing the face liveness detection method according to any one of claims 1 to 4 includes: The first acquisition module is used to acquire color face images and infrared face images of the object to be identified; The second acquisition module is used to acquire the first face corner coordinates corresponding to the color face image and the second face corner coordinates corresponding to the infrared face image according to the face detection algorithm. The calculation module is used to calculate the four-corner coordinates of the first face and the four-corner coordinates of the second face according to the four-corner coordinate algorithm, and generate the first face feature value corresponding to the four-corner coordinates of the first face and the second face feature value corresponding to the four-corner coordinates of the second face respectively. The judgment module is used to determine whether the feature difference value between the first facial feature value and the second facial feature value is less than a preset feature difference value threshold. The conversion module is configured to convert the color face image according to a preset image conversion rule and generate a corresponding color space image if the feature difference value between the first face feature value and the second face feature value is less than the preset feature difference value threshold. The processing module is used to process the color space image according to the feature extraction algorithm to generate the corresponding feature vector; The generation module is used to normalize the feature vector and generate a corresponding enhanced feature vector. The output module is used to process the enhanced feature vector according to the preset feature training model and output the corresponding liveness detection result. If the liveness determination result is a first determination value, the first determination module is used to determine that the object to be identified is a live face. If the liveness determination result is a second determination value, the second determination module is used to determine that the object to be identified is a non-live human face.

6. A terminal device, comprising a memory and a processor, characterized in that, The memory stores computer instructions that can run on the processor. When the processor loads and executes the computer instructions, it employs a face liveness detection method as described in any one of claims 1 to 4.

7. A computer-readable storage medium storing computer instructions, characterized in that, When the computer instructions are loaded and executed by the processor, a face liveness detection method as described in any one of claims 1 to 4 is employed.