A non-biometric face signal interception method and system
By using an adaptive normalization algorithm and neural network to estimate the mean and variance of data, the problem of insufficient model generalization in non-biological facial signal interception is solved, achieving high accuracy and low hardware requirements for non-biological facial signal interception, which is suitable for multi-domain data environments.
Patent Information
- Application Number
- CN202210087161.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-25
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2042-01-25
AI Technical Summary
Existing technologies suffer from insufficient model generalization, high computational cost, and unstable convergence in non-biological facial signal interception, especially in multi-domain data environments where it is difficult to maintain high robustness.
An adaptive normalization algorithm is adopted to estimate the mean and variance of the data through a neural network, thereby normalizing the data, reducing the hardware performance requirements, and training is carried out in a system architecture with a high degree of separation between the front end and the back end, which improves the generalization performance and convergence speed of the model.
It improves the model's accuracy and transferability across multi-domain data, reduces the performance requirements of the system's front-end hardware, and ensures a highly robust non-biological facial signal interception effect.
Smart Images

Figure CN114511907B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of non-biological facial signal interception technology, and in particular to a non-biological facial signal interception method and system based on an adaptive normalization method. Background Technology
[0002] Non-biological facial signal interception is a crucial step in the face recognition process, directly impacting user authentication security. However, due to the invisibility and diversity of real-world data, fully utilizing training data to obtain a model with sufficient generalization ability remains a research challenge. Currently, the industry commonly uses two main techniques for domain-generalized liveness detection: meta-learning-based liveness detection methods and domain alignment-based liveness detection methods.
[0003] Meta-learning-based liveness detection methods typically involve multiple training rounds. In each round, a pseudo-target domain, also known as the meta-test domain, is partitioned from multiple source domains, while the remaining source domains are called meta-training domains. The principle is to ensure that the gradient directions calculated based on the loss in the meta-training and meta-test domains are as consistent as possible. This ensures that the model's convergence direction is relatively consistent across data from any domain, resulting in better generalization. Specifically, the loss L1 for the current task is first calculated on the meta-training domain data. Then, gradient descent is used to update the model's parameters. Next, a new task loss L2 is calculated on the meta-test domain data based on the new parameters. Finally, the gradient calculated from L2 is used to update the previous model parameters, ensuring consistent model convergence. The main drawbacks of this type of algorithm are the use of quadratic gradients, leading to high computational cost, and unstable convergence during model optimization, resulting in insufficient guarantee of model performance.
[0004] The main purpose of domain-aligned liveness detection methods is to map the original image into a feature space that focuses on liveness information but is insensitive to domain information. This involves aligning data from all domains. The principle is that data distributions across multiple domains differ, and features extracted after model mapping inevitably still carry domain information. Therefore, to generalize to unseen target domain data, the feature extractor needs to weaken the interference of domain information and strengthen the utilization of liveness information. Specifically, this is achieved using a domain discriminator. Utilizing an adversarial approach, the features extracted by the feature extractor, while ensuring liveness detection, need to deceive the domain discriminator, preventing it from identifying the source domain of the features. The domain discriminator's task is to determine the domain origin of the features as much as possible. The two work together to ultimately align all domains in the feature space. The main drawback of this type of algorithm is the difficulty in maintaining a balance between the feature extractor and the domain discriminator during training, making model training challenging. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides a method and system for intercepting non-biological facial signals that maintains high robustness across various application scenarios. This method and system utilize an adaptive normalization algorithm and a neural network to estimate the mean and variance of the data. This eliminates the need to forcibly apply the mean and variance of the training samples during testing and inference, significantly improving the model's generalization performance and convergence speed. Furthermore, the system's highly separated front-end and back-end reduces the requirements for the system's front-end hardware performance, ensuring high transferability.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0007] A method for intercepting non-biological facial signals, comprising:
[0008] Step 1: Face image preprocessing:
[0009] Collect human facial data, then expand the human facial data into a live face dataset, and divide the dataset into training and testing sets according to the proportions. Perform depth estimation on the faces in the dataset images to obtain depth images.
[0010] The human facial data includes: live human face images and attack images.
[0011] Step 2: Facial image feature extraction and classification:
[0012] In the training set, normalized features are calculated using an adaptive normalization algorithm to obtain normalized facial images. The adaptive normalization algorithm, i.e., AN, is then embedded into the main feature extraction network for co-training and to extract facial features. The extracted features are then input into the classification network to obtain classification vectors. Finally, the network parameters are optimized by calculating the loss function value to obtain the trained network model.
[0013] The adaptive normalization algorithm can estimate the mean and variance of the depth image data in step 1. The mean and variance are used to normalize the data, and affine transformation is performed with the help of learnable parameters to obtain normalized features.
[0014] Step 3, Model Testing:
[0015] In the test set, the model obtained in step 2 is tested using the data in the test set to determine whether it meets the requirements for non-biological facial signal interception. If it does not meet the requirements, training continues.
[0016] Step 4: Image category inference:
[0017] Using the tested model, determine whether the face image to be inferred is a live face image or a non-live face image.
[0018] Preferably, in step 1, the dataset is divided into a training set and a test set in a ratio of 8:2. During the division, the proportion of images of different categories in real biological facial images and attack images is kept balanced.
[0019] Preferably, the specific implementation method for depth estimation of faces in the dataset images described in step 1 is as follows:
[0020] Face detection technology is applied to facial images in the dataset to automatically select regions containing faces and expand them at a ratio of 1:1.8 to obtain more background. The expanded regions are then cropped. For the cropped real live face images, a depth map with depth information is calculated as a label. For the cropped attack images, the calculated depth map is a black background image of the same size.
[0021] Preferably, the specific implementation method for collecting human facial data in step 1 is as follows:
[0022] The methods for acquiring real live human face images are: normal acquisition through photography; wherein, the methods for acquiring attack images include: acquiring photos and screen captures containing live human face images, acquiring images using 3D models or by wearing masks, and generating images using existing image generation methods.
[0023] Preferably, the collected live face images are further expanded by means of image rotation, flipping, and scaling.
[0024] Preferably, the adaptive normalization algorithm described in step 2 is implemented as follows:
[0025] (1) First, the mean μ and variance σ of the current image data are estimated using a mean-variance estimation network. 2 The data x is then normalized using the obtained mean and variance. Finally, an affine transformation is performed on the data using learnable parameters γ and β to obtain the normalized features.
[0026]
[0027] (3) Wherein, the mean-variance estimation network: MVENet, the structure includes a global average pooling layer and a convolutional layer conv;
[0028] The global pooling layer reduces the size of the feature map, and the convolutional layer performs a non-linear transformation on the reduced feature map. The number of image features gradually decreases from 64, 32, and 16 to 1. Finally, the mean μ and variance σ of the image data can be calculated through this network. 2 The estimation results.
[0029] Preferably, it further includes estimating the loss L est :
[0030] in, and Estimate the loss L based on the true statistical mean and variance. est The calculation method is as follows:
[0031]
[0032] Combined with estimated loss L est Calculate the estimated mean μ and variance σ. 2 As close as possible to the true statistical mean and variance
[0033] Preferably, the specific implementation method for embedding the adaptive normalization algorithm into the main feature extraction network for collaborative training as described in step 2 is as follows:
[0034] (1) Normalized features are input into a main feature extraction network with an embedded AN structure to extract usable features. Then, a classification network is used to obtain a classification vector from the usable features. The overall loss function value is determined by the classification vector and the face liveness label. At the same time, the classification loss L is combined with the data. cls and deep regression loss L dep Optimize all parameters;
[0035] (2) Update the training parameters. Based on the loss cost function value, update the parameters of the main feature extraction network, classification network and depth estimation network on the training set using backpropagation techniques.
[0036] (3) When the loss cost function value of face liveness classification on the training set based on the features extracted by the main feature extraction network is less than the set threshold, training is stopped, assuming that the current model can meet the requirements of non-biological facial signal interception.
[0037] Preferably, the specific implementation method for testing the model obtained in step 2 using the test set data in step 3 is as follows:
[0038] (1) On the test set, the mean and variance of the current data are estimated using the mean-variance estimation network;
[0039] (2) Normalize the data using the obtained mean and variance, and perform affine transformation on the data using learnable parameters to obtain normalized features;
[0040] (3) The adaptively normalized face image is input into the main feature extraction network with an AN structure to extract usable features. The extracted features are then input into the classification network to obtain the classification vector. The probability p of the corresponding face image being a live face image is obtained. If the probability p is greater than the set threshold, the current face image is determined to be a live face image. Otherwise, the current face image is determined to be a non-live face image, i.e., an attack image.
[0041] If the test accuracy meets the requirements, the current model is considered to indeed satisfy the hypothesis; otherwise, training continues. The test accuracy referred to here is the proportion of correctly intercepted non-biological facial signals among all non-biological facial signals.
[0042] Preferably, this method can be used in conjunction with a non-biological facial signal interception system based on an adaptive normalization algorithm, wherein the system includes:
[0043] The system front-end used to receive images of faces to be detected;
[0044] A system backend that encapsulates non-biological facial signal interception methods and can provide feedback to the system frontend.
[0045] Preferably, the system adopts a front-end and back-end separation architecture, and the system sets up multiple back-end servers and introduces nginx to solve the allocation problem between multiple servers.
[0046] Preferably, the system front-end has network transmission capabilities and can call the camera in the corresponding scene or select an existing image to acquire the face image to be detected and transmit the image to the system back-end.
[0047] Preferably, the system backend server is a uWSGI server, built using the standard Django framework, and its specific functions include:
[0048] (1) Receive the image transmitted from the system front end, and determine whether the transmitted image contains a face through face detection technology. If it does not contain a face, return a prompt to the front end that the input image needs to contain a face. If it contains a face, input the current image into the network, use the neural network trained by the training process to extract the face features in the image, and use the extracted face features as the parameters of the neural network classification layer to output the classification vector.
[0049] (2) Compare the facial image features extracted in the above process with the classification labels. The category with the highest score in the classification vector is considered to be the result of the method in determining whether the image transmitted from the front end is a live face image.
[0050] (3) The backend transmits the non-biological facial signal interception judgment result to the system frontend in real time via the Internet, and the frontend displays the non-biological facial signal interception judgment result on the display screen.
[0051] Preferably, after the system backend transmits the non-biological facial signal interception judgment result to the system frontend, the system frontend can provide corresponding feedback according to different application scenarios, including displaying on a mobile phone screen, displaying on a monitor, or taking corresponding actions by the access control system.
[0052] The beneficial effects of this invention are as follows: by using an adaptive normalization algorithm, the mean and variance of the data are estimated through a neural network, thus avoiding the need to forcibly apply the mean and variance of the training samples during testing and inference. This avoids interference from the training set information, obtains the normalized features of the test set data, and improves the generalization performance of the model, that is, it can improve the accuracy of the model in judging the data type of the target domain. At the same time, the high separation of the front-end and back-end of the system reduces the requirements for the hardware performance of the front-end of the system and ensures the system's portability. Attached Figure Description
[0053] Figure 1 This is a flowchart of the present invention;
[0054] Figure 2 Flowchart for data augmentation;
[0055] Figure 3 A flowchart illustrating the specific process of face detection;
[0056] Figure 4 A flowchart illustrating the specific process of intercepting non-biological facial signals;
[0057] Figure 5 This is a diagram illustrating the scaling operation performed on the selected facial area.
[0058] Figure 6 This is a schematic diagram showing the scaled-down facial area after cropping.
[0059] Figure 7 A facial depth map obtained for depth estimation of the preprocessed raw image;
[0060] Figure 8 This is a system flowchart of the present invention. Detailed Implementation
[0061] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0062] Please see Figure 1-8 As shown, the specific embodiments provided by the present invention are as follows:
[0063] Example 1:
[0064] Step 1: Face image preprocessing:
[0065] Collect human facial data, then expand the human facial data into a live face dataset, and divide the dataset into training and testing sets according to the proportions. Perform depth estimation on the faces in the dataset images to obtain depth images.
[0066] The human facial data includes: live human face images and attack images.
[0067] Step 2: Facial image feature extraction and classification:
[0068] In the training set, normalized features are calculated using an adaptive normalization algorithm to obtain normalized facial images. The adaptive normalization algorithm, i.e., AN, is then embedded into the main feature extraction network for co-training and to extract facial features. The extracted features are then input into the classification network to obtain classification vectors. Finally, the network parameters are optimized by calculating the loss function value to obtain the trained network model.
[0069] The adaptive normalization algorithm can estimate the mean and variance of the depth image data in step 1. The mean and variance are used to normalize the data, and affine transformation is performed with the help of learnable parameters to obtain normalized features.
[0070] Step 3, Model Testing:
[0071] In the test set, the model obtained in step 2 is tested using the data in the test set to determine whether it meets the requirements for non-biological facial signal interception. If it does not meet the requirements, training continues.
[0072] Step 4: Image category inference:
[0073] Using the tested model, determine whether the face image to be inferred is a live face image or a non-live face image.
[0074] In this embodiment, depth estimation is first performed on the live face images in the collected human facial data to obtain image depth data. Normalized features are obtained through an adaptive normalization algorithm. Then, a main feature extraction network with an embedded adaptive normalization algorithm is used to extract usable features. The usable features are then input into a classification network to obtain a classification vector. At the same time, the parameters of the network model are optimized by calculating a loss function. A trained model is obtained on the training set. If the model shows that it meets the requirements for non-biological facial signal interception in the test set, it can be used to infer whether the face image is a live face image or a non-live face image. Otherwise, training continues.
[0075] By designing an adaptive normalization algorithm, the network parameters are automatically adjusted when processing different data features to adapt to the statistical distribution characteristics of the data being processed, so as to achieve the best processing effect and obtain normalized data features.
[0076] Example 2:
[0077] For step 1, the dataset is divided into a training set and a test set in a ratio of 8:2. During the division, the proportion of images of different categories in real biological facial images and attack images is kept balanced.
[0078] In this embodiment, images of different categories are manually divided in a balanced manner to maintain a balanced ratio of data types in the training set and the test set. This avoids the trained model having too few data types available for testing on the test set, and the number of each type being too small.
[0079] Example 3:
[0080] The specific implementation method for depth estimation of faces in the dataset images described in step 1 is as follows:
[0081] Face detection technology is applied to facial images in the dataset to automatically select regions containing faces and expand them at a ratio of 1:1.8 to obtain more background. The expanded regions are then cropped. For the cropped real live face images, a depth map with depth information is calculated as a label. For the cropped attack images, the calculated depth map is a black background image of the same size.
[0082] In this embodiment, considering that the collected data is collected using different devices in different scenarios, the lighting conditions, image size, and especially the size of the biological face in the image are different. In order to ensure that relatively stable facial features can be extracted and a high accuracy rate of non-biological facial signal interception is ultimately achieved, it is necessary to perform preprocessing processes such as cropping and scaling on the original image through certain operations, and then calculate the image depth of the real live face image as a label.
[0083] Face detection technology uses an existing, trained Harr cascade classifier in the network to detect whether the input image contains a face. Specifically, it includes:
[0084] (1) Input the image to be judged into the Harr cascade classifier and perform data normalization operations through histogram equalization and image normalization.
[0085] (2) Determine the area to be detected, that is, determine the sub-window;
[0086] (3) Based on the cascading concept, multiple weak classifiers are used to detect whether the input image contains a face. Each weak classifier has a high correct recognition rate. Once a rejection is obtained in a certain cascading process, that is, the conclusion that the image does not contain a face, the calculation of the current image terminates, and it is determined that the current image does not contain a face. That is, only when the image passes through all cascading processes will it be recognized as containing a face, and the region containing the face will be selected.
[0087] Example 4:
[0088] The specific implementation method for collecting human facial data as described in step 1 is as follows:
[0089] The methods for acquiring real live human face images are: normal acquisition through photography; wherein, the methods for acquiring attack images include: acquiring photos and screen captures containing live human face images, acquiring images using 3D models or by wearing masks, and generating images using existing image generation methods.
[0090] In this embodiment, the real human face liveness image and the attack image are further defined, and the two image acquisition methods are explained to ensure that the types of images acquired are comprehensive enough to basically cover the types of attack images that need to be intercepted. In this way, the trained model can be used to intercept images of the same type as the acquired images.
[0091] Example 5:
[0092] The collected live facial images were further expanded using methods such as image rotation, flipping, and scaling.
[0093] In this embodiment, the data was expanded by adjusting the image orientation and size, utilizing existing data.
[0094] Example 6:
[0095] The specific implementation method for the adaptive normalization algorithm described in step 2 is as follows:
[0096] (1) First, the mean μ and variance σ of the current image data are estimated using a mean-variance estimation network. 2The data x is then normalized using the obtained mean and variance. Finally, an affine transformation is performed on the data using learnable parameters γ and β to obtain the normalized features.
[0097]
[0098] (4) Wherein, the mean-variance estimation network: MVENet, the structure includes a global average pooling layer and a convolutional layer conv;
[0099] The global pooling layer reduces the size of the feature map, and the convolutional layer performs a non-linear transformation on the reduced feature map. The number of image features gradually decreases from 64, 32, and 16 to 1. Finally, the mean μ and variance σ of the image data can be calculated through this network. 2 The estimation results.
[0100] In this embodiment, an adaptive normalization algorithm is designed. The image size can be reduced by passing it through a global pooling layer, which reduces the parameters required by the network and increases the network's computing speed. The reduced image is then passed through a convolutional layer to reduce the number of features in the image to 1. Using these features, the mean and variance of the current data can be estimated. Then, data normalization is used to limit the feature distribution of the data to the range of -1 to 1. Finally, normalized features are obtained through affine transformation, which enhances the feature data. The neural network can easily find patterns by processing such normalized features, thus accelerating the convergence of the model.
[0101] Example 7:
[0102] Further, this includes estimating the loss L. est :
[0103] in, and Estimate the loss L based on the true statistical mean and variance. est The calculation method is as follows:
[0104]
[0105] Combined with estimated loss L est Calculate the estimated mean μ and variance σ. 2 As close as possible to the true statistical mean and variance
[0106] In this embodiment, an estimated loss L is introduced. est This can reduce the computational error of the mean-variance estimation network.
[0107] Example 8:
[0108] The specific implementation method for embedding adaptive normalization into the main feature extraction network for collaborative training as described in step 2 is as follows:
[0109] (1) Normalized features are input into a main feature extraction network with an embedded AN structure to extract usable features. Then, a classification network is used to obtain a classification vector from the usable features. The overall loss function value is determined by the classification vector and the face liveness label. At the same time, the classification loss L is combined with the data. cls and deep regression loss L dep Optimize all parameters;
[0110] (2) Update the training parameters. Based on the loss cost function value, update the parameters of the main feature extraction network, classification network and depth estimation network on the training set using backpropagation techniques.
[0111] (3) When the loss cost function value of face liveness classification on the training set based on the features extracted by the main feature extraction network is less than the set threshold, training is stopped, assuming that the current model can meet the requirements of non-biological facial signal interception.
[0112] In this embodiment, the classification loss L is mainly combined. cls and deep regression loss L dep The parameters of the main feature extraction network, classification network, and depth estimation network are optimized to train the network model. Then, by setting a threshold for the loss cost function value, it is determined whether the model meets the requirements for non-biological facial signal interception.
[0113] Example 9:
[0114] The specific implementation method for testing the model obtained in step 2 using the test set data as described in step 3 is as follows:
[0115] (1) On the test set, the mean and variance of the current data are estimated using the mean-variance estimation network MVENet;
[0116] (2) Normalize the data using the obtained mean and variance, and perform affine transformation on the data using learnable parameters to obtain normalized features;
[0117] (3) The adaptively normalized face image is input into the main feature extraction network with an AN structure to extract usable features. The extracted features are then input into the classification network to obtain the classification vector. The probability p of the corresponding face image being a live face image is obtained. If the probability p is greater than the set threshold, the current face image is determined to be a live face image. Otherwise, the current face image is determined to be a non-live face image, i.e., an attack image.
[0118] If the test accuracy meets the requirements, the current model is considered to indeed satisfy the hypothesis; otherwise, training continues. The test accuracy referred to here is the proportion of correctly intercepted non-biological facial signals among all non-biological facial signals.
[0119] In this embodiment, the utilization of test set data is enhanced by replacing the commonly used regularized BN in the main feature extraction network with adaptive normalization AN (AN, which includes a neural network for estimating the mean and variance of the current input data). This is because BN only calculates the mean and variance of the training data once. When testing the model using test set data, the mean and variance obtained from the training set are also used to obtain the normalized features of the data. By using the adaptive normalization AN in the main feature extraction network, the interference of training set information can be avoided by applying the mean and variance calculated on the training data during testing, thus improving the normalization effect of the test data and making the model generalize better.
[0120] Example 10:
[0121] This method can be used in conjunction with a non-biological facial signal interception system based on an adaptive normalization method, wherein the system includes:
[0122] The system front-end used to receive images of faces to be detected;
[0123] A system backend that encapsulates non-biological facial signal interception methods and can provide feedback to the system frontend.
[0124] In this embodiment, an interception system suitable for the interception method is constructed, which further improves the feasibility of the interception method.
[0125] Example 11:
[0126] The system adopts a front-end and back-end separation architecture, and sets up multiple back-end servers and introduces nginx to solve the coordination problem between multiple servers.
[0127] In this embodiment, the front-end and back-end of the system are highly separated. The front-end of the system only plays the role of data collection and result feedback, which reduces the requirements for the hardware conditions of the front-end of the system and improves the portability of the front-end of the system, allowing it to be connected to various front-end scenarios with different hardware devices.
[0128] Example 12:
[0129] The system front-end has network transmission capabilities and can call up cameras in the corresponding scene or select existing images to acquire the face image to be detected and transmit the image to the system back-end.
[0130] Example 13:
[0131] The system's backend server is a uWSGI server, built using the standard Django framework, and its specific functions include:
[0132] (1) Receive the image transmitted from the system front end, and determine whether the transmitted image contains a face through face detection technology. If it does not contain a face, return a prompt to the front end that the input image needs to contain a face. If it contains a face, input the current image into the network model, use the neural network trained by the training process to extract the face features in the image, and use the extracted face features as the parameters of the neural network classification layer to output the classification vector.
[0133] (2) Compare the facial image features to be classified extracted in the above process with the classification label. The category with the highest score in the classification vector is considered to be the result of the method in determining whether the image transmitted from the front end is a live face image.
[0134] (3) The backend transmits the non-biological facial signal interception judgment result to the system frontend in real time via the Internet, and the frontend displays the non-biological facial signal interception judgment result on the display screen.
[0135] In this embodiment, Django is an open-source MVC-style web application framework powered by the Python programming language. This framework divides the software system into three parts: Model (M), View (V), and Controller (C), hence the name MVC. Django enables developers to create high-quality, maintainable, database-driven web applications quickly and efficiently.
[0136] Although the Django framework itself provides some WSGI server functionality, the provided functionality has certain limitations. For example, the web applications created do not support multi-threaded operations, and the security is relatively poor. Therefore, the system backend server uses uWSGI instead of Django's built-in WSG. However, it is necessary to consider the situation of excessive access to the backend server, that is, the system under high load and high concurrency. Therefore, the system sets up multiple backend servers and introduces nginx to solve the allocation problem between multiple servers, thereby improving the system's concurrency and reducing the memory consumption of the system backend server.
[0137] Example 14:
[0138] After the system backend transmits the non-biological facial signal interception and judgment result to the system frontend, the system frontend can provide corresponding feedback according to different application scenarios, including displaying on the mobile phone screen, displaying on the monitor, or taking corresponding actions by the access control system.
[0139] In this embodiment, the information feedback method of the system front end after receiving the non-biological facial signal interception judgment result transmitted by the system back end is further defined. For example, in scenarios with display devices such as mobile phones, it can be reflected in the form of text, while in scenarios without display devices such as simple access control, it can be reflected in the form of a buzzer or flashing lights, which increases the system function and makes the system suitable for different scenarios.
[0140] In the description of the embodiments of the present invention, it should be understood that the terms "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "center", "top", "bottom", "top", "bottom", "inner", "outer", "inner side", "outer side", etc. indicate the orientation or positional relationship.
[0141] In the description of the embodiments of the present invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," "joining," and "assembly" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0142] In the description of embodiments of the present invention, specific features, structures, materials or characteristics may be combined in any suitable manner in one or more embodiments or examples.
[0143] In the description of the embodiments of the present invention, it should be understood that "-" and "~" represent a range of two numerical values, and this range includes the endpoints. For example, "AB" represents a range greater than or equal to A and less than or equal to B. "A~B" represents a range greater than or equal to A and less than or equal to B.
[0144] In the description of embodiments of the present invention, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0145] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for intercepting non-biological facial signals, wherein, include: Step 1: Face image preprocessing: Collect human facial data, then expand the human facial data into a live face dataset, and divide the dataset into training and testing sets according to the proportions. Perform depth estimation on the faces in the dataset images to obtain depth images. The human facial data includes: live human face images and attack images; Step 2: Facial image feature extraction and classification: In the training set, normalized features are calculated using an adaptive normalization algorithm to obtain normalized facial images. The adaptive normalization algorithm, i.e., AN, is then embedded into the main feature extraction network for co-training and to extract facial features. The extracted features are then input into the classification network to obtain classification vectors. Finally, the network parameters are optimized by calculating the loss function value to obtain the trained network model. The adaptive normalization algorithm can estimate the mean and variance of the depth image data in step 1. The mean and variance are used to normalize the data and affine transformation is performed with the help of learnable parameters to obtain normalized features. Step 3, Model Testing: In the test set, the model obtained in step 2 is tested using the data in the test set to determine whether it meets the requirements for non-biological facial signal interception. If it does not meet the requirements, training continues. Step 4: Image category inference: Using the tested model, determine whether the face image to be inferred is a live face image or a non-live face image; Specifically, the adaptive normalization algorithm described in step 2 is implemented as follows: (1) First, the mean μ and variance of the current image data are estimated using a mean-variance estimation network. The data x is then normalized using the obtained mean and variance. Finally, an affine transformation is performed on the data using learnable parameters γ and β to obtain the normalized features. : ; (2) Wherein, the mean variance estimation network: MVENet, the structure includes a global average pooling layer and a convolutional layer conv; The global pooling layer reduces the size of the feature map, and the convolutional layer performs a non-linear transformation on the reduced feature map. The number of image features gradually decreases from 64, 32, and 16 to 1. Finally, the mean μ and variance of the image data can be calculated through this network. The estimation results.
2. The non-biological facial signal interception method according to claim 1, wherein, in step 1, the dataset is proportionally divided into a training set and a test set, The ratio of the training set to the test set is 8:
2. During the partitioning, the proportion of images of different categories in real biological facial images and attack images is kept balanced.
3. The method for intercepting non-biological facial signals according to claim 1, specifically implementing the depth estimation of faces in the dataset images in step 1, is as follows: Face detection technology is applied to facial images in the dataset to automatically select regions containing faces and expand them at a ratio of 1:1.8 to obtain more background. The expanded regions are then cropped. For the cropped real live face images, a depth map with depth information is calculated as a label. For the cropped attack images, the calculated depth map is a black background image of the same size.
4. The method for intercepting non-biological facial signals according to claim 1, specifically implementing step 2 of embedding the adaptive normalization algorithm into the main feature extraction network for collaborative training, is as follows: (1) Normalized features are input into a main feature extraction network with an embedded AN structure to extract usable features. Then, a classification network is used to obtain a classification vector from the usable features. The overall loss function value is determined by the classification vector and the face liveness label. At the same time, the classification loss is combined with the data. and deep regression loss Optimize all parameters; (2) Update the training parameters. Based on the overall loss function value, update the parameters of the main feature extraction network, classification network and depth estimation network on the training set using backpropagation techniques. (3) When the overall loss function value of face liveness classification on the training set based on the features extracted by the main feature extraction network is less than the set threshold, training is stopped, assuming that the current model can meet the requirements of non-biological facial signal interception.
5. The method for intercepting non-biological facial signals according to claim 1, specifically implementing the testing of the model obtained in step 2 using test set data in step 3, is as follows: (1) On the test set, the mean and variance of the current data are estimated using the mean-variance estimation network; (2) Normalize the data using the obtained mean and variance, and perform affine transformation on the data using learnable parameters to obtain normalized features; (3) The adaptively normalized face image is input into the main feature extraction network with an AN structure to extract usable features. The extracted features are then input into the classification network to obtain the classification vector. The probability p of the corresponding face image being a live face image is obtained. If the probability p is greater than the set threshold, the current face image is determined to be a live face image. Otherwise, the current face image is determined to be a non-live face image, i.e., an attack image. If the test accuracy meets the requirements, the current model is considered to indeed satisfy the hypothesis; otherwise, training continues. The test accuracy referred to here is the proportion of correctly intercepted non-biological facial signals among all non-biological facial signals.
6. The method for intercepting non-biological facial signals according to claim 1, wherein the method can be used in conjunction with a non-biological facial signal interception system based on an adaptive normalization algorithm, wherein, include: The system front-end used to receive images of faces to be detected; A system backend that encapsulates non-biological facial signal interception methods and can provide feedback to the system frontend.
7. The non-biological facial signal interception method according to claim 6, wherein the system adopts a front-end and back-end separation architecture, and the system sets up multiple back-end servers and introduces nginx to solve the allocation problem between multiple servers.
8. A method for intercepting non-biological facial signals according to claim 6, wherein, The system front-end has network transmission capabilities and can call up cameras in the corresponding scene or select existing images to acquire the face image to be detected and transmit the image to the system back-end.
9. A method for intercepting non-biological facial signals according to claim 6, wherein, The system's backend server is a uWSGI server, built using the standard Django framework, and its specific functions include: (1) Receive the image transmitted from the system front end, and determine whether the transmitted image contains a face through face detection technology. If it does not contain a face, return a prompt to the front end that the input image needs to contain a face. If it contains a face, input the current image into the network, use the neural network trained by the training process to extract the face features in the image, and use the extracted face features as the parameters of the neural network classification layer to output the classification vector. (2) Compare the facial image features to be classified extracted in the above process with the classification label. The category with the highest score in the classification vector is considered to be the result of the method in determining whether the image transmitted from the front end is a live face image. (3) The backend transmits the non-biological facial signal interception judgment result to the system frontend in real time via the Internet, and the frontend displays the non-biological facial signal interception judgment result on the display screen.
Citation Information
Patent Citations
Near-infrared face vivo detection method and system
CN108898112A
Human face-based unknown spoofing attack living body detection method and system
CN113312965A