Method and device, system for detecting a fake face, storage medium

By using the YOLOv8 backbone network and the domain-invariant feature learning module, the overfitting and insufficient generalization problems of deep fake face detection methods in different domains are solved, and more efficient fake face detection is achieved.

CN120032408BActive Publication Date: 2026-01-27BEIJING UNION UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411986416.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2026-01-27
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

Existing deepfake detection methods are prone to overfitting and have insufficient generalization performance when faced with forged images from different domains, making it difficult to effectively identify cross-domain forged images.

Method used

We employ a YOLOv8 backbone network combined with block random masking and a domain-invariant feature learning module. We enhance the data through block random masking, learn global generalizable features and local key features using the domain-invariant feature learning module, and optimize the model weights using a binary cross-entropy loss function.

Benefits of technology

This improves the model's robustness and generalization ability, enabling more accurate detection of deepfake face images and enhancing detection accuracy and cross-dataset generalization performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120032408B_ABST
    Figure CN120032408B_ABST
Patent Text Reader

Abstract

The application discloses a kind of counterfeit face detection method and device, system, storage medium, comprising: obtaining face counterfeit public data set;Enhanced face picture is obtained using block random mask operation;YOLOv8 backbone network is input into the enhanced face picture, and preliminary face image feature understanding is completed after the learning of P1-P5 stage;Global generalizable feature and local key feature are learned respectively by domain invariant feature learning module;The obtained features are fused and input into the classification head of target network;The network parameter weight is updated and optimized using binary cross entropy loss function, and the model weight of training is obtained;The model weight of training is verified on multiple public data sets;Inference is carried out using the trained model, and the true or false of depth counterfeit face picture is judged.Using the technical scheme of the application, more accurate and more general face counterfeit detection performance is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing technology, and particularly relates to a method, device, system, and storage medium for detecting fake faces. Background Technology

[0002] Advances in deep learning and computer vision technologies have enabled artificial intelligence to better empower human life, but at the same time, they have also brought many threats. Detecting deepfake content has become one of the most pressing issues for individuals, businesses, and governments around the world.

[0003] Existing deepfake detection methods are often based on deep neural networks. Through carefully designed feature learning modules and the use of various learning strategies, they have demonstrated good performance on some publicly available datasets. However, this apparent success often masks risks of overfitting and insufficient generalization. Due to complex data biases arising from different data sources and forgery methods, models can easily fall into "data traps" from their initial learning when faced with forged images from different domains, making it difficult to distinguish forged images from other domains. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a method, device, system and storage medium for detecting fake faces, which can jointly mine more subtle artifact clues at the data level and feature level, explore more generalizable essential features, and thus improve the robustness and generalization of the feature detection model.

[0005] To achieve the above objectives, the present invention adopts the following technical solution:

[0006] A method for detecting fake faces includes:

[0007] Obtain publicly available datasets of face spoofing;

[0008] Based on a publicly available dataset of face spoofing, enhanced face images are obtained using a block-based random masking operation;

[0009] The enhanced face image is input into the YOLOv8 backbone network, and after learning through the P1-P5 stages, the initial face image feature understanding is completed.

[0010] The domain-invariant feature learning module learns both global generalizable features and local key features.

[0011] The obtained features are fused and then input into the classification head of the target network;

[0012] The weights of the network parameters are updated and optimized using the binary cross-entropy loss function to obtain the weights of the trained model.

[0013] The trained model weights are validated on multiple public datasets;

[0014] By using a trained model for inference, the system can determine whether a deepfake face image is real or fake.

[0015] As a preferred option, the YOLOv8 backbone network is composed of CBS and C2f stacked together. CBS is composed of a combination of Conv2d, BatchNorm2d and SiLU, and C2f is CSPlayer_2Conv. In stages P1 to P5, the data passes through one CBS in stage P1 and four CBS-C2f combinations in stages P2 to P5 in sequence to complete the initial feature learning of the face image.

[0016] Preferably, the domain-invariant feature learning module consists of a global generalization feature learning module and a local key feature learning module in parallel. The global generalization feature learning module enhances the model's learning of high-frequency parts by perturbing the low-frequency parts of the face image, while the local key feature learning module emphasizes the key category features that are not easily detected in the forged samples through the encoding mapping of an inherent codebook.

