Generalized face living body detection method based on frequency domain shortcut analysis

Through frequency domain shortcut analysis and style suppression modulation mechanism, the generalization performance of the face live detection model is improved, the problem of insufficient generalization performance in the existing technology is solved, and better detection effects are achieved in unknown data domains and attack categories.

CN119763173AActive Publication Date: 2025-04-04SHANGHAI JIAOTONG UNIV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411907906.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-04
Estimated Expiration
2044-12-24

AI Technical Summary

Technical Problem

When facing new attack data, the existing facial live detection methods have insufficient generalization performance, resulting in the failure of the model in the test scenario.

Method used

The frequency domain shortcut analysis method is adopted to obtain frequency domain features through the frequency domain reconstruction network, and the dynamic frequency domain masking mechanism removes frequency domain shortcuts, and combines the style suppression modulation mechanism to reduce the impact of style information on model decisions.

Benefits of technology

It significantly improves the generalization performance of the face live detection model, reduces overfitting of training data, and improves detection capabilities on unknown data domains and unknown attack categories.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119763173A_ABST
    Figure CN119763173A_ABST
Patent Text Reader

Abstract

The invention provides a generalizable face living body detection method based on frequency domain shortcut analysis, and the method comprises the steps: inputting a to-be-detected image into a frequency domain reconstruction network, and obtaining frequency domain features with reserved details; starting a dynamic frequency domain mask mechanism, identifying potential frequency domain shortcuts of the frequency domain features through a mask mode, and removing the frequency domain shortcuts of the frequency domain features; starting a style suppression mechanism, obtaining the richness of style features along channel dimensions according to the intermediate features obtained by the frequency domain reconstruction network, reducing the importance of channels corresponding to the richness of the frequency domain features after the frequency domain shortcuts are removed, and obtaining style suppression features; and inputting the style suppressed features into a classifier to obtain a face living body detection result. According to the method, the generalization performance of the model is improved by relieving the dependence of the model on shortcut features in the frequency domain space. And meanwhile, a style suppression modulation component is introduced to suppress feature channels with high style information richness so as to reduce the influence of style information irrelevant to classification on model decision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of human face liveness detection, and in particular to a generalizable human face liveness detection method based on frequency domain shortcut analysis. Background Art

[0002] Face liveness detection aims to distinguish live face images from physical presentation attacks (such as printing attacks, video replay attacks, 3D mask attacks, etc.), and is a key step in the face recognition process. In daily life, the prevalence of physical presentation attacks will have a serious impact on the credibility of the identity authentication system. In order to minimize the impact of physical presentation attacks, it is becoming increasingly important to develop face liveness detection technology. Early methods followed the pipeline of traditional image classification, using convolutional neural networks to extract facial features and distinguish between real and fake faces by optimizing the binary classification loss function. With the advancement of physical technology, various new liveness attack methods continue to emerge. These newly emerging attack data may have significant differences from the attack data in the training set in many aspects such as lighting conditions, background environment, and attack methods, causing the trained model to fail in the test scenario. Therefore, how to improve the generalization performance of the model has become a key factor affecting the practical value of the model.

[0003] Existing methods for generalizable face liveness detection can be roughly divided into two categories. ① Starting from the data level. This type of method mainly uses data enhancement, feature enhancement and other means to increase the diversity of training samples during the training process to improve the detection ability of the model when facing unknown attack samples. For example, Wang et al. (Wang Z, Wang Z, Yu Z, et al. Domain generalization via shuffled style assembly for face anti-spoofing. In CVPR. 2022) proposed a style exchange component to reorganize the style information of samples from two different data domains in the feature space to generate features with diverse style information, thereby alleviating the overfitting of the model to certain style information; ② Starting from the optimization level. This type of method uses meta learning or domain-adversarial training to learn generalizable features. For example, Liu et al. (Liu S, Zhang KY, Yao T, et al. Adaptive normalized representation learning for generalizable face anti-spoofing. In ACM MM. 2021) proposed an adaptive feature normalization layer. They updated the parameters of the feature normalization layer by meta-learning, so that feature normalization also has generalization capabilities when dealing with samples in unknown data domains. For another example, Jiang et al. (Jiang F, Li Q, Liu P, et al. Adversarial learning domain-invariant conditional features for robust face anti-spoofing. International Journal of Computer Vision, 2023, 131 (7)) proposed a conditional domain adversarial framework, whose main goal is to align conditional distributions across data domains to learn domain-independent conditional features. This method shows good generalization performance in scenarios with limited training data.

