Forged image detection method based on dual-stream feature extraction and multi-scale feature enhancement

Through dual-stream feature extraction and multi-scale feature enhancement methods, the problem of face forgery detection performance degradation in cross-dataset scenarios is solved, higher robustness and generalization capabilities are achieved, and forgery can be accurately identified in different scenarios. image.

CN118155261BActive Publication Date: 2024-08-30YUNNAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410220144.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-28
Publication Date
2024-08-30
Estimated Expiration
2044-02-28

AI Technical Summary

Technical Problem

Existing face forgery detection methods show significant performance degradation in cross-dataset scenarios and are difficult to generalize. Moreover, traditional methods have limited effectiveness in detecting advanced forgery technologies, making it difficult to distinguish real and fake faces.

Method used

A forgery image detection method based on dual-stream feature extraction and multi-scale feature enhancement is adopted. The input image is processed through EfficientNet-b4, and the dual-stream feature extraction module and multi-scale feature enhancement module are combined to extract and fuse feature information, and the forgery detection module is used to determine the image quality. The forged area is finally input to the classifier for judgment.

Benefits of technology

It improves the robustness and generalization ability of the face forgery detection model, can accurately identify forged images in different scenarios, and improves the accuracy and robustness of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118155261B
    Figure CN118155261B
Patent Text Reader

Abstract

The present invention discloses a forged image detection method based on dual-stream feature extraction and multi-scale feature enhancement, comprising: processing an input face image through EfficientNet‑b4 to obtain a feature map; inputting the feature map into a dual-stream feature extraction module to obtain a fused feature map; inputting the fused feature map into a multi-scale feature enhancement module to obtain a multi-scale enhanced feature map; inputting the multi-scale enhanced feature map into a forged detection module, extracting feature information using an extraction layer of the forged detection module, using the multi-scale detection module to compare the input face feature map with the feature map of a real image during training for overlap, outputting a final feature map with a forged position and confidence, and determining the forged area of ​​the image; inputting the final feature map into a classifier for classification to determine whether the input image is a forged image. The present invention improves the robustness and generalization of a face forgery detection model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer vision, and in particular relates to a forged image detection method based on dual-stream feature extraction and multi-scale feature enhancement. Background Art

[0002] With the rapid development of deep learning generative adversarial networks (GAN) and computer vision technology, face forgery detection technology has become a hot and important research field. Face forgery uses different technologies, such as Deepfake, face synthesis, etc., which can generate realistic fake faces. These technologies increase the fidelity of forged faces, making them difficult to be recognized by the human eye or traditional image processing technology, and have made great progress in face recognition and image processing. This makes the production of forged faces easier and more realistic.

[0003] Due to the significant threat posed by face forgery, traditional feature extraction algorithms and deep learning are crucial for face forgery detection. Traditional feature extraction algorithms extract statistical features and geometric information of images by analyzing image discontinuities, noise features, spectral information, and geometric transformations. Classifiers are then used to determine whether an image has been forged. However, these methods are often limited in their effectiveness in detecting advanced forgery techniques. In contrast, deep learning methods have achieved better results in face forgery detection, using the powerful learning capabilities of deep learning to learn feature information of real and fake images. The difference between real and fake images is identified from deeper features and classified by training models.

[0004] Face forgery detection uses techniques such as computer vision and machine learning to identify subtle differences between real and forged faces by analyzing features, contours, textures, and other information in face images or videos. Many existing methods focus on in-dataset detection, where the training set and test set are created using the same algorithm and contain manipulated images. However, the challenge of face forgery detection is to ensure that the algorithm can effectively distinguish between real and fake faces in different scenarios, rather than being limited to effectively identifying specific types of forged faces. Most previous detection methods are trained and tested with the same algorithm. These methods show high accuracy in specific datasets and focus more on emphasizing computational efficiency without explicitly considering generalization capabilities. When utilizing frequency information, the relationship between different domains is not explicitly considered. Face forgery detection leads to different data distributions under different manipulation techniques, and different forgery algorithms use different network architectures and processing methods, so the generated face images will have different forgery characteristics. When they are applied to cross-dataset scenarios, they usually experience significant performance degradation, which limits wider applications. Different forgery algorithms have different network architectures and processing flows, so face images processed by different algorithms will have different forgery traces. This makes it difficult to generalize CNN models, which are designed to identify specific types of forgery features and are not applicable to other types of forgeries. In addition, the traces of forgery in the image may be obscured by blur, noise or other factors, which makes it difficult for the algorithm to correctly identify and process the image, increasing the difficulty of face forgery detection. In cross-dataset scenarios, due to different operation techniques and different data distributions generated, the detection performance of forged samples by unknown operations will be significantly reduced. This leads to the biggest challenge of face forgery detection being the generalization problem.