[0017] The present invention also provides a fake face detection device, comprising:

[0018] The first processing module is used to obtain publicly available datasets of face spoofing.

[0019] The second processing module is used to obtain enhanced face images based on a public dataset of forged faces using a block random masking operation.

[0020] The third processing module is used to input the enhanced face image into the YOLOv8 backbone network, and complete the initial face image feature understanding through the P1-P5 learning stages.

[0021] The fourth processing module is used to learn global generalizable features and local key features respectively through the domain-invariant feature learning module;

[0022] The fifth processing module is used to fuse the obtained features and input them into the classification head of the target network;

[0023] The sixth processing module is used to update and optimize the network parameter weights using the binary cross-entropy loss function to obtain the trained model weights.

[0024] The seventh processing module is used to validate the trained model weights on multiple public datasets;

[0025] The eighth processing module is used to perform inference using the trained model to determine the authenticity of deepfake face images.

[0026] As a preferred option, the YOLOv8 backbone network is composed of CBS and C2f stacked together. CBS is composed of a combination of Conv2d, BatchNorm2d and SiLU, and C2f is CSPlayer_2Conv. In stages P1 to P5, the data passes through one CBS in stage P1 and four CBS-C2f combinations in stages P2 to P5 in sequence to complete the initial feature learning of the face image.

[0027] Preferably, the domain-invariant feature learning module consists of a global generalization feature learning module and a local key feature learning module in parallel. The global generalization feature learning module enhances the model's learning of high-frequency parts by perturbing the low-frequency parts of the face image, while the local key feature learning module emphasizes the key category features that are not easily detected in the forged samples through the encoding mapping of an inherent codebook.

[0028] This invention also provides a fake face detection system, including: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes a fake face detection method when run by the processor.

[0029] This invention also provides a storage medium storing a computer program that executes a fake face detection method during runtime.

[0030] Compared with the prior art, the present invention has the following advantages and technical effects:

[0031] 1. The YOLOv8 object detection network is used as the backbone network for face forgery detection. Compared with conventional classification backbone networks, the YOLOv8 backbone network has higher basic detection performance.

[0032] 2. By adopting a block-based random masking strategy, the overfitting problem of the network to irrelevant features and specific patterns can be effectively alleviated at the data level.

[0033] 3. The Domain Invariant Feature Learning Module (DICL) is adopted to learn discriminative domain invariant features by sampling and reconstructing the low-frequency distribution in the image and combining it with local key features. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0035] Figure 1This is a flowchart of the fake face detection method according to an embodiment of the present invention;

[0036] Figure 2 This is a schematic diagram of data processing for the fake face detection method according to an embodiment of the present invention;

[0037] Figure 3 This is an example diagram of block random masking processing according to an embodiment of the present invention;

[0038] Figure 4 A heat map is shown to illustrate the experimental results of an embodiment of the present invention. Detailed Implementation

[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0040] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0041] Example 1:

[0042] like Figure 1 As shown, this embodiment provides a pedestrian flow counting method that integrates semantic information, including the following steps:

[0043] S1: Obtain the publicly available dataset of fake faces and perform preprocessing work such as frame segmentation and face cropping.

[0044] S11: Download the raw video data from FF++, Celeb-DF, DFDC, DFDC-P, and DFD respectively, and perform random frame extraction on the video data to obtain frame image datasets. The FF++ dataset is used for training and validation, while the Celeb-DF, DFDC, WDF, and DFD datasets are used only for validation.

[0045] The FF++ dataset contains 1000 videos generated using four forgery methods: DeepFakes, Face2Face, FaceSwap, and NeuralTextures. For each forgery method, the dataset provides videos in three resolutions: Raw, high-quality (HQ), and low-quality (LQ).

[0046] Celeb-DF contains 590 original videos and 5,639 corresponding deepfake videos, sourced from interviews with 59 celebrities of different genders, ages, and ethnicities on YouTube. All videos have an average length of approximately 13 seconds, a standard frame rate of 30 frames per second, and are ultimately in MPEG4.0 format.

[0047] DFDC is a more challenging face forgery detection dataset derived from a competition. It consists of 124,000 video clips, including 244 real clips filmed by various actors in different scenes and deepfaked using 8 different techniques.