[0004] Although existing methods have improved the generalization performance of face liveness detection to a certain extent, they often ignore the simplicity bias inherited when training neural networks: the models seek easy-to-learn representations (also known as shortcut features), which are mainly used to minimize the binary cross entropy loss on training data. Therefore, they can only obtain a partial understanding of spoofing attacks and may fail in complex scenarios. Summary of the invention

[0005] In view of the defects in the prior art, the object of the present invention is to provide a generalizable face liveness detection method based on frequency domain shortcut analysis.

[0006] According to one aspect of the present invention, a generalizable face liveness detection method based on frequency domain shortcut analysis is provided, comprising:

[0007] The image to be tested is input into the frequency domain reconstruction network to obtain the frequency domain features that retain the details;

[0008] Starting a dynamic frequency domain masking mechanism, identifying potential frequency domain shortcuts of the frequency domain features by means of masking, and removing the frequency domain shortcuts of the frequency domain features;

[0009] Starting a style suppression mechanism, obtaining the richness of the style feature along the channel dimension according to the intermediate features obtained by the frequency domain reconstruction network, reducing the importance of the channel corresponding to the richness of the frequency domain feature after removing the frequency domain shortcut, and obtaining a style suppressed feature;

[0010] The style suppressed features are input into a classifier to obtain a face liveness detection result.

[0011] Preferably, the step of inputting the image to be tested into a frequency domain reconstruction network to obtain frequency domain features that retain details includes:

[0012] The image to be tested X passes through the encoder of the frequency domain reconstruction network to obtain the encoder intermediate feature E enc , the frequency domain feature F output by the encoder, and the decoder intermediate feature E obtained by the decoder dec , the output is a grayscale image

[0013] Preferably, the frequency domain reconstruction network is optimized using a frequency domain reconstruction loss based on an image block, specifically:

[0014]

[0015] in, For the image block operation, the image is divided into P×P blocks, i, j are the coordinates of the image blocks; is the fast Fourier transform; G(X) is the grayscale version of the input image, X is the input image to be tested, is the output grayscale image.

[0016] Preferably, the frequency domain reconstruction network is optimized using a triplet, specifically:

[0017]

[0018] Where f is the feature encoder output of the frequency domain reconstruction network, f a ,f p ,fn The anchor point, positive sample and negative sample of the triplet are defined; δ(·)=ln(1+exp(·)) is the softplus function.

[0019] Preferably, the starting of the dynamic frequency domain mask mechanism to identify potential frequency domain shortcuts of the frequency domain features by means of masking and to remove the frequency domain shortcuts of the frequency domain features includes:

[0020] Select a mask for removing potential frequency shortcuts;

[0021] The selected mask is applied to the input frequency domain feature to obtain the final output of the dynamic frequency domain mask mechanism, that is, the frequency domain feature with the frequency domain shortcut removed.

[0022] Preferably, the selecting of a mask for removing potential frequency shortcuts comprises:

[0023] Divide the input frequency domain features into several frequency bands Each frequency band obtained Contains all frequencies with a distance i from the lowest frequency L1;

[0024] According to some of the frequency bands Generate a series of masks The included frequencies are set to 0, otherwise they are set to 1;

[0025] A series of masks will be obtained Applied to the mapping feature of the input frequency domain feature F, the removal The corresponding frequency information feature F i :

[0026]

[0027] Calculate F i The corresponding cross entropy loss

[0028] During training, from a series of masks Randomly select K frequency domain masks from the above process and obtain different masks in turn. The corresponding cross entropy loss The mask that will achieve the maximum cross entropy loss Serves as a mask for removing potential frequency shortcuts.

[0029] Preferably, the starting style suppression mechanism obtains the richness of the style feature along the channel dimension according to the intermediate features obtained by the frequency domain reconstruction network, reduces the importance of the channel corresponding to the richness of the frequency domain feature after removing the frequency domain shortcut, and obtains the style suppressed feature, including:

[0030] Using the encoder intermediate feature E of the frequency domain reconstruction network enc , and the decoder intermediate feature E dec , calculate a vector r indicating the richness of style information:

[0031]

[0032] where f θ ,f φ Two 1×1 convolutional layers are used to transform E enc ,E dec Projected into the same latent space, Pool(·) is global average pooling;