[0005] Popescu et al. analyzed the pixel values ​​and structural features in the image to determine whether the image is a fake image. Farid et al. analyzed the artifacts generated by JPEG compression and the inconsistency between the forged area and the surrounding image content, and found that it can effectively reveal traces of image tampering. Fridrich et al. used the joint distribution of adjacent samples to quantify the image noise residual obtained by the high-pass filter, thereby improving the detection performance of the model. These methods have laid a solid foundation for the subsequent research on deep learning face forgery detection technology. Traditional deep learning models include convolutional neural networks (CNN) and generative adversarial networks (GAN). CNN can automatically extract texture, shape, edge and other information from the original image through hierarchical structure and convolution operations. Through the study of some visual contradictions and abnormal features of forged images. It is used to further distinguish between real and forged images. Through the mutual game between the generator and the discriminator, GAN can generate realistic fake images and compare them with real images. Thereby improving the accuracy of detection. In the task of deep face forgery detection, deep learning methods have achieved remarkable results in improving the accuracy and robustness of detection.

[0006] Abnormal features can effectively distinguish the authenticity of faces and play an important role in the face forgery detection task. By analyzing the forgery traces of an image, the subtle differences between real and fake faces can be found. In face forgery, traditional processing methods include using synthetic special effects or using techniques such as mask and photo synthesis. These techniques may introduce unnatural abnormal forgery features in forged faces. Some studies have tried to obtain information from the frequency domain, such as Fourier transform, discrete cosine transform, and steganalysis. However, the relationship and interaction between additional information and forgery traces are rarely considered. Therefore, some studies have adopted texture-based methods to detect fake faces, for example, by extracting local texture features such as Gabor filter response, gray-level co-occurrence matrix, and local binary pattern, which can capture the difference between real and fake faces. Zhao et al. amplified subtle artifacts in shallow features through texture enhancement and improved the accuracy of forgery detection. Recently, some studies have been proposed in multiple attention frameworks. The core idea of ​​these methods is to simultaneously learn multi-scale forgery regions from different sections of the image and promote the fusion of multi-scale features in different regions. Some studies have applied methods based on face anomaly detection to image forensics and face forgery detection. For example, Wu et al. transformed forgery localization into local anomaly detection by calculating the difference between local features and dominant features of the image. Gu et al. proposed to detect forged faces by using the anomalies of global inconsistency of captured adjacent frames and local inconsistency of key areas within the frame. Recent methods are mainly based on face forgery algorithms, which mix the forged area with the original face below, resulting in abnormal pixel statistical properties in a single image. Camera noise can be used as a measure to detect image integrity because camera noise is one of the high-frequency features in the imaging process. Therefore, it can be used to help detect whether the image has been tampered with. Zhao and Chen et al. proposed to segment the deep feature map and calculate the similarity of the segmented blocks. This can more accurately capture detailed information in the image and allow for deeper analysis and processing of local areas. They have achieved good performance under both intra-dataset and cross-dataset evaluation. Summary of the invention

[0007] To solve the above technical problems, the present invention proposes a forged image detection method based on dual-stream feature extraction and multi-scale feature enhancement, which improves the robustness and generalization of the face forgery detection model.

[0008] To achieve the above object, the present invention provides a forged image detection method based on dual-stream feature extraction and multi-scale feature enhancement, comprising:

[0009] The input face image is processed by EfficientNet-b4 to obtain the feature map;