[0048] The WildDeepfake (WDF) dataset consists of 3,805 real video clips and 3,509 fake video clips collected from the internet. The videos in this dataset are uniquely challenging because they are manipulated using undisclosed techniques and presented in diverse contexts. The DFD dataset contains over 363 original videos featuring 28 paid actors across 16 different scenes, as well as over 3,000 fake videos using DeepFakes.

[0049] S12: For frame image data, use the RtinaFace tool to locate the face region in the image, obtain the face position information, and then crop out the face image data.

[0050] S13: Resize and normalize the face image to obtain a preprocessed face image. The processed face image is uniformly sized to 224×224 pixels.

[0051] S2: Divide the FF++ dataset into training, validation, and test sets, and input the face images from the training set into the target network. Specifically, the FF++ dataset is divided in a 36:7:7 ratio.

[0052] S3: Using block-based random masks reduces the network's overfitting to irrelevant information in the image, resulting in an enhanced face image. Figure 3 This section displays an example of a face image enhanced with a block-based random mask.

[0053] S31: Block Mask Generation: The mask blocks are set to squares with an aspect ratio of 1. To balance the "perturbation" of the background and face regions, five random and discrete masking operations are performed on each image. The erasure ratio of each mask block is 2% of the entire image. That is, the overall perturbation ratio will be controlled below 10% of the entire image, avoiding excessive erasure that unintentionally covers important local artifacts and thus misleads the model.

[0054] S32: Adding Random Noise: Compared to setting all pixels to zero ("all black"), setting all pixels to 255 ("all white"), and filling with ImageNet average values, adding random pixel values ​​to the mask can better reduce the network's error rate during testing. Therefore, further adding random noise to the random mask block generated in the previous step can achieve a more robust data augmentation effect.

[0055] S4: Input the YOLOv8 backbone network and complete the initial understanding of facial image features after learning through the P1-P5 stages;

[0056] S5: Learn global generalizable features and local key features respectively through the domain-invariant feature learning module;

[0057] S51: Since the high-frequency components of an image contain more global structural features, while the low-frequency components contain most of the stylistic information reflecting domain variations, the global generalization feature learning module enhances the model's learning of the high-frequency components by sufficiently perturbing the low-frequency components of the face image, ultimately obtaining the output feature X. GCFL ;

[0058] S52: To preserve easily overlooked local region features while acquiring global generalization features, a Local Key Feature Learning (LCFL) module, parallel to GGFL, was added to the domain-invariant feature learning module. The aim is to emphasize easily imperceptible key category features in forged samples through an encoding mapping of an inherent codebook, ultimately obtaining the output feature X. DIFL .

[0059] S6: Fuse the obtained features using the Concat operation and input them into the classification head of the target network;

[0060] S7: Use the binary cross-entropy loss function to update and optimize the network parameter weights to obtain the trained model weights;

[0061] S8: Validate the trained model weights on multiple public datasets.

[0062] S9: Use the trained model for inference to determine the authenticity of deepfake face images.

[0063] As a further limitation of this technical solution, the specific steps of S4 are as follows:

[0064] The YOLOv8 backbone network used is mainly composed of CBS and C2f stacks. CBS is a combination of Conv2d, BatchNorm2d, and SiLU; C2f, or CSPlayer_2Conv, allows YOLOv8 to obtain richer gradient flow information while maintaining lightweight design. In stages P1 to P5, the data sequentially passes through one CBS (P1) and four CBS-C2f combinations (P2 to P4) to complete the initial feature learning of the face image, and the learned features are then input into step S5.

[0065] Furthermore, the specific steps of S51 are as follows:

[0066] First, for x∈R H×W×D Performing a DCT along the spatial dimensions converts x to the frequency domain:

[0067] X = D[x] ∈ C H×W×D (1)

[0068] Where D[·] denotes the DCT transform. Note that X is a complex tensor representing the frequency domain space of x;

[0069] Secondly, for a given batch of samples Extract the low-frequency space from the image respectively and high frequency space Based on the characteristics of DCT, the extracted low-frequency component is located in the upper left corner of the image;

[0070] Subsequently, the obtained low-frequency components are modeled using a Gaussian distribution. The mean is the original value of the corresponding pixel, while the variance is calculated using the values ​​of that element across different samples. This process can be expressed mathematically as follows:

[0071]