[0033] Based on the vector r, the importance of the feature channel corresponding to the frequency domain feature after removing the frequency domain shortcut is reduced, and finally the style suppressed feature F" is obtained:

[0034]

[0035] Where σ(·) is the softmax function and ⊙ represents the channel-by-channel product.

[0036] Preferably, the step of inputting the style suppressed features into a classifier to obtain a face liveness detection result includes:

[0037] Input the style-suppressed feature F” into the final binary classifier to obtain the predicted attack probability As the result of face liveness detection.

[0038] Preferably, the binary classifier is optimized using cross entropy loss, specifically:

[0039]

[0040] y is the attack label, y=1 represents an attack sample, and y=0 represents a real face.

[0041] Preferably, the frequency domain reconstruction network, the dynamic frequency domain masking mechanism and the style suppression mechanism are sequentially combined to form an overall face liveness detection network;

[0042] The total loss function of the face liveness detection network Includes categorical cross entropy loss Frequency domain reconstruction loss And triplet loss Specifically:

[0043]

[0044] where λ 1 ,λ2 is the weight hyperparameter, when the classification cross entropy loss of the validation set When convergence occurs, the training is stopped to obtain the optimized parameters of the face liveness detection network.

[0045] Compared with the prior art, the embodiments of the present invention have at least one of the following beneficial effects:

[0046] The generalizable face liveness detection method based on frequency domain shortcut analysis in the embodiment of the present invention aims to improve the generalization performance of face liveness detection. It creatively designs a dynamic frequency domain mask (DFM) mechanism to dynamically identify potential frequency domain shortcuts during the model training process and alleviate the model's dependence on these shortcut features through masking.

[0047] The generalizable face liveness detection method based on frequency domain shortcut analysis in the embodiment of the present invention also introduces a novel style suppression modulation (SIM) mechanism, which calculates the richness of style features along the channel dimension according to the intermediate features of the frequency domain reconstruction network encoder and decoder, and selectively suppresses feature channels with high style information richness to reduce the impact of style information irrelevant to classification on model decisions.

[0048] The generalizable face liveness detection method based on frequency domain shortcut analysis in the embodiment of the present invention can be trained end-to-end with the overall framework relying only on binary classification labels at the image level, reducing the reliance on additional annotations (such as face depth maps, face reflectivity maps, attack category labels, etc.). At the same time, a large number of experiments on commonly used academic datasets have verified the generalization performance of the method in the embodiment of the present invention in face liveness detection tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0050] Figure 1 1 is a schematic diagram of the overall structure of generalizable face liveness detection based on frequency domain shortcut analysis in one embodiment of the present invention, wherein FIG. a is a frequency domain reconstruction network, FIG. b is a dynamic frequency domain mask (DFM) mechanism, and FIG. c is a style suppression modulation (SIM) mechanism;

[0051] Figure 2 It is a schematic diagram of a mask selection process in a dynamic frequency masking (DFM) mechanism in a preferred embodiment of the present invention;

[0052] Figure 3 A schematic diagram of some sample data sets in a specific embodiment of the present invention, left: OULU-NPU right: CASIA-MFSD;

[0053] Figure 4 This is a schematic diagram of some sample data sets in a specific embodiment of the present invention, left: Idiap Replay-Attack right: MSU-MFSD.

[0054] Figure 5 It is a schematic diagram of some samples of the HQ-WMCA data set in a specific embodiment of the present invention. DETAILED DESCRIPTION

[0055] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several variations and improvements may be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0056] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0057] Face liveness detection can essentially be considered as a physical material recognition task for the face (Yu Z, Li X, Niu X, et al. Face anti-spoofing with human material perception. In ECCV. 2020), in which the difference between real faces and attack samples is mainly reflected in the subtle differences in frequency domain features. Based on this, in one embodiment of the present invention, a generalizable face liveness detection method based on frequency domain shortcut analysis is provided, and its main steps are:

[0058] S1, input the image to be tested into the frequency domain reconstruction network to obtain the frequency domain features that retain the details;

[0059] S2, starts the dynamic frequency domain masking mechanism, identifies the potential frequency domain shortcuts of the frequency domain features obtained by S1 through masking, and removes the frequency domain shortcuts of the frequency domain features obtained by S1;

[0060] S3, start the style suppression mechanism, calculate the richness of the style features along the channel dimension according to the intermediate features obtained by the frequency domain reconstruction network of S1, reduce the importance of the feature channels corresponding to the richness of the frequency domain features from which the frequency domain shortcuts have been removed, and obtain the style suppressed features;