[0010] Inputting the feature map into a dual-stream feature extraction module to obtain a fused feature map;

[0011] Inputting the fused feature map into a multi-scale feature enhancement module to obtain a multi-scale enhanced feature map;

[0012] The multi-scale enhanced feature map is input into a forgery detection module, feature information is extracted using an extraction layer of the forgery detection module, the feature map is compared with a feature map of a real image during training for overlap using the multi-scale detection module, a final feature map with a forged position and confidence is output, and the forged area of ​​the image is determined; the final feature map is input into a classifier for classification to determine whether the input image is a forged image.

[0013] Optionally, the method for obtaining a fused feature map includes: TFEM-M and TFEM-A use the feature map and the feature map as input, add the enhanced feature map and the downsampled feature map to obtain an enhanced feature map, and fuse the enhanced feature maps to obtain a fused feature map; wherein convolution kernels of different sizes, batch normalization layers and attention mechanisms are used to extract richer feature representations; and the TFEM-M and the TFEM-A are two submodules of the dual-stream feature extraction module, respectively.

[0014] Optionally, the implementation method of the TFEM-M module includes:

[0015] The TFEM-M module performs F∈R on the input image processed by S1. C×W×H First, it is processed by a 1×1 convolution and three 3×3 convolution layers, and the feature maps of the four convolution layers are marked as F 1 ∈R 4C×W×H ; The output feature map F is obtained by another 1×1 convolution and batch normalization e , F e Concat to get F E ∈R C×W×H ; Perform convolution and adaptive weighted pooling on F to obtain the downsampled feature map F d ∈R C×W×H ; Subtract the downsampled feature map F from the input feature map F d , and obtain the residual feature map F R ∈R C×W×H , the downsampled feature map F d And the residual feature map F R Combined, we get the enhanced feature map F D ∈R C×W×H ; The TFEM-M module outputs a feature map F that combines the enhancements E And the enhanced downsampled feature map F D The fusion feature map f 1 .

[0016] Optionally, the implementation method of the TFEM-A module includes:

[0017] The TFEM-A module performs convolutional feature extraction and adaptive average pooling on F to obtain F 2 ∈R C×W×H ; Calculate F and F 2 The difference between r ∈R C×W×H ; F r With F 2 Add up to get more information feature map F 3 ∈R C×W×H ; Multiply the feature map with the attention map before the convolution operation to highlight the features of the attention area, and add the attention map A∈R of the same size as F C×W×H Concat with F to get the enhanced feature map F a ∈R C×W×H ; The output of the TFEM-A module is to enhance the feature map F a With F 3 The added fusion feature map f 2 .

[0018] Optionally, the method of inputting the fused feature map into a multi-scale feature enhancement module to obtain the multi-scale enhanced feature map includes:

[0019] The multi-scale feature enhancement module divides the fused feature map into image blocks of equal size along the height and width directions, and reorganizes the expanded tensor using three different combination methods; each combination method corresponds to m∈m 1 , m 2 , m 3 Tensor, where m 1 =1,m 2 =2,m 3 =4; each patch is connected by three different fully connected functions f 1 , f 2 and f 3 Mapped to feature space; f 1 Convert the input feature map to the embedding space, f 2 Map the embedding space of each patch, f 3 The features in the embedding space are transformed and enhanced, the similarity between each image block and other image blocks is calculated, and a weight is assigned to each image block; the weighted image blocks are stitched along the second dimension and reshaped into the shape of the original feature map; the reshaped enhanced feature map is connected to the input feature map element by element to generate the final local enhanced feature map E P .

[0020] Optionally, the forgery detection module includes: a forgery detection module extraction layer and a multi-scale detection module; the forgery detection module uses the forgery detection module extraction layer to extract more representative features from the input features, uses an additional layer with different convolution kernel sizes at the end of the network, and compares the overlap between the input image and the real image during training based on the multi-scale detection module to detect the location of forgery traces and forged areas.

[0021] Optionally, the forgery detection module extraction layer is composed of a Start-Block module and an End-Block module, the Start-Block module and the End-Block module are connected via a residual, and the forgery detection module extraction layer is used to extract features from the input image to obtain a series of feature maps of different scales and levels.