[0072] ∑ 2 The magnitude of this value reflects the extent of change of the corresponding element within the latent neighborhood offset. For each element in the low-frequency spectrum, its new pixel value is obtained by resampling from the estimated Gaussian distribution:

[0073]

[0074] Where ε∈[0,1] represents the intensity of the perturbation. Through this method, the model can not only preserve some of the detailed features carried by the low-frequency part of the original image, but also introduce other noises in similar distributions, thereby enhancing the network's learning of the semantic information carried by the high-frequency part.

[0075] Finally, the perturbed low-frequency component and the original high-frequency part Combined into a complete new frequency domain, and further combined with a global filter Q∈C H×W×C Perform a dot product operation:

[0076]

[0077] The global filter Q can be viewed as a set of learnable frequency filters with different hidden dimensions. This approach can further help the network remove features that are irrelevant to global structural information, thereby enhancing the generalization ability of global features. The data is then mapped back to the spatial domain via DCT inverse transform, normalized, and fed into a multilayer perceptron.

[0078]

[0079] By performing residual operations on the features subjected to low-frequency perturbation and the original features, global generalizable feature learning is completed.

[0080]

[0081] Furthermore, the specific steps of S52 are as follows:

[0082] First, a set of convolutions is used on the input feature X. in Encoding is performed. The encoded features are further processed using CBR blocks. A CBR block consists of a 3×3 convolution with a BN layer and a ReLU activation function. Through the above steps, the processed encoded features are input into the Codebook and combined with it using a set of learnable scaling factors. Specifically, a set of scaling factors c is used sequentially to... and b m Map the corresponding position information. The information about the m-th codeword in the entire image can be calculated in the following way:

[0083]

[0084] in, It is the i-th pixel, b m It is the m-th learnable visual codeword, c m It is the m-th scaling factor, and it is also a learnable parameter that can be set. This is information about the position of each pixel relative to the codeword. M is the total number of visual centers. To fuse all the s... m Use f to calculate the complete image information with M codewords:

[0085]

[0086] Where f is a BN layer containing a ReLU layer and a averaging layer. Subsequently, the complete features mapped using the Codebook are fed into a fully connected layer and a 1×1 convolutional layer to predict prominent key class features, and the input features X are... in Channel multiplication is performed on the local angular region features processed by the scaling factor coefficient:

[0087]

[0088] For channel multiplication, w(·) is the Sigmoid activation function, and Conv 1×1 (·) represents a 1×1 convolution operation. Finally, the input feature X is... in With local feature X l By adding each channel sequentially, the final local key feature X is obtained. LCFL :

[0089]

[0090] This is channel-level addition.

[0091] Furthermore, the specific steps of S6 are as follows:

[0092] By concatenating the features learned through Global Generalized Feature Learning (GGFL) and Local Key Feature Learning (LCFL), the final domain-invariant features are obtained.

[0093] X DIFL =Concat(X) GGFL ,X LCFL (11)

[0094] Furthermore, the specific steps of S7 are as follows:

[0095] The loss function of the model is the binary cross-entropy loss function. The formula for calculating the binary cross-entropy loss function is:

[0096]

[0097] Where y is the true label, which can be 0 or 1 for binary classification problems. It is the probability predicted by the model, that is, the probability that the model predicts the positive class.

[0098] Furthermore, the specific steps of S8 are as follows:

[0099] The model trained on the FF++ dataset will be tested for generalization on the FF++, DFDC, Celeb-DF, WDF, and DFD datasets, and compared with other existing face forgery detection methods. The evaluation metrics are ACC (Accuracy) and AUC (Area Under the Receiver Operating Characteristic Curve). Figure 4 This invention demonstrates a comparison between embodiments of the present invention and heatmaps generated by other existing networks using GradCam technology on different forged images.

[0100] This invention acquires a publicly available dataset of face forgeries and performs preprocessing steps such as frame segmentation and face cropping. The dataset is then divided, and face images from the training set are input into a target network. Enhanced face images are obtained using block-based random masking. These enhanced images are then input into a YOLOv8 backbone network, undergoing P1-P5 learning stages to achieve preliminary face image feature understanding. A domain-invariant feature learning module is used to learn both global generalizable features and local key features. The obtained features are fused and input into the target network's classification head. The network parameter weights are updated and optimized using a binary cross-entropy loss function to obtain the trained model weights. The trained model weights are validated on multiple publicly available datasets. The trained model is then used for inference to determine the authenticity of deeply forged face images. This invention innovatively uses an object detection network as the backbone of the face forgery detection model. This alleviates overfitting of the network to features and specific patterns unrelated to forgery at the data level. Simultaneously, by sampling and reconstructing low-frequency distributions in the image and combining them with local key features, it better learns discriminative domain-invariant features, achieving more accurate and generalized face forgery detection performance.