[0061] S4, input the style suppressed features of S3 into the classifier to obtain the face liveness detection result.

[0062] The above embodiment is a generalizable face liveness detection method based on frequency domain shortcut analysis, which improves the generalization performance of the model by alleviating the model's reliance on shortcut features in the frequency domain. At the same time, a style suppression mechanism is introduced to suppress feature channels with high style information richness to reduce the impact of style information irrelevant to classification on model decisions.

[0063] In order to retain as many frequency domain details as possible in the feature extraction stage to alleviate the attack characteristics of the model overfitting to certain specific frequency bands. In a preferred embodiment of the present invention, a frequency domain reconstruction network is used, such as Figure 1 As shown in Figure a, the network includes a feature encoder and a feature decoder. Given an image input The output of the frequency domain reconstruction network is a grayscale image The grayscale image is used as the output of the frequency domain reconstruction network to reduce the retention of image style information such as hue and saturation, which have a negative impact on model generalization. In this process, the encoder intermediate feature R is also obtained. enc , the frequency domain features F output by the encoder, and the intermediate features E of the decoder dec .

[0064] In order to emphasize local frequency domain details, in another embodiment of the present invention, a frequency domain reconstruction loss based on image blocks is introduced to optimize the frequency domain reconstruction network, specifically:

[0065]

[0066] in, It is an image block operation (dividing the image into P×P equal blocks), i, j are the coordinates of the image blocks. is the fast Fourier transform. G(X) is the grayscale version of the input image.

[0067] At the same time, in order to enhance the difference between the real face and the attack sample in the feature space, another preferred embodiment of the present invention introduces a triplet loss, which is defined as:

[0068]

[0069] Where f is the feature encoder output of the frequency domain reconstruction network (after global average pooling), f a ,f p ,f n The anchor, positive and negative samples of the triplet are defined. δ(·)=ln(1+exp(·)) is the softplus function. In simple terms, the triplet loss In the feature space, samples of the same category are encouraged to be close to each other and samples of different categories are encouraged to be far away from each other, so as to obtain a more obvious classification boundary between real and fake faces.

[0070] Although the frequency domain reconstruction network proposed in the above embodiment helps to retain the information of the entire frequency band in a comprehensive but rough manner, it is still necessary to alleviate the excessive dependence of the entire detection model on a specific frequency band in a more specific way, so as to further reduce the impact of shortcut features. To this end, in a preferred embodiment of the present invention, a dynamic frequency domain masking mechanism is proposed to dynamically identify the frequency shortcuts of the model in the current training round during the training process, and suppress the characteristics of these shortcut frequency bands to promote the model to focus on a wider range of frequency bands. Specifically, Figure 1 The b-graph and Figure 2 As shown, the frequency domain features are divided into several frequency bands To confirm the shortcut frequency band, each frequency band Contains all frequencies that are i (l1 distance) away from the lowest frequency (i.e., the center frequency band). Afterwards, the dynamic frequency domain mask module will be based on Generate a series of masks The included frequencies are set to 0 ( Figure 2 ), otherwise it is set to 1 ( Figure 2 ).

[0071] In this way, Applied to the input feature map F, we can get the removal The characteristic F of the frequency information contained i :

[0072]

[0073] After the subsequent network and classification layers, F can be calculated i The corresponding cross entropy loss

[0074] During the training process, the dynamic frequency domain mask will randomly select K frequency domain masks and obtain different masks according to the above process in turn. The corresponding cross entropy loss

[0075] Finally, the mask with the maximum cross entropy loss is obtained will be considered as a mask that removes potential frequency shortcuts, which will be applied to F to obtain the final output F' of the dynamic frequency domain mask.

[0076] Based on the frequency domain reconstruction network and dynamic frequency domain mask (DFM) mechanism in the above embodiments, the face liveness detection model is promoted to explore different frequency bands more comprehensively. However, in real scenes, changes in image style such as face acquisition equipment, lighting conditions, and background will also seriously affect the generalization performance of face liveness detection methods. These stylized information are reflected in different frequency bands, and the main function of DFM is to screen certain frequency domain shortcut bands rather than optimize the information contained in the frequency bands. Therefore, DFM may not be able to suppress this type of style information well. In order to achieve style suppression, a preferred implementation of the present invention further proposes a style suppression modulation mechanism, such as Figure 1 As shown in Figure c.

