A Face Anti-Counterfeiting Generalization Method, Device, and Medium for Causal Intervention
By introducing structural causal model and Dirichlet data enhancement in face anti-counterfeiting technology, domain features are extracted and processed, and using backdoor adjustment models for causal intervention, the problem of poor generalization ability of face anti-counterfeiting methods in the existing technology in cross-data set testing is solved, and a higher generalization accuracy and a concise and effective algorithm process is achieved.
Patent Information
- Application Number
- CN202210844068.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-18
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-07-18
AI Technical Summary
The existing facial anti-counterfeiting methods perform poorly in cross-data set testing, have poor generalization capabilities, and are cumbersome in computing processes, and lack modeling analysis of poor generalization capabilities.
The structural causal model is adopted to model the domain features related to the dataset distribution as interference factors that affect the generalization of face anti-counterfeiting. The dataset distribution is enhanced and expanded by using Dirichlet data, training neural networks for domain classification, extracting domain features, and causal intervention is performed through backdoor adjustment models to eliminate the influence of interference factors.
It achieves higher accuracy of face anti-counterfeiting generalization, simplifies the algorithm process, improves the generalization ability of the model, and makes it more suitable for deployment in complex real scenarios.
Smart Images

Figure CN115205985B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and particularly relates to a face anti-counterfeiting generalization method based on causal intervention, as well as a computer device and a readable storage medium thereof. Background Art
[0002] With the rapid development of computer vision technology, face recognition systems have been applied to some interactive intelligent applications, such as access control, sign-in, and mobile payment. However, face recognition systems are vulnerable to deliberate attacks, such as printed photos, video playback, makeup, 3D masks, etc., which bring huge security risks. Therefore, face anti-counterfeiting technology has been proposed to solve this problem and has attracted more and more attention. Early face anti-counterfeiting technologies used manually designed feature extraction operators, such as LBP, HOG, and SIFT, to model forged features. With the rise of deep learning, the face anti-counterfeiting task is modeled as a supervised binary classification problem, using convolutional neural networks to automatically extract features. Fine-grained pixel-level supervision signals, such as pseudo-depth maps, reflection maps, and binary masks, are introduced to enhance the ability of deep learning models to capture essential forged features. Although the above methods have achieved good performance in within-dataset tests (training and test data come from the same dataset (distribution)), in cross-dataset tests (training data comes from the source domain dataset, test data comes from the target domain dataset, and there are distribution differences between the source domain and the target domain), due to distribution differences in illumination, background, resolution, and ethnicity, their performance will drop sharply, indicating that face anti-counterfeiting technology has poor generalization ability and affects its use in real complex scenarios. Domain generalization methods and meta-learning methods in computer vision are introduced into face anti-counterfeiting to improve generalization ability. The domain generalization method constructs a complex min-max problem and models a shared feature space through additional adversarial learning. The meta-learning method divides the training dataset into a meta-training set and a meta-test set, simulates the distribution differences in real scenarios, and uses cumbersome alternating meta-updates to train the model. Therefore, there is a need for more effective and efficient face anti-counterfeiting generalization methods now.
[0003] The existing face anti-counterfeiting methods have the following deficiencies: (1) For specific datasets, the face anti-counterfeiting models designed by experts have poor generalization ability and poor cross-dataset test accuracy, affecting their practical applications; (2) The current face anti-counterfeiting generalization methods are based on heuristic designs and lack modeling analysis of poor generalization ability; (3) The existing face anti-counterfeiting generalization methods have a cumbersome calculation process, complex algorithms, and there is still room for performance improvement. Summary of the Invention
[0004] Aiming at the deficiencies of the prior art, the present invention provides a face anti-counterfeiting method based on causal intervention. Based on the structural causal model, the domain features related to the distribution of the analysis and modeling dataset are regarded as interference factors that damage the generalization of face anti-counterfeiting. The backdoor adjustment model is used for causal intervention. The overall algorithm is simple and effective, and can achieve a higher accuracy rate of face anti-counterfeiting generalization, including:
[0005] S1. Construct a structural causal model for the face anti-counterfeiting task. Based on this structural causal model, model the domain features related to the dataset distribution as interference factors that affect the generalization of face anti-counterfeiting, where the domain represents a dataset that obeys a certain distribution, and the domain feature represents the distribution feature of this dataset;
[0006] S2. Use Dirichlet data augmentation to expand the dataset distribution. Based on the augmented dataset, train a neural network for domain classification, and use the features extracted by the network as domain features representing interference factors;
[0007] S3. Train a neural network to perform binary classification discrimination on the authenticity of the input face image, and use the backdoor adjustment model to perform causal intervention on the neural network for face authenticity classification to eliminate the influence of interference factors;
[0008] S4. In the neural network for training face authenticity classification, simultaneously use a contrast loss function to constrain the feature space, aggregate the face image features of the same class as positive samples, and distinguish the face image features of different classes as negative samples.
[0009] Preferably, the structural causal model is a directed acyclic causal graph model. Each node in the graph corresponds to a variable in the model, and the edges connecting the nodes describe the causal relationship directly between the variables;
[0010] Preferably, the structural causal model based on face anti-counterfeiting contains a total of three nodes, and the three nodes correspond to three variables, which respectively represent the input face image X, the authenticity label Y, and the interference factor D of the domain feature; the structural causal model based on face anti-counterfeiting contains a total of three edges connecting the nodes, and the three edges correspond to three causal relationships, which are: input face image X → authenticity label Y: the causal relationship from the face image to the authenticity label, which is the real causal relationship that is beneficial to enhancing the generalization of face anti-counterfeiting; interference factor D of domain feature → authenticity label Y: the causal relationship from the interference factor of the domain feature to the authenticity label, which is the false causal relationship that damages the generalization of face anti-counterfeiting; interference factor D of domain feature → input face image X: the causal relationship from the interference factor of the domain feature to the input face image, indicating that the domain feature affects the generation of the face image.
[0011] Preferably, the Dirichlet data augmentation includes:
[0012] According to the number \(N\) of existing data sets (domains), construct a Dirichlet distribution \(\lambda\sim Dirichlet(\alpha)\) of the corresponding dimension, where \(\alpha\) is the parameter of the pre-given Dirichlet distribution;
[0013] Sample a number of random numbers from the Dirichlet distribution as the weights for mixing data sets (domains). Mix the images of different data sets (domains) according to the weights, and use the mixed generated samples as new data sets (domains).
[0014] Preferably, training a neural network for domain classification based on the augmented data set means training a convolutional neural network for domain classification of data based on the original data set (domain) and the data set (domain) newly generated by Dirichlet data augmentation.
[0015] Preferably, taking the features extracted by the network as domain features representing interference factors means taking the features extracted from the last feature layer of the network as domain features \(\mu(D = d)\) representing interference factors, where \(\mu\) represents taking the average value of the features of all samples belonging to a certain domain as the domain feature, and \(d\) represents the \(d\)-th data set (domain).
[0016] Preferably, training the neural network to perform binary classification discrimination on the authenticity of the input face images, and using the backdoor adjustment model to perform causal intervention on the neural network for face authenticity classification to eliminate the influence of interference factors, including:
[0017] Using the backdoor adjustment model based on the do operator for causal intervention to cut off the causal relationship of the interference factor of the domain feature → input face image in the structural causal model. Based on the adjusted probability graph model, the adjusted probability formula is \(P(Y|do(X))=\sum\) d \(P(Y|X,D = d)P(D = d)\);
[0018] In the backdoor adjustment model, different data sets (domains) have the same number of pictures, so the prior probability distribution of the domain is modeled as a uniform distribution, that is, \(P(D = d)=1 / N\), where \(N\) represents the total number of domains; the conditional probability of the true / false label based on the input image and the domain feature interference factor is modeled as the output obtained by concatenating the feature vector of the input image and the domain feature vector and passing through the classifier, that is where represents the concatenation of vectors.
[0019] Preferably, using the contrast loss function to constrain the feature space, aggregating the face image features of the same category as positive samples, and distinguishing the face image features of different categories as negative samples, including:
[0020] The face image features are constrained using a contrastive loss function. The face image features of the same class in different domains are aggregated as positive samples, and the face image features of different classes in different domains are distinguished as negative samples. When calculating the contrastive loss function, K positive samples and all negative samples are considered, where K is a pre-set positive integer.
[0021] A positive sample selection strategy based on an attention mechanism is used to select K positive samples with a smaller inner product of features with the anchor point as hard positive samples, and the contrastive loss function is calculated.
[0022] According to a second aspect of the present invention, there is provided a face anti-counterfeiting device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it can be used to execute the face anti-counterfeiting method of causal intervention.
[0023] According to a third aspect of the present invention, there is provided a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the face anti-counterfeiting method of causal intervention.
[0024] According to a fourth aspect of the present invention, there is provided a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the face anti-counterfeiting method.
[0025] According to a fifth aspect of the present invention, there is provided a chip system, including a processor, the coupling of the processor with a memory, and the memory stores program instructions, and when the program instructions stored in the memory are executed by the processor, the face anti-counterfeiting method of causal intervention is implemented.
[0026] According to a sixth aspect of the present invention, there is provided a computer device, including: a communication interface; and further including:
[0027] A memory for storing a program for implementing the face anti-counterfeiting method;
[0028] A processor for loading and executing the program stored in the memory to implement each step of the face anti-counterfeiting method.
[0029] Compared with the prior art, the embodiments of the present invention have at least one of the following beneficial effects:
[0030] (1) In the face anti-counterfeiting generalization method of causal intervention of the present invention, by introducing a structural causal model and modeling domain features related to the dataset distribution as interference factors affecting face anti-counterfeiting generalization, it is possible to better understand the influencing factors that undermine face anti-counterfeiting generalization.
[0031] (2) The above-mentioned causal intervention-based face anti-counterfeiting generalization method of the present invention can more effectively extract domain features as interference factors by expanding the distribution of the dataset through Dirichlet data augmentation.
[0032] (3) The above-mentioned causal intervention-based face anti-counterfeiting generalization method of the present invention uses a backdoor adjustment model for causal intervention, which can eliminate the influence of interference factors. The overall algorithm is simple and effective, and can achieve a higher accuracy of face anti-counterfeiting generalization, which is beneficial to the actual deployment of face anti-counterfeiting. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] By reading the following detailed description of the non-limiting embodiments with reference to the accompanying drawings, other features, objects, and advantages of the present invention will become more apparent:
[0034] Figure 1 It is a schematic diagram of the module principle of the causal intervention-based face anti-counterfeiting generalization method in an embodiment of the present invention;
[0035] Figure 2 It is a schematic diagram of the structural causal model of face anti-counterfeiting in an embodiment of the present invention;
[0036] Figure 3 It is a visual class activation map of the face anti-counterfeiting recognition result in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0037] The present invention will be described in detail below with reference to specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but do not limit the present invention in any form. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can be made. These all belong to the protection scope of the present invention.
[0038] Figure 1 It is a schematic diagram of the principle of the causal intervention-based face anti-counterfeiting generalization method in an embodiment of the present invention.
[0039] Referring to Figure 1 As shown, in an embodiment of the present invention, the causal intervention-based face anti-counterfeiting generalization method includes the following steps:
[0040] S1, construct a structural causal model for the face anti-counterfeiting task. Based on this structural causal model, model the domain features related to the dataset distribution as interference factors affecting face anti-counterfeiting generalization, where the domain represents a dataset subject to a certain distribution, and the domain feature represents the distribution feature of this dataset.
[0041] In this step, the structural causal model is a directed acyclic causal graph model. Each node in the graph corresponds to a variable in the model, and the edges connecting the nodes describe the causal relationship between the variables.
[0042] Specifically, as Figure 2 shown, in a preferred embodiment, the structural causal model for face anti-counterfeiting consists of three nodes in total. The three nodes correspond to three variables, which respectively represent the input face image X, the authenticity label Y, and the interference factor D of domain features; the structural causal model for face anti-counterfeiting consists of three edges connecting the nodes in total, and the three edges correspond to three causal relationships, which are respectively: input face image X → authenticity label Y: the causal relationship from the face image to the authenticity label, which is a real causal relationship conducive to enhancing the generalization of face anti-counterfeiting; interference factor D of domain features → authenticity label Y: the causal relationship from the interference factor of domain features to the authenticity label, which is a false causal relationship that destroys the generalization of face anti-counterfeiting; interference factor D of domain features → input face image X: the causal relationship from the interference factor of domain features to the input face image, indicating that domain features affect the generation of face images. Due to the existence of the interference factor D, and the existence of the causal relationships D → Y and D → X, the X → Y learned by the model is biased.
[0043] S2. Use Dirichlet data augmentation to expand the dataset distribution. Based on the augmented dataset, train a neural network for domain classification, and use the features extracted by the network as the domain features representing the interference factor.
[0044] Specifically, in a preferred embodiment, according to the number N of the existing datasets , each dataset is used to construct a Dirichlet distribution λ~Dirichlet(α) of the corresponding dimension, λ = [λ1, λ2, …, λ N , where α is an N-dimensional vector representing the Dirichlet distribution parameter, and here α = [1, 1, …, 1].
[0045] Sample several random numbers λ from the Dirichlet distribution as the weights for mixing datasets (domains), mix the images of different datasets (domains) according to the weights, and use the samples generated by mixing as the new dataset (domain).
[0046]
[0047] Based on the augmented dataset train a convolutional neural network for domain classification of the data, and the classification loss function for training is:
[0048]
[0049] where Ψ represents the overall convolutional neural network, represents the feature extraction layer in the overall convolutional neural network, and T represents the linear classification layer in the overall convolutional neural network. d i,kThe dataset number label d representing the i-th sample i The k-th component of, d i is an N-dimensional vector, δ k (·) represents the k-th element output after softmax.
[0050] Based on the trained feature extraction layer Input face images of the same dataset (domain), and average the features output by the feature extraction layer as the domain feature μ(D = d) representing the interference factor, where μ represents taking the average of the features of all samples belonging to a certain domain as the domain feature, and d represents the number of the d-th dataset (domain):
[0051]
[0052] where represents the dataset the d-th dataset in.
[0053] S3. Train a neural network to perform binary classification discrimination on the authenticity of the input face images, and use the backdoor adjustment model to perform causal intervention on the neural network for face authenticity classification to eliminate the influence of interference factors.
[0054] As Figure 2 shown, in a preferred embodiment, based on the structural causal model for face anti-counterfeiting, in order to eliminate the influence of interference factors, the do operator is used to block the backdoor path D→X in the structural causal model, that is, the causal relationship from the interference factor D of the domain feature to the input face image X is cut off. Using the Bayesian criterion for the corrected causal graph, the probability formula for backdoor adjustment can be obtained as P(Y|do(X)) = ∑ d P(Y|X,D = d)P(D = d). That is, calculate the causal effect P(Y|X,D = d) of X→Y in each domain, and then perform weighted summation based on the prior of the domain P(D = d).
[0055] In the specific implementation of the backdoor adjustment model, assume that different datasets (domains) have the same number of pictures, so the probability distribution of the domain prior is modeled as a uniform distribution, that is, P(D = d) = 1 / N, where N represents the total number of domains; the conditional probability P(Y|X,D = d) of the authenticity label based on the input image and the domain feature interference factor is modeled as connecting the feature vector X of the input image and the domain feature vector μ(D = d), that is Therefore, the overall probability formula for backdoor adjustment is
[0056]
[0057] Specifically, a neural network is used to model the above probability formula for backdoor adjustment, including a feature extractor g and a linear classifier f. The face image X is input into the feature extractor g to obtain the output face image features g(X), which are concatenated with different domain features to obtain [g(X), μ(D = 1)], …, [g(X), μ(D = N)]. These N features are respectively input into the linear classifier f, and the outputs are averaged as the final output. According to the true authenticity label y, the classification loss function of the model is where is the cross-entropy loss function.
[0058] S4. When training the neural network for face authenticity classification, the contrast loss function is simultaneously used to constrain the feature space. The face image features of the same category are aggregated as positive samples, and the face image features of different categories are distinguished as negative samples.
[0059] In a preferred embodiment, based on the face feature z = g(x), using the contrast loss function, the face image features of the same category in different domains are aggregated as positive samples, and the face image features of different categories in different domains are distinguished as negative samples. Considering one positive sample and multiple negative samples, the calculation formula of the contrast loss function is as follows
[0060]
[0061] where τ represents the temperature coefficient, z represents the face feature, z + represents the positive sample with the same authenticity label as z, z - represents the negative sample with a different authenticity label from z, represents the set of all negative samples with different labels from the face feature z.
[0062] Further considering more positive samples, using the positive sample selection strategy based on the attention mechanism, K positive samples with smaller inner products of features with the anchor point are selected as hard positive samples to calculate the contrast loss function. That is, select several z with smaller z·z + to calculate the contrast loss function: +
[0063]
[0064] where represents the set of all positive samples with different labels from the face feature z, where there are K positive samples in total.
[0065] Combine the previous classification loss function with the contrast loss function as the overall loss function Use gradient descent to update the model parameters, and train the feature extractor g and the linear classifier f until convergence. The finally trained model is used for face anti-counterfeiting recognition.
[0066] In the above embodiments of the present invention, the structural causal model is an overall modeling and analysis tool. Through the modeling and analysis of the structural causal model, the modeling domain feature is an interference factor, and the domain feature destroys the generalization of face anti-counterfeiting. Therefore, the domain feature is extracted through a neural network. After obtaining the domain feature, the backdoor adjustment model is used to eliminate the influence of the domain feature, and a face anti-counterfeiting model with good generalization is obtained.
[0067] The following is an illustration through specific experiments:
[0068] The experiments were conducted on five datasets: OULU (O), CASIA (C), Replay (I), MSU (M), and CelebA-Spoof (CA). The test protocol for the experiments was to train on several source domain datasets and then test on target domain datasets with different distributions after training. For example, for experiments on the four datasets OULU (O), CASIA (C), Replay (I), and MSU (M), O&C&I-to-M means training on the three datasets O, C, and I and testing on the M dataset. The evaluation metrics include HTER and AUC. HTER refers to the average overall error rate, which is equal to the average of the false acceptance rate and the false rejection rate; AUC refers to the area under the ROC curve (Receiver Operating Characteristic curve). The smaller the HTER and the larger the AUC, the better the performance of the model.
[0069] The specific comparison results can be seen in Tables 1, 2, and 3 below. Table 1 shows the evaluation and comparison of the generalization accuracy results of the embodiments of the present invention (on the O, C, I, and M datasets), Table 2 shows the evaluation and comparison of the generalization accuracy results of the embodiments of the present invention (on the M, I, C datasets and the M, I, O datasets), and Table 3 shows the evaluation and comparison of the generalization accuracy results of the embodiments of the present invention (on the M, C, O, and CA datasets). In the tables, the lower the HTER and the higher the AUC represent better generalization performance.
[0070] Table 1
[0071]
[0072] Table 2
[0073]
[0074] Table 3
[0075]
[0076] As Figure 3 shown in the visualization class activation map of the face anti-counterfeiting recognition results, the embodiments of the present invention focus on the facial area to predict real faces and pay attention to the printing paper, palm, and device edge to distinguish forged faces.
[0077] The above experiments show that the causal intervention-based face anti-counterfeiting generalization method proposed in the embodiments of the present invention can achieve a lower average error rate and a higher area under the curve in the case of cross-dataset testing where the test set and the training set have different distributions, indicating that the model has better out-of-distribution generalization performance and thus has a wider range of application scenarios.
[0078] Improve the performance of the image classification method under the condition of limited computing resources, achieve higher accuracy, and can automatically design and adjust a neural network-based image classification method in a shorter time, thus having a wider range of application scenarios.
[0079] In another embodiment of the present invention, a face anti-counterfeiting device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it can be used to execute the causal intervention-based face anti-counterfeiting method in the above embodiment.
[0080] In another embodiment of the present invention, a computer-readable storage medium is further provided, on which a computer program is stored. When the program is executed by a processor, it implements the causal intervention-based face anti-counterfeiting generalization method in the above embodiment.
[0081] In another embodiment of the present invention, a chip system is further provided, including a processor, a coupling between the processor and a memory, and the memory stores program instructions. When the program instructions stored in the memory are executed by the processor, the causal intervention-based face anti-counterfeiting generalization method in the above embodiment is implemented.
[0082] In another embodiment of the present invention, a computer device is further provided, including: a communication interface; and further including: a memory for storing a program for implementing the face anti-counterfeiting method; a processor for loading and executing the program stored in the memory to implement each step of the face anti-counterfeiting method.
[0083] Optionally, a memory for storing programs; the memory may include volatile memory (e.g., random-access memory, such as static random-access memory (SRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDR SDRAM), etc.); the memory may also include non-volatile memory, such as flash memory. The memory 62 is used to store computer programs (such as application programs and functional modules for implementing the above methods), computer instructions, etc. The above computer programs, computer instructions, etc. can be partitioned and stored in one or more memories. And the above computer programs, computer instructions, data, etc. can be called by the processor.
[0084] The above computer programs, computer instructions, etc. can be partitioned and stored in one or more memories. And the above computer programs, computer instructions, data, etc. can be called by the processor.
[0085] A processor for executing the computer programs stored in the memory to implement each step in the methods described in the above embodiments. For specific details, reference can be made to the relevant descriptions in the foregoing method embodiments.
[0086] The processor and the memory can be of an independent structure or an integrated structure integrated together. When the processor and the memory are of an independent structure, the memory and the processor can be coupled and connected through a bus.
[0087] Computer-readable media include computer storage media and communication media, where communication media include any medium facilitating the transfer of computer programs from one place to another. Storage media can be any available medium accessible by a general-purpose or special-purpose computer.
[0088] In summary, the methods and devices in the embodiments of the present invention adopt a causal intervention-based face anti-counterfeiting generalization method. Based on the constructed structural causal model for face anti-counterfeiting, the domain features related to the distribution of the modeling and dataset are analyzed as interference factors that disrupt face anti-counterfeiting generalization. Dirichlet data augmentation is used to expand the dataset to more accurately model the domain features as interference factors. Based on the do-operator, the backdoor adjustment model is used for causal intervention to eliminate the influence of interference factors. The overall algorithm is simple and effective, and can achieve a higher accuracy of face anti-counterfeiting generalization. This highly efficient, simple, and performant face anti-counterfeiting generalization method enables deployment in complex real-world scenarios for face anti-counterfeiting tasks.
[0089] The specific embodiments of the present invention have been described above. 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 do not affect the essence of the present invention.
Claims
1. A face anti-counterfeiting method based on causal intervention, characterized in that, Including: S1. Construct a structural causal model for the face anti-counterfeiting task. Based on this structural causal model, model the domain features related to the dataset distribution as interference factors affecting the generalization of face anti-counterfeiting, where the domain represents a dataset subject to a certain distribution, and the domain features represent the distribution features of this dataset; S2. Use Dirichlet data augmentation to expand the dataset distribution. Based on the augmented dataset, train a neural network for domain classification, and use the features extracted by the network as domain features representing interference factors; S3. Train a neural network to perform binary classification discrimination on the authenticity of the input face image, and use the backdoor adjustment model to perform causal intervention on the neural network for face authenticity classification to eliminate the influence of interference factors; S4. In the process of training the neural network for face authenticity classification, simultaneously use the contrast loss function to constrain the feature space, aggregate the face image features of the same category as positive samples, and distinguish the face image features of different categories as negative samples; The constructed structural causal model for the face anti-counterfeiting task, based on this structural causal model, models the domain features related to the dataset distribution as interference factors affecting the generalization of face anti-counterfeiting, where: The structural causal model for the face anti-counterfeiting task is a directed acyclic causal graph model. Each node in the graph corresponds to a variable in the model, and the edges connecting the nodes describe the causal relationship between variables; The structural causal model for the face anti-counterfeiting task contains a total of three nodes, corresponding to three variables respectively: the input face image X, the label Y indicating the authenticity of the face, and the interference factor D of the domain features; The structural causal model for the face anti-counterfeiting task contains a total of three edges connecting the nodes, corresponding to the following three causal relationships respectively: Input face image X → Authenticity label Y: The causal relationship from the face image to the authenticity label, which is a real causal relationship beneficial to enhancing the generalization of face anti-counterfeiting; Interference factor D of domain features → Authenticity label Y: The causal relationship from the interference factor of domain features to the authenticity label, which is a false causal relationship that destroys the generalization of face anti-counterfeiting; Interference factor D of domain features → Input face image X: The causal relationship from the interference factor of domain features to the input face image, indicating that the domain features affect the generation of face images; The training of the neural network to perform binary classification discrimination on the authenticity of the input face image, and the use of the backdoor adjustment model to perform causal intervention on the neural network for face authenticity classification to eliminate the influence of interference factors, including: Perform causal intervention using a backdoor adjustment model based on the do-operator to sever the causal relationship between the confounding factors of domain features in the structural causal model → the input face image. Based on the adjusted probabilistic graphical model, the adjusted probability formula is obtained as P(Y|do(X)) = ∑ d P(Y|X, D = d)P(D = d); In the backdoor adjustment model, since different datasets or data domains have the same number of images, the probability distribution of the domain prior is modeled as a uniform distribution, i.e., P(D = d) = 1 / N, where N represents the total number of domains; the conditional probability of the true / false label based on the input image and the domain feature interference factor is modeled as the output obtained by concatenating the feature vector of the input image and the domain feature vector and passing it through a classifier, i.e., where denotes the concatenation of vectors.
2. The causal intervention-based face anti-counterfeiting method according to claim 1, wherein The use of Dirichlet data augmentation to expand the dataset distribution, based on the augmented dataset, training a neural network for domain classification, and using the features extracted by the network as domain features representing interference factors, including: According to the number N of existing datasets or data domains, construct a Dirichlet distribution λ~Dirichlet(α) of the corresponding dimension. λ is a random number sampled from the Dirichlet distribution Dirichlet(α), and α is a parameter of the pre-given Dirichlet distribution, where: Sample a number of random numbers from the Dirichlet distribution as the weights for the mixture of datasets or data domains, mix the images of different datasets or data domains according to the weights, and use the mixed generated samples as new datasets or data domains; Based on the original dataset or data domain and the newly generated dataset or data domain by Dirichlet data augmentation, train a convolutional neural network for domain classification of data, and use the features extracted from the last feature layer of the network as the domain features μ(D=d) representing interference factors, where μ represents taking the average of all sample features belonging to a certain domain as the domain feature, and d represents the d-th dataset or data domain; wherein represents the d-th data set in the data set, represents the feature extraction layer in the overall convolutional neural network.
3. The face anti-counterfeiting method for causal intervention according to claim 1, characterized in that Constraining the feature space using the contrast loss function, aggregating the face image features of the same class as positive samples, and distinguishing the face image features of different classes as negative samples, including: Constraining the face image features using the contrast loss function, aggregating the face image features of the same class in different domains as positive samples, and distinguishing the face image features of different classes in different domains as negative samples. When calculating the contrast loss function, consider K positive samples and all negative samples, where K is a pre-set positive integer; Use a positive sample selection strategy based on the attention mechanism to select K positive samples with smaller inner products of features with the anchor point as hard positive samples, and calculate the contrast loss function.
4. A face anti-counterfeiting device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it can be used to execute the face anti-counterfeiting method of causal intervention described in any one of claims 1 to 3.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the face anti-counterfeiting method of causal intervention described in any one of claims 1 to 3.
6. A computer program product, characterized in that, The computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the face anti-counterfeiting method described in any one of claims 1 - 3.
7. A chip system, comprising a processor, the processor being coupled to a memory, the memory storing program instructions, characterized in that, When the program instructions stored in the memory are executed by the processor, the face anti-counterfeiting method of causal intervention described in any one of claims 1 to 2 is implemented.
8. A computer device, comprising: A communication interface; characterized in that it further includes: A memory for storing a program for implementing the face anti-counterfeiting method described in any one of claims 1 - 3; A processor for loading and executing the program stored in the memory to implement each step of the face anti-counterfeiting method described in any one of claims 1 - 3.
Citation Information
Patent Citations
Depth counterfeit image detection method and system combined with multi-scale features
CN114724008A
Face Anti-counterfeiting detection methods and systems, electronic devices, programs and media
US20190318156A1