[0022] Optionally, the multi-scale detection module consists of an additional layer and multi-scale anchor points;

[0023] The additional layer includes four different additional layers, the additional layer 1 includes a 7×7 and Relu activation function; the additional layers 2, 3, and 4 include a convolution layer, a Relu activation function, and a BN layer, and the sizes of the convolutions are 5×5, 3×3, and 1×1, respectively;

[0024] The multi-scale anchor points define a set of anchor frames of different scales and aspect ratios, and the anchor frames are placed at different positions on the feature map; the anchor frames are arranged in sequence at multiple positions on the feature map using a sliding window method; the anchor frames generate multiple candidate regions of different positions and scales in the feature map; during the training phase, the detector uses the anchor frames to match the features of real face images; the anchor frames are matched with the image according to the degree of overlap to determine the forged area.

[0025] Technical effects of the present invention:

[0026] (1) The present invention proposes an end-to-end face forgery detection method, which can accurately identify whether an input face image has been forged by passing it through MF-Net.

[0027] (2) The present invention designs a dual-stream feature extraction module to fuse the enhanced feature information extracted from different regions, making the input images easier to distinguish in terms of feature representation.

[0028] (3) The present invention designs a multi-scale feature enhancement module to obtain enhanced local information, thereby paying more attention to the information related to the current sub-region and improving the accuracy and robustness of detection.

[0029] (4) Inspired by the target detection algorithm, the present invention designs a forgery detection module, which calculates the overlap between the features of the input image and the real image during the training phase to determine the forged area of ​​the image. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0031] Figure 1 A schematic diagram of a process of a forged image detection method based on dual-stream feature extraction and multi-scale feature enhancement according to an embodiment of the present invention;

[0032] Figure 2 A framework diagram of a face forgery detection method based on dual-stream feature extraction and multi-scale feature enhancement according to an embodiment of the present invention;

[0033] Figure 3 This is a structural diagram of a dual-stream feature extraction module TFEM according to an embodiment of the present invention;

[0034] Figure 4 This is a structural diagram of a multi-scale feature enhancement module MFEM according to an embodiment of the present invention;

[0035] Figure 5 This is a structural diagram of a forgery detection module FDM according to an embodiment of the present invention;

[0036] Figure 6 This is a visualization result diagram of Grad-CAM according to an embodiment of the present invention. DETAILED DESCRIPTION

[0037] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0038] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0039] Embodiment 1

[0040] like Figure 1 As shown in FIG. 1 , a flowchart of a forged image detection method based on dual-stream feature extraction and multi-scale feature enhancement is provided in this embodiment. The forged image detection method based on dual-stream feature extraction and multi-scale feature enhancement is shown in FIG. Figure 2 As shown, including:

[0041] S1: Figure 3 As shown, EfficientNet-b4 is used to convert the input face image F into an image of shape 256×256 and extract image features.

[0042] S2: Input the features obtained in S1 into the two-stream feature extraction (TFEM) module.

[0043] S2.1: Get the feature map F through the TFEM-M module e 、F d and D R , F e 、F d and D R The formula is as follows:

[0044]

[0045] Where f and b are the weights and biases of the convolution kernel, and k is the scaling factor

[0046]

[0047] Among them, S is the downsampling scale, (x, y) is F d The pixel coordinates in .

[0048]

[0049] in, is the round down function.

[0050] S2.2: The output F of S2-1 e With F d and F R The final output of TFEM is f 1 =F E +F D , where F E =concat(F e ), F D =F d +F R Through the above operations, the shape of the output feature is made consistent with the shape of the input feature, the detail features of the region of interest are enhanced, and the interference information of irrelevant regions is suppressed, thereby improving the performance of face forgery detection.

[0051] S3: The feature map f obtained in S2 1 Input into the multi-scale feature extraction module (MFEM).