[0101] Experiments demonstrate that this embodiment achieves detection ACC of 98.76% and 93.71% on the C23 and C40 subsets of FF++, respectively, and AUC of 99.53% and 96.85%, respectively, surpassing most existing fake face detection schemes. Through cross-dataset generalization experiments, this example, trained on the FF++ dataset and tested on the Celeb-DF, DFDC, WDF, and DFD datasets, achieved AUC values ​​of 73.03%, 71.18%, 68.42%, and 78.26%, respectively, demonstrating good generalization performance. This indicates that the proposed method effectively improves the model's accuracy and robustness.

[0102] Example 2:

[0103] This invention also provides a fake face detection device, comprising:

[0104] The first processing module is used to obtain publicly available datasets of face spoofing.

[0105] The second processing module is used to obtain enhanced face images based on a public dataset of forged faces using a block random masking operation.

[0106] The third processing module is used to input the enhanced face image into the YOLOv8 backbone network, and complete the initial face image feature understanding through the P1-P5 learning stages.

[0107] The fourth processing module is used to learn global generalizable features and local key features respectively through the domain-invariant feature learning module;

[0108] The fifth processing module is used to fuse the obtained features and input them into the classification head of the target network;

[0109] The sixth processing module is used to update and optimize the network parameter weights using the binary cross-entropy loss function to obtain the trained model weights.

[0110] The seventh processing module is used to validate the trained model weights on multiple public datasets;

[0111] The eighth processing module is used to perform inference using the trained model to determine the authenticity of deepfake face images.

[0112] As one embodiment of the present invention, the YOLOv8 backbone network is composed of CBS and C2f superimposed together. CBS is composed of a combination of Conv2d, BatchNorm2d and SiLU, and C2f is CSPlayer_2Conv. In stages P1 to P5, the data passes through one CBS in stage P1 and four CBS-C2f combinations in stages P2 to P5 in sequence to complete the initial feature learning of the face image.

[0113] As one embodiment of the present invention, the domain-invariant feature learning module is composed of a global generalized feature learning module and a local key feature learning module in parallel; wherein, the global generalized feature learning module enhances the learning of high-frequency parts of the model by perturbing the low-frequency parts of the face image, and the local key feature learning module emphasizes the key category features that are not easily detected in the forged samples by encoding mapping of an inherent codebook.

[0114] Example 3:

[0115] This invention also provides a fake face detection system, including: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes a fake face detection method when run by the processor.

[0116] Example 4:

[0117] This invention also provides a storage medium storing a computer program that executes a fake face detection method during runtime.