[0077] The style suppression modulation mechanism uses the intermediate features of the frequency domain reconstruction network encoder and decoder (respectively denoted as E enc ,E dec ) to calculate a vector r indicating the richness of style information:

[0078]

[0079] where f θ ,f φ Two 1×1 convolutional layers are used to transform E enc ,E dec Projected to the same latent space, Pool(·) is the global average pooling. The motivation for this operation is that the encoder of the reconstruction network receives the original color images, which contain complete style information. At the same time, the decoder is responsible for reconstructing the frequency domain information of the grayscale image, which will inevitably lead to the loss of style details. Therefore, by evaluating the intermediate features E between the encoder and the decoder enc ,E dec The difference can, to a certain extent, measure the richness of style information in different feature channels: that is, the channel with a larger vector r value represents the richer style information encoded in the channel. Then, based on the vector r, style suppression modulation will reduce the importance of this part of the feature channel, and finally obtain the style suppression feature F":

[0080]

[0081] Where σ(·) is the softmax function and ⊙ represents the channel-by-channel product.

[0082] Here, the range of r is mapped to the interval (0,1) by the sigmoid function σ, and then the result is subtracted from 1, which is recorded as (Therefore, the channel with larger r value is The corresponding position is a smaller value). Multiply it to the intermediate feature F′, so that the position of the channel with a larger value in r will be multiplied by a smaller value, which reduces the importance of the corresponding channel; the position of the smaller channel in r will also be multiplied by a value less than 1, and then normalized, so the importance is relative, not absolute. The value of the larger feature channel in r after style suppression will be smaller than the smaller feature channel in r, which achieves the purpose of style suppression.

[0083] After obtaining the style-suppressed feature F", in a preferred embodiment of the present invention, the style-suppressed feature F" will be input into the final binary classifier to obtain the predicted attack probability As the result of face liveness detection.

[0084] Of course, in order to further optimize the classification model, in one embodiment, the predicted attack probability is obtained After that, the cross entropy loss is calculated according to the corresponding attack label y (y=1 represents an attack sample, y=0 represents a real face) to optimize the classification model, specifically:

[0085]

[0086] Based on the frequency domain reconstruction network, dynamic frequency domain mask, and style suppression modulation in the above embodiments, an overall face liveness detection network is formed. In some specific embodiments of the present invention, the face liveness detection network is overall optimized and trained. The specific process is as follows:

[0087] Step 1: Build a face liveness detection network based on the image classification model, including:

[0088] Step 1.1 obtains the initial image classification pre-trained model (ResNet-18), selects the first 3 layers of the initial image classification pre-trained model as the encoder of the frequency domain reconstruction network, and uses a 3-layer network with the same structure but replacing the convolution operation with a transposed convolution operation as the decoder of the frequency domain reconstruction network.

[0089] Step 1.2 connects the proposed dynamic frequency mask (DFM) and style suppression modulation (SIM) to the output of the model frequency reconstruction network decoder. Connect the binary classifier to style suppression modulation (SIM) and finally output the classification probability.

[0090] Step 2: Obtain task training data and divide it into a training set and a validation set. The task training data includes face liveness detection benchmark datasets such as OULU-NPU, CASIA-MFSD, Idiap Replay-Attack, MSU-MFSD, and HQ-WMCA. Then, extract frames and faces from the original video data to obtain face images.

[0091] Step 3: Use the AdamW optimizer on the training set to minimize the loss function defined in the present invention. (including classification cross entropy loss, frequency domain reconstruction loss and triplet loss) to update network parameters:

[0092]

[0093] where λ 1 ,λ 2 is the weight hyperparameter, and the default setting of the present invention is λ 1 =1.0,λ 2 = 0.1. When the classification cross entropy loss of the validation set When convergence occurs, stop training and obtain the optimized parameters of the face liveness detection network.

[0094] Step 4: Use the trained face liveness detection network to test directly on the test set and calculate common indicators of image classification tasks, such as accuracy (ACC) and area under curve (AUC).

[0095] In order to verify the feasibility and effect of the generalized face liveness detection method based on frequency domain shortcut analysis in the above embodiment, in a specific embodiment, four data sets are selected: OULU-NPU (denoted as O), CASIA-MFSD (denoted as C), Idiap Replay-Attack (denoted as I), and MSU-MFSD (denoted as M) (see some examples for details). Figure 3 and Figure 4 ) as training data, and the remaining one as test data for generalization testing to verify the generalization performance of the method of the embodiment of the present invention in a cross-data domain scenario.