[0052] S3.1: If Figure 4 As shown, f 1Split into blocks of the same size, each block is called a "patch". The expanded patches are reorganized using three different combination methods. Each patch combination method corresponds to m∈m 1 , m 2 , m 3 . Where m 1 =1,m 2 =2,m 3 = 4. Next, each patch is received by three different fully connected functions: f 1 , f 2 and f 3 The formulas for the three fully connected functions are as follows:

[0053]

[0054] where f i Represents three fully connected layers (FC) f 1 , f 2 and f 3 .x i represents three different input combinations, C represents the number of channels, θ i,j,k,C is the weight associated with channel C in the input feature map x. c,i,j is the element of channel C at position (i, j) in the input feature map.

[0055] S3.2: Transpose and reshape the expanded image patch tensor to convert each image patch into a vector representation in the embedding space. Then calculate the similarity between each image patch and other image patches and assign a weight to each image patch. For each image patch, multiply it with the weights of other image patches to get a weighted image patch. The weighted image patches are stitched along the second dimension and reshaped into the shape of the original feature map. For each patch, use f 1 and f 2 Calculate the weight matrix. The weight matrix represents the relationship between the patch and other patches to enhance the information of the image block. The calculation method of the weight matrix is ​​as follows:

[0056]

[0057] Where σ is the Sigmoid activation function, f 1 (x i ) and f 2 (x i ) is the eigenvector obtained by linearly transforming each patch of the input, d is the square root of the eigenvector dimension, and ⊙ represents matrix multiplication.

[0058] S3.3: Then use f 3Transform each patch. Multiply the weight matrix by the transformed patch to enhance the representativeness of each patch and obtain the enhanced E p , the formula is as follows:

[0059] E p =weight⊙f 3 (x i )

[0060] where ⊙ represents the element-wise dot product.

[0061] S3.4: Finally, the enhanced feature map is concatenated with the input feature map to generate the final local enhanced feature map E p , the formula is as follows:

[0062]

[0063] Where x is the feature map of the original input. MFEM can better capture the detailed features in the face image and emphasize the important local features through weighted fusion. It can improve the ability of the face forgery detection model to distinguish between real and fake faces.

[0064] S4: Input the feature map obtained in S3 into the Forgery Detection Module (FDM).

[0065] S4.1: If Figure 5 As shown in Figure 1, the extraction layer EL in FDM includes a Start-Block module and an End-Block module. Both the Start-Block module and the End-Block module have residual connections, which helps to retain important information during feature extraction. The Start-Block module generates a fused output O by adding the input features to the enhanced features. S , improves the ability to identify and express image features, and its calculation formula is as follows:

[0066]

[0067] Where x represents the input feature. σ is the Sigmoid activation function. N, K are the number of convolutions in the first and second layers, α i is the weight coefficient of the residual block, W i is the weight of the i-th layer of the residual block. ij is the weight coefficient of the jth convolution in the i-th residual block, W ii is the weight of the jth convolution in the i-th residual block, β i is the bias of the i-th residual block, β 2 is the total bias, D(x) is the downsampling, and ⊙ is the element-by-element multiplication.

[0068] S4.2: The End-Block module contains two convolutional layers, a Relu operation and a downsampling operation. The first convolutional layer and Relu can extract and enhance feature information, the second convolutional layer can further extract features, and the downsampling operation improves the computational efficiency and sensory field of the model by reducing the size of the feature map. The output is O E The calculation formula is as follows:

[0069]

[0070] where γ i is the weight coefficient of the residual block, δ ij is the weight coefficient of the jth convolution in the i-th residual block.

[0071] S4.3: MDM uses MA to detect fake regions. During the training phase, the detector uses these anchor boxes to match the real face image features. The anchor boxes are usually matched to the image based on the degree of overlap. If the anchor box has a high overlap with the real face image, the anchor box is marked as positive. This indicates that the input image is closer to the real face image. If there is not a high enough overlap, it is marked as negative. This indicates that the input image is closer to the fake face image. The output of MDM O M The formula is as follows:

[0072]

[0073] Where σ is the Sigmoid activation function, N is the number of forged region detection blocks in MDM, and α i is the weight calculated by the attention mechanism, f is the nonlinear activation function, W is the weight matrix, C i is the confidence of the i-th MDM, b 0 is the bias term of MDM, and b is the bias term of FDM.