[0118] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A method for detecting fake faces, characterized in that, include: Obtain publicly available datasets of face spoofing; Based on a publicly available dataset of face spoofing, enhanced face images are obtained using a block random masking operation; The enhanced face image is input into the YOLOv8 backbone network, and after learning through the P1-P5 stages, the initial face image feature understanding is completed. The domain-invariant feature learning module learns global generalizable features and local key features. The obtained features are fused and then input into the classification head of the target network; The weights of the network parameters are updated and optimized using the binary cross-entropy loss function to obtain the weights of the trained model. The trained model weights are validated on multiple public datasets; The trained model is used for inference to determine the authenticity of deepfake face images. The domain-invariant feature learning module consists of a global generalization feature learning module and a local key feature learning module. The global generalization feature learning module enhances the model's learning of high-frequency parts by perturbing the low-frequency parts of the face image, while the local key feature learning module emphasizes the key category features that are not easily detected in the forged samples through the encoding mapping of an inherent codebook. Furthermore, globally generalizable features are learned through the domain-invariant feature learning module, specifically as follows: For x∈R H×W×D Performing a DCT along the spatial dimensions converts x to the frequency domain. X=D[x]∈C H×W×D Where D[·] denotes DCT transform; X is a complex tensor representing the frequency domain space of x; For a given batch of samples Extract the low-frequency space from the image respectively and high frequency space Based on the characteristics of DCT, the extracted low-frequency component is located in the upper left corner of the image; The obtained low-frequency component is modeled using a Gaussian distribution, i.e.: Where, ∑ 2 The magnitude of the value reflects the change in the corresponding element's offset within the latent neighborhood; for each element in the low spectrum, its new pixel value is obtained by resampling from the estimated Gaussian distribution: Where ε∈[0,1] represents the intensity of the disturbance; The disturbed low-frequency component and the original high-frequency part Combined into a complete new frequency domain, and further combined with a global filter Q∈C H×W×C Perform a dot product operation: The data is then mapped back to the spatial domain via DCT inverse transform, normalized, and fed into a multilayer perceptron. By performing residual operations on the features after low-frequency perturbation and the original features, global generalizable feature learning is completed, i.e. Furthermore, local key features are learned separately through the domain-invariant feature learning module, specifically as follows: Using a set of convolutional pairs on the input feature X in Encoding is performed, and the encoded features are further processed using CBR blocks, which consist of 3×3 convolutions with BN layers and ReLU activation functions. The processed encoded features are then input into the Codebook and combined with a set of learnable scaling factors. A set of scaling factors c is used sequentially to... and b m Map the corresponding position information; the information about the m-th codeword in the entire image is calculated in the following way: in, It is the i-th pixel, b m It is the m-th learnable visual codeword, c m It is the m-th scaling factor. It is information about the position of each pixel relative to the codeword, where M is the total number of visual centers, and f is used to calculate the complete image information with M codewords: Where f is a BN layer containing a ReLU layer and an averaging layer, the complete features mapped using the Codebook are fed into a fully connected layer and a 1×1 convolutional layer to predict prominent key class features, and the input features X are... in Channel multiplication is performed on the local angular region features processed by the scaling factor coefficient: in, For channel multiplication, w(·) is the Sigmoid activation function, and Conv 1×1 (·) represents a 1×1 convolution operation; Input features X in With local feature X l By adding each channel sequentially, the final local key feature X is obtained. LCFL : in, This is channel-level addition.

2. The method for detecting fake faces as described in claim 1, characterized in that, The YOLOv8 backbone network is composed of CBS and C2f stacked together. CBS is composed of Conv2d, BatchNorm2d and SiLU, and C2f is CSPlayer_2Conv. In stages P1 to P5, the data passes through one CBS in stage P1 and four CBS-C2f combinations in stages P2 to P5 to complete the initial feature learning of the face image.

3. A forged face detection device for implementing the forged face detection method of claim 1, characterized in that, include: The first processing module is used to obtain publicly available datasets of face spoofing. The second processing module is used to obtain enhanced face images based on a public dataset of forged faces using a block random masking operation. The third processing module is used to input the enhanced face image into the YOLOv8 backbone network, and complete the initial face image feature understanding through the P1-P5 learning stages. The fourth processing module is used to learn global generalizable features and local key features respectively through the domain-invariant feature learning module; The fifth processing module is used to fuse the obtained features and input them into the classification head of the target network; The sixth processing module is used to update and optimize the network parameter weights using the binary cross-entropy loss function to obtain the trained model weights. The seventh processing module is used to validate the trained model weights on multiple public datasets; The eighth processing module is used to perform inference using the trained model to determine the authenticity of deepfake face images.

4. The fake face detection device as described in claim 3, characterized in that, The YOLOv8 backbone network is composed of CBS and C2f stacked together. CBS is composed of Conv2d, BatchNorm2d and SiLU, and C2f is CSPlayer_2Conv. In stages P1 to P5, the data passes through one CBS in stage P1 and four CBS-C2f combinations in stages P2 to P5 to complete the initial feature learning of the face image.

5. A fake face detection system, characterized in that, include: A memory and a processor, wherein the memory stores a computer program executed by the processor, the computer program performing the fake face detection method as described in any one of claims 1 to 2 when executed by the processor.

6. A storage medium, characterized in that, The storage medium stores a computer program, which executes the fake face detection method as described in any one of claims 1 to 2 when it runs.

Citation Information

Patent Citations

  • Generalized face forgery detection method based on domain invariant features

    CN114692741A

  • Living body detection method based on self-supervised domain clustering and domain generalization

    CN116403290A