[0096] Table 1 compares the generalization performance of existing face liveness detection methods in cross-dataset testing scenarios.

[0097]

[0098] The experimental results are shown in Table 1. The method of the embodiment of the present invention achieves similar or even higher generalization performance than the existing method in four separate generalization tests, and achieves the best classification index on an average level. This result verifies that the method of the embodiment of the present invention reduces the overfitting of the model to the training data by alleviating the model's reliance on frequency domain shortcuts, and significantly improves the generalization performance of the model in the unknown data domain.

[0099] In another specific embodiment, any seven attack categories and real face data in the HQ-WMCA dataset are selected as training data, and the remaining one attack category and real face data are used as test data for cross-attack category testing to verify the generalization performance of the embodiment of the present invention in dealing with unknown attack categories.

[0100] Table 2 compares the classification error rates of existing face liveness detection methods in cross-attack category test scenarios.

[0101]

[0102] In Table 2, Flex. corresponds to flexible mask attack, Glasses corresponds to glasses attack, Makeup corresponds to makeup attack, Mann. corresponds to mannequin attack, Paper. corresponds to paper mask attack, Rigid. corresponds to rigid mask attack, Tattoo represents tattoo attack, and Replay represents video replay attack. Figure 5 Some samples of the dataset are shown. According to the experimental results in Table 2, the method of the embodiment of the present invention achieved the lowest error rate on average, verifying that the method can still maintain good generalization performance when dealing with unknown attack categories. It is worth noting that the dataset includes both common video replay attacks (Replay) and the latest 3D mask attacks (such as flexible masks Flex. and rigid masks Rigid., etc.). This shows that the method of the embodiment of the present invention can also have good detection capabilities when dealing with more realistic attack methods.

[0103] Furthermore, in other specific embodiments, subdivided attack category data from the three data sets CASIA-MFSD, Idiap Replay-Attack, and MSU-MFSD are selected to perform generalization tests across data sets and attack categories at the same time, so as to verify the generalization performance of the embodiments of the present invention in more complex test scenarios.

[0104] Table 3 compares the generalization performance of existing face liveness detection methods in cross-dataset and cross-attack category test scenarios.

[0105]

[0106] In Table 3, except for the average result, the results in each column represent the AUC index of training using different attack category data from the other two datasets and testing on the corresponding attack category of the current dataset. For example, the result of Video under CASIA-MFSD means that the model is trained using the Photo attack category (with real faces) data of the Replay-Attack and MSU-MFSD datasets as the training set, and directly tested on the Video attack category (with real faces) data of CASIA-MFSD. In this challenging test scenario, the method of the embodiment of the present invention achieved a significant improvement in generalization performance on the average level. This result illustrates the application prospect and value of the method of the embodiment of the present invention for face liveness detection in complex test environments.

[0107] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various modifications or variations within the scope of the claims, which does not affect the essence of the present invention. The above preferred features can be used in any combination without conflicting with each other.

Claims

1. A generalizable face liveness detection method based on frequency domain shortcut analysis, characterized in that: include: The image to be tested is input into the frequency domain reconstruction network to obtain the frequency domain features that retain the details; Starting a dynamic frequency domain masking mechanism, identifying potential frequency domain shortcuts of the frequency domain features by means of masking, and removing the frequency domain shortcuts of the frequency domain features; Starting a style suppression mechanism, obtaining the richness of the style feature along the channel dimension according to the intermediate features obtained by the frequency domain reconstruction network, reducing the importance of the channel corresponding to the richness of the frequency domain feature after removing the frequency domain shortcut, and obtaining a style suppressed feature; The style suppressed features are input into a classifier to obtain a face liveness detection result.

2. The generalizable face liveness detection method based on frequency domain shortcut analysis according to claim 1, characterized in that: The inputting of the image to be tested into the frequency domain reconstruction network to obtain the frequency domain features retaining the details comprises: The image to be tested X passes through the encoder of the frequency domain reconstruction network to obtain the encoder intermediate feature E enc , the frequency domain feature F output by the encoder, and the decoder intermediate feature E obtained by the decoder dec , the output is a grayscale image 3. The generalizable face liveness detection method based on frequency domain shortcut analysis according to claim 2, characterized in that: The frequency domain reconstruction network is optimized using the frequency domain reconstruction loss based on image blocks, specifically: in, For the image block operation, the image is divided into P×P blocks, i, j are the coordinates of the image blocks; is the fast Fourier transform; G(X) is the grayscale version of the input image, X is the input image to be tested, is the output grayscale image.