[0074] S4.4: Additional layers with different convolution kernel sizes (7×7, 5×5, 3×3, 1×1) are then used at the end of the network. As the number of layers increases, the size of the feature map decreases. It can enhance the model's perception of forgery traces. During the training phase, MA is placed after the first three layers to detect forged areas on fake images. FDM improves the performance of face forgery detection through multi-scale feature extraction and forgery trace detection, especially for targets of different scales. This multi-scale processing helps the model better adapt to different types of face forgery methods and improves the accuracy and robustness of face forgery detection.

[0075] S5: Put the output obtained in S4 into the classifier, and finally the classifier determines whether the input face image is a forged image.

[0076] S6: Analyze the effectiveness of the face forgery detection method by comparing multiple objective evaluation indicators with the heat map (Grad-CAM).

[0077] like Figure 6 As shown in the figure, the Grad-CAM visualization effect diagram of the method of the present invention is shown, where the first column of each data set is the original forged image of the data set, and the second column is the Grad-CAM visualization effect diagram after our method MF-Net. Figure 6 It can be seen that the present invention can accurately identify the forged area of ​​the forged image.

[0078] In order to better analyze and compare the results of the face forgery detection method, the present invention uses a variety of image quality evaluation indicators (ACC and AUC) to objectively evaluate the forged image detection method. As shown in Table 7, the detection comparison results of the method of the present invention and other algorithms on the FF++ (c23), FF++ (c40) and WildDeepfake datasets. It can be seen from Table 7 that the method of the present invention can better detect forged face images, and the highest detection accuracy is achieved in the dataset. As can be seen from Table 8, the average value of the evaluation index in the dataset and the average value of the generalization across datasets of the method of the present invention and other methods have reached the optimal level. This is because our MF-Net method can extract rich features to better distinguish real images from forged images. In short, the method of the present invention is superior to the comparison algorithm in both visual effects and objective evaluation indicators.

[0079] Table 7

[0080]

[0081] Table 8

[0082]

[0083]

[0084] As shown in Tables 9 and 10, the comparison results of the method of the present invention and other face forgery detection algorithms in cross-datasets are shown. It can be seen from Tables 9 and 10 that the face forgery detection method of the present invention also achieves a high detection accuracy in cross-dataset detection and obtains the best result. It can be seen from Tables 9 and 10 that the method of the present invention is superior to other methods, which further illustrates the effectiveness of the MF-Net method proposed in the present invention.

[0085] Table 9

[0086]

[0087]

[0088] Table 10

[0089]

[0090] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A forged image detection method based on dual-stream feature extraction and multi-scale feature enhancement, characterized in that: The following steps are involved: The input face image is processed by EfficientNet-b4 to obtain the feature map; The feature map is input into a dual-stream feature extraction module to obtain a fused feature map; specifically, TFEM-M and TFEM-A use the feature map and the feature map as input, add the enhanced feature map and the downsampled feature map to obtain an enhanced feature map, and fuse the enhanced feature maps to obtain a fused feature map; wherein convolution kernels of different sizes, batch normalization layers and attention mechanisms are used to extract richer feature representations; the TFEM-M and the TFEM-A are two submodules of the dual-stream feature extraction module respectively; The implementation method of the TFEM-M module includes: the TFEM-M module processes F∈R of the input image processed by S1 C ×W×H First, it is processed by a 1×1 convolution and three 3×3 convolution layers, and the feature maps of the four convolution layers are marked as F1∈R 4C×W×H ; The output feature map F is obtained by another 1×1 convolution and batch normalization e , F e Concat to get F E ∈R C×W×H ; Perform convolution and adaptive weighted pooling on F to obtain the downsampled feature map F d ∈R C×W×H ; Subtract the downsampled feature map F from the input feature map F d , and obtain the residual feature map F R ∈R C×W×H , the downsampled feature map F d and the residual feature map F R Combined, we get the enhanced feature map F D ∈R C×W×H ; The TFEM-M module outputs a feature map F that combines the enhancements E and the enhanced downsampled feature map F D The fusion feature map f1; The implementation method of the TFEM-A module includes: The TFEM-A module performs convolutional feature extraction and adaptive average pooling on F to obtain F2∈R C×W×H ; Calculate the difference between F and F2 to obtain F r ∈R C×W×H ; F r Add to F2 to get more informative feature map F3∈R C×W×H ; Multiply the feature map with the attention map before the convolution operation to highlight the features of the attention area, and add the attention map A∈R of the same size as F C×W×H Concat with F to get the enhanced feature map F a ∈R C×W×H ; The output of the TFEM-A module is to enhance the feature map F a The fused feature map f2 added with F3; Inputting the fused feature map into a multi-scale feature enhancement module to obtain a multi-scale enhanced feature map; The multi-scale enhanced feature map is input into a forgery detection module, feature information is extracted using an extraction layer of the forgery detection module, the feature map is compared with a feature map of a real image during training for overlap using the multi-scale detection module, a final feature map with a forged position and confidence is output, and the forged area of ​​the image is determined; the final feature map is input into a classifier for classification to determine whether the input image is a forged image.

