Depth fake face detection method and system based on depth perception
By using a deep perception-based multi-task learning framework, combined with a shared feature encoder and a deep collaborative attention module, the problem of insufficient generalization ability in existing technologies is solved, achieving efficient and accurate detection of unknown technologies and improving the robustness and accuracy of deepfake detection.
Patent Information
- Application Number
- CN202511620604.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2045-11-07
AI Technical Summary
Existing deepfake detection technologies lack generalization ability and struggle to effectively handle face images generated by different forgery techniques, leading to performance degradation of detection models when faced with unfamiliar forgery algorithms.
We employ a multi-task learning framework based on depth perception, and by combining multi-scale feature extraction and deep collaborative attention with a shared feature encoder, master depth estimation module and deep collaborative attention module, we construct a deep fake face detection method capable of uncovering 3D geometric flaws.
It significantly improves the detection generalization ability and robustness against unknown forgery techniques, and can more accurately capture geometric flaws and forgery traces in facial images, providing a more efficient and accurate deepfake detection solution.
Smart Images

Figure CN121074992A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence and computer vision security technology, and particularly relates to a deepfake face detection method and system based on deep perception. BACKGROUND
[0002] With the rapid development of artificial intelligence technology represented by deep learning, especially generative adversarial networks (Gans), the generation and tampering of digital content have become unprecedentedly convenient and realistic. Among them, deepfake technology, such as face swapping, facial reenactment, face synthesis, etc., can create fake face images and videos that are almost indistinguishable by the human eye. These technologies have shown great potential in film production, virtual social interaction, etc., but also pose serious social risks, such as being used to create fake news, commit identity fraud, infringe personal reputation and privacy rights, etc., posing a serious challenge to social trust systems and public safety. SUMMARY
[0003] To solve the above problems, the present application provides a deepfake face detection method and system based on deep perception to overcome the lack of generalization ability of existing deepfake detection technology and provide a deepfake face detection scheme that can dig more essential and more general fake clues.
[0004] To achieve the above purpose, the present application provides the following technical solutions:
[0005] On the one hand, the present application provides a deepfake face detection method based on deep perception, which comprises the following steps:
[0006] Obtaining a face image, generating a classification label and a depth map label of the face image;
[0007] Constructing a model for deepfake face detection, the model comprising a shared feature encoder, a main depth estimation module, a depth collaborative attention module and a classification prediction module, extracting multi-scale feature maps from the face image through the shared feature encoder, generating a final depth map by regressing the multi-scale feature maps through the main depth estimation module, generating an enhanced feature map based on the high-level feature maps in the multi-scale feature maps through the depth collaborative attention module, and generating a logical value representing the authenticity prediction according to the enhanced feature through the classification prediction module;
[0008] A multi-task loss function of the model is constructed, all learnable parameters in the model are optimized by minimizing the multi-task loss function value, and a trained model is obtained; the multi-task loss function includes a classification loss calculated according to the classification label and the logical value, a main depth estimation loss calculated according to the depth map label and the final depth map, and an auxiliary depth estimation loss calculated according to the intermediate depth representation and the depth map label;
[0009] The face image to be detected is sequentially passed through the shared feature encoder, the depth collaborative attention module and the classification prediction module in the trained model to obtain a predicted logical value, and a classification result of the face image being a real face or a fake face is generated according to the predicted logical value.
[0010] Optionally, the face image is obtained, and the classification label and the depth map label of the face image are generated, including:
[0011] The face image is obtained, and it is determined whether the face image is a real face image or a fake face image;
[0012] If it is determined that the face image is a real face image, the classification label of the real face image is set to zero, and the depth map label is obtained by predicting the real face image by using the teacher model;
[0013] If it is determined that the face image is a fake face image, the classification label of the fake face image is set to one, and the depth map label is obtained by predicting a source real face image corresponding to the fake face image by using the teacher model.
[0014] Optionally, the enhanced feature map is generated based on the high-level feature map in the multi-scale feature map by using the depth collaborative attention module, including:
[0015] The high-level feature map in the multi-scale feature map is sent to the supervised lightweight depth estimator to regress and generate the intermediate depth representation;
[0016] The intermediate depth representation is sent to the spatial attention generation network to generate a spatial attention map with the same size as the high-level feature map;
[0017] The high-level feature map and the high-level feature map weighted by the spatial attention map are fused by using the residual connection to obtain the enhanced feature map.
[0018] Optionally, the multi-task loss function of the model is constructed, including:
[0019] The classification loss, the main depth estimation loss and the auxiliary depth estimation loss are weighted and fused to obtain the multi-task loss function of the model.
[0020] Optionally, the classification loss is calculated by the following method:
[0021] a binary cross-entropy loss of the classification label and the logical value is calculated to obtain a classification loss.
[0022] Optionally, the depth estimation loss is calculated by:
[0023] a pixel-level L1 loss and a structural similarity loss between the depth map label and the final depth map are calculated, and the pixel-level L1 loss and the structural similarity loss are combined to obtain a main depth estimation loss.
[0024] Optionally, the classification result of the face image as a real face or a fake face according to the logical value comprises:
[0025] a Softmax function is used to map the logical value output by the classification prediction module into a probability between zero and one;
[0026] if it is determined that the probability is greater than a preset threshold, the face image to be detected is determined as a fake face, otherwise, it is determined as a real face.
[0027] In another aspect, an embodiment of the present application provides a depth fake face detection system based on depth perception, comprising:
[0028] at least one processor;
[0029] at least one memory for storing at least one program;
[0030] When the at least one program is executed by the at least one processor, the at least one processor implements the above-mentioned method.
[0031] In another aspect, an embodiment of the present application provides a computer readable storage medium, wherein a processor executable program is stored, and the processor executable program is used to execute the above-mentioned method when executed by a processor.
[0032] The present application has the beneficial effects that: the present application discloses a depth fake face detection method and system based on depth perception, and the present application can more accurately capture geometric flaws and fake traces in face images by introducing a depth perception mechanism and combining multi-scale feature extraction and depth collaborative attention modules. Compared with traditional methods, the scheme proposed by the present application has significantly improved generalization ability, can effectively deal with face images generated by different fake technologies, and provides a more efficient and accurate solution for the field of depth fake detection. At the same time, the multi-task loss function design of the present application enables the model to optimize the classification and depth estimation tasks simultaneously during the training process, further enhancing the robustness and detection performance of the model. BRIEF DESCRIPTION OF DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.
[0034] Figure 1 is a flowchart of a deep fake face detection method based on deep perception according to an embodiment of the present application;
[0035] Figure 2 is a whole architecture diagram of a deep fake face detection model for a training stage according to an embodiment of the present application;
[0036] Figure 3 is a diagram of an asymmetric supervision mechanism for a fake face according to an embodiment of the present application;
[0037] Figure 4 is a flowchart of calculation of a multi-task loss according to an embodiment of the present application;
[0038] Figure 5 is a structure diagram of a deep collaborative attention module according to an embodiment of the present application;
[0039] Figure 6 is a simplified architecture flowchart of a deep fake face detection model for an inference (detection) stage according to an embodiment of the present application;
[0040] Figure 7 is a structure diagram of a deep fake face detection system based on deep perception according to an embodiment of the present application. DETAILED DESCRIPTION
[0041] The disclosed concept, specific structure and generated technical effects will be described clearly and completely in the following with reference to the embodiments and drawings, so as to fully understand the purposes, schemes and effects of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0042] In order to cope with the technical challenges in the background art, the academic and industrial circles have proposed various deep fake detection methods. The existing technical routes can be roughly divided into the following categories:
[0043] The first type of method focuses on detecting artifacts in the specific signal level introduced in the forgery process. Since the generation network usually contains operations such as upsampling, it will leave different patterns in the frequency domain of the image than the real image. Therefore, some methods convert the image to the frequency domain for analysis through discrete Fourier transform (DFT) or discrete cosine transform (DCT), trying to capture these fixed frequency artifacts. However, the fatal weakness of this type of method is that its detection clues are highly coupled with a specific generator architecture. Once the forgery technology is updated, for example, a new network structure is adopted or a slight noise, blur or compression post-processing operation is added after generation, these specific frequency features will disappear or be masked, causing the detection model to fail.
[0044] The second type of method aims to find inconsistencies in the biological or physiological level. For example, early forged videos often have unnatural blink frequency or lack of blinking action; some methods analyze the slight inconsistency between head posture and other parts of the body to make judgments; even more, by analyzing the weak color changes (i.e. photoplethysmography, PPG signal) in the facial skin area caused by heartbeat to distinguish true and false. Although this type of method starts from a more macro perspective, its effectiveness is often limited by the quality and length of the video, and it is not effective for static images. At the same time, with the advancement of forgery models, these physiological features can also be more finely imitated.
[0045] The third type of method focuses on inconsistencies in the physical world. For example, check if the light direction of different areas of the face is consistent, or if the reflection content of glasses, eyeballs and other highly reflective areas matches the environment. Although this type of method uses more essential physical laws, it usually needs to make strong assumptions about scene lighting, environment, etc., and is difficult to apply stably in complex or unknown scenes.
[0046] In summary, the existing technical routes generally have a core bottleneck: insufficient generalization ability. The discriminative features they learn are mostly "surface symptoms" produced by specific forgery algorithms under specific conditions, rather than the "underlying pathology" of the forgery behavior. When faced with new types of forgery algorithms not present in the training data, the performance of these models often declines catastrophically. Therefore, there is an urgent need for a method that can excavate more underlying, more essential, and more difficult-to-avoid future forgery techniques, and thus build a deep forgery detection scheme with high generalization ability.
[0047] The core technical concept of the present invention is based on a key insight: no matter how advanced the forgery technology is, its essence is still operating on a two-dimensional pixel plane, and this process is extremely difficult to perfectly reproduce the geometric structure consistency of three-dimensional objects in the real world. Therefore, three-dimensional geometric flaws are more fundamental and more difficult to be masked by future forgery algorithms than surface texture artifacts.
[0048] To achieve the above object, the present application proposes an innovative multi-task learning framework with three-dimensional geometric understanding as the core. The logical progressive relationship of its technical solutions is as follows:
[0049] 1. Constructing geometric perception foundation: train the shared encoder through the main depth estimation task.
[0050] The present application reconstructs the forgery detection as a multi-task learning problem. The core of the model is a shared feature encoder, which is forced to support two tasks at the same time: a main depth estimation task (auxiliary task) and a true-false classification task (main task). By introducing the main depth estimation task and designing a unique supervision signal for it, we force the shared encoder to understand the three-dimensional structure of the face (expressed in the form of depth map) during the learning process. This "shared" mechanism is the key of the present application, which ensures that the powerful geometric representation ability learned for the depth estimation task can be seamlessly transferred and serve the classification task, laying a solid foundation for subsequent accurate discrimination.
[0051] 2. Innovative depth estimation supervision signal to improve generalization ability.
[0052] To fundamentally avoid the model learning the wrong geometric information of the forgery image itself, the present application designs an asymmetric supervision strategy for the above-mentioned main depth estimation task:
[0053] For real faces, the model is required to predict its own depth map;
[0054] For the forged face, the model is required to "see through" the forged surface and predict the depth map of the original real face behind it.
[0055] This unique supervision mechanism forces the model to learn an essential geometric feature that is inherently bound to the identity and is not disturbed by the forgery process, rather than memorizing the surface flaws produced by the specific forgery algorithm. This is a strong regularization imposed on the model, which is the key to improving its generalization ability to unknown forgery algorithms.
[0056] 3. Focus on geometric flaws: fine attack of depth collaborative attention module.
[0057] After the shared encoder has a strong geometric perception ability, the application designs a deep collaborative attention module to apply this ability to classification and discrimination in a more intelligent and focused manner. The module includes a lightweight depth estimator that can quickly generate an intermediate depth representation from the feature map. Unlike existing technologies, the application also imposes direct supervision on this intermediate depth representation to ensure that it can stably capture the geometric profile. Subsequently, the intermediate depth map is used to generate a spatial attention map that dynamically assigns weights to different regions of the feature map. Intuitively, regions with dramatic depth changes, such as facial contours and feature boundaries, or geometric discontinuities caused by forgery, will be given higher attention weights. In this way, the model can adaptively focus "attention" on the most suspicious areas in terms of geometry, achieving "refined attacks" on potential forgery traces.
[0058] Reference Figure 1 and Figure 2 As Figure 2 shown is a depth forgery face detection method based on depth perception provided by an embodiment of the application, the method comprising the following steps:
[0059] S100, obtaining a face image, generating a classification label and a depth map label of the face image;
[0060] S200, constructing a model for depth forgery face detection, the model comprising a shared feature encoder, a main depth estimation module, a depth collaborative attention module, and a classification prediction module, extracting multi-scale feature maps from the face image through the shared feature encoder, generating a final depth map by regressing the multi-scale feature maps through the main depth estimation module, generating an enhanced feature map based on a high-level feature map in the multi-scale feature map through the depth collaborative attention module, and generating a logical value representing a true or false prediction according to the enhanced feature through the classification prediction module;
[0061] S300, constructing a multi-task loss function of the model, optimizing all learnable parameters in the model by minimizing the multi-task loss function value to obtain a trained model; the multi-task loss function comprises a classification loss calculated according to the classification label and the logical value, a main depth estimation loss calculated according to the depth map label and the final depth map, and an auxiliary depth estimation loss calculated according to the intermediate depth representation and the depth map label;
[0062] S400, sequentially passing a face image to be detected through the shared feature encoder, the depth collaborative attention module, and the classification prediction module in the trained model to obtain a prediction logical value, and generating a classification result of the face image as a real face or a forged face according to the prediction logical value.
[0063] The application discloses a deep fake face detection method and system based on deep perception, and aims to fundamentally solve the core pain point that the generalization ability of existing detection technology to unknown fake algorithms is weak. The core idea of the application is that through an innovative multi-task learning framework, the model is forced to deeply understand and utilize the three-dimensional geometric structure of the face while performing authenticity classification. The technical scheme mainly comprises the following steps: firstly, a neural network containing a shared feature encoder is constructed, and the encoder is designed to serve a main depth estimation task and a final classification task; in the training stage, through a unique asymmetric supervision strategy (i.e. requiring the model to predict the depth map of the source real face of the fake face), the shared encoder is forced to learn the identity-related and essential geometric feature representation. Secondly, a depth collaborative attention module is designed, which comprises a lightweight depth estimator assisted by auxiliary supervision, can quickly generate an intermediate depth map, and generate spatial attention based on the intermediate depth map, so as to dynamically guide the model to focus on the area where the geometric structure is most likely to have flaws. Finally, the enhanced features with geometric information are sent to the classifier for discrimination. Through the organic combination of'main depth estimation task to build geometric basic ability' and 'collaborative attention module to focus on geometric flaws', the detection basis is changed from the superficial fake artifacts to the more essential three-dimensional geometric inconsistency, thereby greatly improving the detection generalization ability and robustness to new and unknown fake technologies.
[0064] In some embodiments, in S100, the face image is acquired, and a classification label and a depth map label of the face image are generated, comprising:
[0065] In S110, the face image is acquired, and it is determined whether the face image is a real face image or a fake face image.
[0066] In S120, if it is determined that the face image is a real face image, the classification label of the real face image is set to zero, and a depth map label of the real face image is obtained by prediction of a teacher model.
[0067] In S130, if it is determined that the face image is a fake face image, the classification label of the fake face image is set to one, and a depth map label of the source real face image corresponding to the fake face image is obtained by prediction of the teacher model.
[0068] In the embodiment, by setting the classification label of the real face image and the fake face image, and by means of the teacher model, the depth map label of the real face image or the corresponding source real face image is predicted, accurate and key label information is provided for subsequent model training.
[0069] In some embodiments, in S200, the enhanced feature map is generated based on the high-level feature map in the multi-scale feature map through the depth collaborative attention module, comprising:
[0070] S210, sending a high-level feature map in the multi-scale feature map into a supervised lightweight depth estimator to regress an intermediate depth representation;
[0071] S220, sending the intermediate depth representation into a spatial attention generation network to generate a spatial attention map with the same size as the high-level feature map;
[0072] S230, fusing the high-level feature map and the high-level feature map weighted by the spatial attention map through a residual connection to obtain an enhanced feature map.
[0073] In the embodiment, the depth information of the high-level feature map is mined by the supervised lightweight depth estimator, the spatial attention generation network dynamically focuses on the geometric key area, and finally the feature enhancement is realized through the residual connection. Both the rich information of the original feature map and the feature expression of the geometric flaw area are strengthened through the spatial attention mechanism, so that the model can more accurately capture the three-dimensional structure inconsistency of the fake face.
[0074] In some embodiments, in S200, the multi-task loss function of the model is constructed, including:
[0075] The classification loss, the main depth estimation loss and the auxiliary depth estimation loss are weighted and fused to obtain the multi-task loss function of the model.
[0076] In the embodiment, by weighting and fusing the classification loss, the main depth estimation loss and the auxiliary depth estimation loss, the contributions of different tasks to the model training can be considered comprehensively. The classification loss directly reflects the performance of the model in the true and false classification task, and is one of the main targets that the model needs to optimize; the main depth estimation loss ensures the accurate prediction of the model on the depth map of the real face and the fake face (and the source real face), which is the basis for the model to understand the three-dimensional geometric structure; the auxiliary depth estimation loss supervises the intermediate depth representation, further strengthening the model's ability to capture the geometric contour. By reasonably setting the weights of each loss term, the model can achieve better performance balance under the multi-task learning framework, thereby improving the detection generalization ability and robustness of the depth fake face.
[0077] In some embodiments, in S200, the classification loss is calculated by the following method:
[0078] The binary cross-entropy loss of the classification label and the logical value is calculated to obtain the classification loss.
[0079] In this embodiment, the binary cross-entropy loss is used to calculate the classification loss, which can effectively measure the difference between the predicted logical value and the real classification label, guiding the model to optimize in the direction of correct classification. In the task of deep fake face detection, by minimizing the classification loss, the model can continuously improve the ability to distinguish real faces and fake faces, thereby improving the overall detection performance.
[0080] In some embodiments, in S200, the depth estimation loss is calculated by:
[0081] The pixel-level L1 loss and the structural similarity loss between the depth map label and the final depth map are calculated, and the pixel-level L1 loss and the structural similarity loss are combined to obtain the main depth estimation loss.
[0082] In this embodiment, the main depth estimation loss is calculated by combining the pixel-level L1 loss and the structural similarity loss, which can more comprehensively and accurately measure the difference between the predicted final depth map and the depth map label. The pixel-level L1 loss can directly reflect the absolute error of the predicted depth map and the real depth map at each pixel point, which helps the model to pay attention to the depth prediction accuracy in details; while the structural similarity loss considers the similarity of brightness, contrast and structure, etc. from the overall structure of the image, which can better capture the structural information in the depth map. By combining these two losses, the model can optimize the depth prediction in details and overall structure during the training process, thereby improving the prediction accuracy of the real face and fake face depth map, and providing more reliable geometric information support for the subsequent real or fake classification task.
[0083] In some embodiments, in S400, the classification result of the face image being a real face or a fake face according to the logical value comprises:
[0084] S410, using a Softmax function to map the logical value output by the classification prediction module to a probability between zero and one;
[0085] S420, if it is determined that the probability is greater than a preset threshold, the face image to be detected is determined to be a fake face, otherwise it is a real face.
[0086] In this embodiment, the logical value is converted into a probability value by using the Softmax function to map it, which intuitively represents the possibility of the face image to be detected as a fake face. By presetting a reasonable threshold, the model can automatically and accurately classify the face image as real or fake. This classification method is not only simple and effective, but also has high operability in practical application. At the same time, the preset threshold can be adjusted according to the requirements of specific application scenarios to adapt to the requirements of detection accuracy and recall rate in different scenarios.
[0087] The following is a specific embodiment provided by the present application:
[0088] The deep fake face detection method provided by the present application mainly relies on a carefully designed end-to-end deep neural network model. The complete implementation process can be divided into four stages: data preprocessing, model architecture design, model training and model inference.
[0089] I. Data preprocessing and supervision signal generation:
[0090] Before model training, the data needs to be standardized, and the supervision signal (Ground Truth) is prepared for subsequent multi-task learning.
[0091] 1. Input data processing: face detection, cropping, alignment, and scaling to a fixed size (such as 224x224 pixels) are performed on the RGB image containing the face, and finally normalization is performed to obtain the face image.
[0092] 2. Supervision signal generation: this process is shown in Figure 3 . The supervision signal includes classification labels and depth map labels;
[0093] Classification labels : This is a binary label, with real faces as 0 and fake faces as 1.
[0094] Depth map labels : This is the core of the geometric supervision of the present application. We use a pre-trained and advanced performance "teacher model" to generate a reference depth map, and the teacher model can use MiDaS (monocular depth estimation model). The key improvement is that its generation method is different according to the image type:
[0095] For real face images , the depth map label is directly predicted by the teacher model for the real face image : ;
[0096] For fake face images , first find the corresponding source real face image its depth map label is then predicted by the teacher model on this source real face image : This asymmetric supervision strategy is the key to improve the generalization ability.
[0097] II. Model architecture design:
[0098] The complete model architecture of the present application in the training phase is shown in Figure 2 , which mainly consists of four core modules: shared feature encoder, main depth estimation module, depth collaborative attention module and classification prediction module. These modules work together to achieve the technical goal of the present application.
[0099] 101. Shared Feature Encoder:
[0100] As shown in Figure 2 , it is the starting point and backbone of the entire model. It usually selects a powerful network (such as Convnext network, Vit network) pre-trained on large datasets such as Imagenet, which is responsible for extracting multi-scale and hierarchical feature maps , , , from the input face image. Its "shared" feature means that the features extracted will be used by the subsequent main depth estimation module and depth collaborative attention module, which is a bridge connecting the two tasks.
[0101] 102. Main Depth Estimation Decoder:
[0102] In Figure 2 , this module is parallel to the classification path. It is a standard decoder structure (such as U-Net decoder) that receives all scale feature maps ( ) from the shared feature encoder. Through a series of upsampling and jump connections, it regresses a high-quality final depth map with the same size as the input face image. The core role of this module is to "force" the shared feature encoder to learn robust and fine geometric feature representation through a complex depth estimation task in the training phase.
[0103] 103. Depth-Collaborative Attention Module (Dcam):
[0104] This module is the structural innovation of the present application, and its position in the overall architecture is shown in Figure 2The detailed internal structure of which is shown in Figure 5 . It receives the high-level feature map in the multi-scale feature map and performs the following operations:
[0105] Figure 5 103a. Supervised lightweight depth estimator: As shown in , the high-level feature map is first sent into a lightweight network composed of a few convolutional layers, quickly regressing a coarse intermediate depth representation .
[0106] 103b. Spatial attention generation: Then, the intermediate depth representation is sent into a simple network composed of convolutional layers and Sigmoid activation function, generating a spatial attention map with the same size as the high-level feature map . The numerical distribution of the spatial attention map represents the model's evaluation of the geometric saliency of different spatial locations.
[0107] 103c. Feature fusion: Finally, the high-level feature map is fused with the attention-weighted feature map by means of residual connection: , where
[0108] is the fused enhanced feature map , and
[0109] is the element-wise multiplication operation. This operation can adaptively enhance the feature representation of geometric suspicious regions while preserving the original information flow. Figure 6 104. Classification prediction head:
[0110] As shown in , this module is the final decision unit of the model. It receives the enhanced feature map
[0111] from the depth-coattention module, and outputs a logical value (Prediction) representing the authenticity prediction through global average pooling and fully connected layers. Figure 4
[0112] ;
[0113] The calculation of each loss is as follows:
[0114] Classification loss : computed between the logical value Prediction output by the classification prediction module and the classification label Y, usually adopting binary cross-entropy loss.
[0115] Main depth estimation loss : computed between the final depth map D output by the main depth estimation module and the supervision signal Y.
[0116] Auxiliary depth estimation loss : this is the key improvement of the present invention, as shown in Figure 3 , Figure 4 and Figure 5 . It is computed between the intermediate depth representation D' generated inside the depth co-attention module and the down-sampled supervision signal Y. This loss directly supervises the geometric prediction ability of the attention module, ensuring that the generation of the attention map is based on reliable geometric information, making the entire logical chain more stable.
[0117] In addition, , and are three weight coefficients, which are predefined hyperparameters.
[0118] Four, model inference:
[0119] When the model training is completed, it enters the inference (i.e. actual detection) stage, and its architecture is simplified to improve efficiency, as shown in Figure 6 .
[0120] Architecture simplification: the main depth estimation module and its related loss calculation part are completely removed during inference, as they are only used for training. Similarly, the auxiliary loss calculation inside the depth co-attention module is also disabled.
[0121] Forward propagation: for a face image to be detected, the data flow becomes very direct and efficient. The image passes through the shared feature encoder, the depth co-attention module and the classification prediction module in turn, and finally obtains the detection result.
[0122] Result determination: the logical value output by the classification prediction module is converted to a probability between 0 and 1 through the Sigmoid function. If the probability is greater than a preset threshold (such as 0.5), it is determined that the image is a depth fake face, otherwise it is a real face.
[0123] In summary, the present invention uses the complete training architecture shown in Figure 2 ,Figure 3 and Figure 4 the unique training mechanism shown in the figure, Figure 5 the core attention module shown in the figure, and Figure 6 the efficient inference process shown in the figure, a set of logically rigorous and high-performance deep fake detection scheme is built.
[0124] Compared with the related art, the beneficial effects of the present application are reflected in:
[0125] 1. Excellent generalization performance: based on the general three-dimensional geometric inconsistency, rather than the specific algorithm surface artifact, the method shows strong detection ability for unseeable fake technology.
[0126] 2. Higher detection accuracy: the synergistic effect of "geometric foundation construction" and "geometric flaw focusing" enables the model to form a more comprehensive and robust feature representation, thereby improving the detection precision.
[0127] 3. Logically self-consistent and stable training mechanism: innovative asymmetric supervision signal and direct supervision of attention module together ensure that the model optimizes in the correct direction (learns the essential geometry), solving the problem of easy overfitting of traditional methods.
[0128] 4. Enhanced interpretability: through visualizing the attention map, the geometric region that the model focuses on when making decisions can be intuitively seen, improving the credibility of the model.
[0129] Reference Figure 7 , the embodiment of the present application also provides a deep fake face detection system based on deep perception, comprising:
[0130] at least one processor;
[0131] at least one memory for storing at least one program;
[0132] When the at least one program is executed by the at least one processor, the at least one processor implements the above method.
[0133] The contents in the above method embodiments are all applicable to the present embodiment, the functions specifically implemented by the present embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those of the above method embodiments, which will not be repeated here.
[0134] In addition, an embodiment of the present application also provides a computer readable storage medium, which stores computer executable instructions, and the computer executable instructions are used to execute the above method.
[0135] It is worth noting that since the computer readable storage medium of the embodiment of the present application can execute the method of any of the above embodiments, the specific implementation and technical effects of the computer readable storage medium of the embodiment of the present application can refer to the specific implementation and technical effects of the method of any of the above embodiments.
[0136] While the description of the present disclosure has been quite detailed and particularly with respect to several described embodiments, it is not intended to limit the present disclosure to any of these details or embodiments or any particular embodiment, but rather it is intended to cover the intended scope of the present disclosure as set forth in the claims with respect to the prior art, considering the broadest possible interpretation of the claims in light of the prior art. Furthermore, the foregoing description of the present disclosure has been presented for the purpose of providing a useful description for those skilled in the art in order to provide a useful description, and non-substantial changes to the present disclosure that are not presently foreseeable still represent equivalent changes to the present disclosure.
Claims
1. A deep fake face detection method based on deep perception, characterized in that, The method comprises the following steps: Obtaining a face image, generating a classification label and a depth map label of the face image; Constructing a model for detecting a deep fake face, the model comprising a shared feature encoder, a main depth estimation module, a depth collaborative attention module and a classification prediction module, the shared feature encoder being used to extract multi-scale feature maps from the face image, the main depth estimation module being used to regress the multi-scale feature maps to generate a final depth map, the depth collaborative attention module being used to generate an enhanced feature map based on a high-level feature map in the multi-scale feature maps, and the classification prediction module being used to generate a logical value representing a true or false prediction according to the enhanced feature; the depth collaborative attention module comprises a supervised lightweight depth estimator into which the high-level feature map in the multi-scale feature maps is inputted to regress an intermediate depth representation. A multi-task loss function of the model is constructed, and all learnable parameters in the model are optimized by minimizing the value of the multi-task loss function to obtain a trained model; the multi-task loss function comprises a classification loss calculated according to the classification label and the logical value, a main depth estimation loss calculated according to the depth map label and the final depth map, and an auxiliary depth estimation loss calculated according to the intermediate depth representation and the depth map label. A face image to be detected is sequentially inputted into the shared feature encoder, the depth collaborative attention module and the classification prediction module in the trained model to obtain a prediction logical value, and a classification result of the face image being a real face or a fake face is generated according to the prediction logical value.
2. The method of claim 1, wherein, The obtaining of the face image, the generation of the classification label and the depth map label of the face image comprise: Obtaining a face image, determining whether the face image is a real face image or a fake face image; If the face image is determined to be a real face image, the classification label of the face image is set to zero, and a depth map label is obtained by predicting the real face image by using a teacher model; If the face image is determined to be a fake face image, the classification label of the face image is set to one, and a source real face image corresponding to the fake face image is obtained, and a depth map label is obtained by predicting the source real face image by using the teacher model.
3. The method of claim 1, wherein, The depth collaborative attention module further comprises: The intermediate depth representation is inputted into a spatial attention generation network to generate a spatial attention map with the same size as the high-level feature map; The high-level feature map is fused with the high-level feature map weighted by the spatial attention map through a residual connection to obtain an enhanced feature map.
4. The method of claim 1, wherein, The multi-task loss function of the model comprises: The classification loss, the main depth estimation loss and the auxiliary depth estimation loss are weighted and fused to obtain the multi-task loss function of the model.
5. The method of claim 1, wherein, The classification loss is calculated by the following method: The binary cross-entropy loss of the classification label and the logical value is calculated to obtain the classification loss.
6. The method of claim 1, wherein, The depth estimation loss is calculated by the following method: A pixel-level L1 loss and a structural similarity loss between the depth map label and the final depth map are calculated, the pixel-level L1 loss and the structural similarity loss are combined to obtain a main depth estimation loss.
7. The method of claim 1, wherein, The generating the classification result of the face image being a real face or a fake face according to the logic value comprises: mapping the logic value output by the classification prediction module into a probability between zero and one using a Softmax function; if the probability is greater than a preset threshold, determining that the face image to be detected is a fake face, otherwise, a real face.
8. A deep fake face detection system based on deep perception, characterized in that, comprise: at least one processor; at least one memory for storing at least one program; when the at least one program is executed by the at least one processor, the at least one processor implements the method of any one of claims 1 to 7.
9. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 8. The computer program is executed by the processor to implement the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Face anti-counterfeiting model training method and device and electronic equipment
CN113553904A
Video depth forgery detection method and device
CN116778545A
False face detection method and device and storage medium
CN117877086A
Electronic device and method for authenticating of the same
KR1020210028534A