4. The generalizable face liveness detection method based on frequency domain shortcut analysis according to claim 2, characterized in that: The frequency domain reconstruction network is optimized using triples, specifically: Where f is the feature encoder output of the frequency domain reconstruction network, f a ,f p ,f n The anchor point, positive sample and negative sample of the triplet are defined; δ(·)=ln(1+exp(·)) is the softplus function.

5. The generalizable face liveness detection method based on frequency domain shortcut analysis according to claim 1, characterized in that: The starting of the dynamic frequency domain mask mechanism, identifying potential frequency domain shortcuts of the frequency domain features by means of masking, and removing the frequency domain shortcuts of the frequency domain features, includes: Select a mask for removing potential frequency shortcuts; The selected mask is applied to the input frequency domain feature to obtain the final output of the dynamic frequency domain mask mechanism, that is, the frequency domain feature with the frequency domain shortcut removed.

6. The generalizable face liveness detection method based on frequency domain shortcut analysis according to claim 5, characterized in that: The mask selected to remove potential frequency shortcuts includes: Divide the input frequency domain features into several frequency bands Each frequency band obtained Contains all frequencies with a distance i from the lowest frequency L1; According to some of the frequency bands Generate a series of masks The included frequencies are set to 0, otherwise they are set to 1; A series of masks will be obtained Applied to the mapping feature of the input frequency domain feature F, the removal The corresponding frequency information feature F i : Calculate F i The corresponding cross entropy loss During training, from a series of masks Randomly select K frequency domain masks from the above process and obtain different masks in turn. The corresponding cross entropy loss The mask that will achieve the maximum cross entropy loss Serves as a mask for removing potential frequency shortcuts.

7. The generalizable face liveness detection method based on frequency domain shortcut analysis according to claim 1, characterized in that: The starting style suppression mechanism obtains the richness of the style feature along the channel dimension according to the intermediate features obtained by the frequency domain reconstruction network, reduces the importance of the channel corresponding to the richness of the frequency domain feature after removing the frequency domain shortcut, and obtains the style suppressed features, including: Using the encoder intermediate feature E of the frequency domain reconstruction network enc , and the decoder intermediate feature E dec , calculate a vector r indicating the richness of style information: where f θ ,f φ Two 1×1 convolutional layers are used to transform E enc ,E dec Projected into the same latent space, Pool(·) is the global average pooling; Based on the vector r, the importance of the feature channel corresponding to the frequency domain feature after removing the frequency domain shortcut is reduced, and finally the style suppressed feature F" is obtained: Where σ(·) is the softmax function and ⊙ represents the channel-by-channel product.

8. The generalizable face liveness detection method based on frequency domain shortcut analysis according to claim 7, characterized in that: The step of inputting the style suppressed features into a classifier to obtain a face liveness detection result includes: Input the style-suppressed feature F” into the final binary classifier to obtain the predicted attack probability As the result of face liveness detection.

9. The generalizable face liveness detection method based on frequency domain shortcut analysis according to claim 8, characterized in that: The binary classifier is optimized using cross entropy loss, specifically: y is the attack label, y=1 represents an attack sample, and y=0 represents a real face.

10. The generalizable face liveness detection method based on frequency domain shortcut analysis according to claim 1, characterized in that: The frequency domain reconstruction network, the dynamic frequency domain masking mechanism and the style suppression mechanism are sequentially combined to form an overall face liveness detection network; The total loss function of the face liveness detection network Includes categorical cross entropy loss Frequency domain reconstruction loss And triplet loss Specifically: Among them, λ1 and λ2 are weight hyperparameters. When the classification cross entropy loss of the validation set When convergence occurs, the training is stopped to obtain the optimized parameters of the face liveness detection network.

Citation Information

Patent Citations

  • Living body detection method and device and storage medium

    CN116959059A

  • Social network deep counterfeit video detection method and system based on spatial-temporal characteristics

    CN117523439A

  • Segmentation with monocular depth estimation

    CN118355405A

  • Generalized face forgery detection method based on field robust representation learning

    CN118506460A

  • Living body detection method and system based on feature channel characterization

    CN118570881A