2. The forged image detection method based on dual-stream feature extraction and multi-scale feature enhancement as claimed in claim 1, characterized in that: The method of inputting the fused feature map into a multi-scale feature enhancement module to obtain a multi-scale enhanced feature map includes: The multi-scale feature enhancement module divides the fused feature map into image blocks of equal size along the height and width directions, and reorganizes the expanded tensor using three different combination methods; each combination method corresponds to m∈m1,m2,m3 tensors, where m1=1,m2=2,m3=4; each patch is mapped to the feature space by three different fully connected functions f1,f2 and f3; f1 converts the input feature map into an embedding space, f2 maps the embedding space of each patch, and f3 transforms and enhances the features in the embedding space, calculates the similarity between each image block and other image blocks, and assigns a weight to each image block; the weighted image blocks are stitched along the second dimension and reshaped into the shape of the original feature map; the reshaped enhanced feature map is connected element-wise with the input feature map to generate the final local enhanced feature map E p .

3. The forged image detection method based on dual-stream feature extraction and multi-scale feature enhancement as claimed in claim 1, characterized in that: The forgery detection module includes: a forgery detection module extraction layer and a multi-scale detection module; the forgery detection module uses the forgery detection module extraction layer to extract more representative features from input features, uses additional layers with different convolution kernel sizes at the end of the network, and compares the overlap between the input image and the real image during training based on the multi-scale detection module to detect the location of forgery traces and forgery areas.

4. The forged image detection method based on dual-stream feature extraction and multi-scale feature enhancement as claimed in claim 3, characterized in that: The forgery detection module extraction layer is composed of a Start-Block module and an End-Block module, and the Start-Block module and the End-Block module are connected through a residual. The forgery detection module extraction layer is used to extract features from the input image and obtain a series of feature maps of different scales and levels.

5. The forged image detection method based on dual-stream feature extraction and multi-scale feature enhancement as claimed in claim 3, characterized in that: The multi-scale detection module consists of an additional layer and multi-scale anchor points; The additional layer includes four different additional layers, the additional layer 1 includes a 7×7 and Relu activation function; the additional layers 2, 3, and 4 include a convolution layer, a Relu activation function, and a BN layer, and the sizes of the convolutions are 5×5, 3×3, and 1×1, respectively; The multi-scale anchor points define a set of anchor frames of different scales and aspect ratios, and the anchor frames are placed at different positions on the feature map; the anchor frames are arranged in sequence at multiple positions on the feature map using a sliding window method; the anchor frames generate multiple candidate regions of different positions and scales in the feature map; during the training phase, the detector uses the anchor frames to match the features of real face images; the anchor frames are matched with the image according to the degree of overlap to determine the forged area.

Citation Information

Patent Citations

  • Double-flow network image forgery detection method and system based on image block feature extraction

    CN113361474A

  • Face depth forgery detection method and system based on multi-modal artifacts

    CN115984917A