Deepfake image detection method, apparatus, device and medium
By performing diffusion noise addition and inverse denoising on images, combined with residual analysis and deep convolutional networks, the problem of low accuracy in forgery detection of images generated by diffusion models is solved, and efficient forgery recognition and detection of images is achieved.
Patent Information
- Application Number
- CN202510844800.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-06-23
AI Technical Summary
Existing image forgery detection methods have low accuracy when dealing with images generated by diffusion models, making it difficult to effectively identify and prevent highly realistic forgeries. In particular, the detection accuracy drops significantly in real business environments, failing to meet security requirements.
By acquiring deep image features of the image to be detected, diffusion noise addition and inverse denoising are performed. After reconstructing the detected image, difference analysis is performed to extract the image fusion features of the residual image. A deep convolutional network is used for forgery analysis. Combined with multi-scale fusion strategy and weighted cross-entropy, the generalization performance and robustness of the model are enhanced.
It improves the accuracy of image forgery detection, accurately identifies forgery traces and tampering behaviors in images, enhances the robustness and generalization ability of the model, and is applicable to forgery detection in the fields of healthcare and fintech.
Smart Images

Figure CN120746983B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image detection, and in particular to a deep fake image detection method, device, equipment and medium. BACKGROUND
[0002] In recent years, with the rapid development of deep learning technology, artificial intelligence has made breakthrough progress in the field of image generation. Among them, the generative adversarial network was the mainstream technology and was widely used in tasks such as synthesizing realistic human face images, image inpainting and style transfer. However, in the past two years, diffusion models have rapidly risen, and their performance in image clarity, structural rationality and semantic consistency has far exceeded traditional GAN methods. Although the academic and industrial circles have proposed various AI synthetic image detection methods, mainly for identifying and classifying GAN-generated images, such as using frequency domain feature analysis, local noise modeling and other methods to distinguish fake images, these methods generally encounter performance bottlenecks when facing diffusion model-generated images.
[0003] In the field of medical health, diffusion models can be used to synthesize high-quality medical images such as MRI, CT or X-ray images to assist in training diagnostic models, achieve data augmentation and protect privacy. However, if this technology is misused, it may lead to fake medical images flowing into clinical systems, thereby misleading doctors' judgments, and even being used to tamper with medical records or commit insurance fraud. Since diffusion model-generated images are extremely realistic, traditional detection algorithms based on GAN features are difficult to identify the fake traces in these synthetic medical images, greatly increasing the security risks and legal responsibilities faced by the medical system.
[0004] In the field of financial technology business, AI synthetic images are widely used in identity verification, customer simulation, virtual customer service and other scenarios. Diffusion models can generate highly realistic human face images, ID images and even video clips, and once used for identity forgery, fraud account opening or false loan applications, it will pose a great challenge to the risk control system of financial institutions. However, most image forgery detection technologies have a significant decline in accuracy when facing diffusion model-generated images, making it difficult to effectively prevent such "deep fake" attacks, posing a serious threat to financial data security and user trust system.
[0005] In summary, diffusion models and other generation technologies can already synthesize highly natural and coherent video content, making it difficult for traditional detection methods to capture the subtle abnormalities between fake frames. Especially in real business environments, such fake videos often undergo compression, noise addition and other processing, further weakening the discrimination ability of detection algorithms. When faced with multi-source, complex and highly realistic video content, the detection accuracy significantly decreases, making it difficult to meet actual security needs.
[0006] Therefore, there is a problem of low accuracy in the prior art for detecting fake images. SUMMARY
[0007] The application provides a deep fake image detection method, device, equipment and medium, which mainly aims to solve the problem of low accuracy of fake image detection.
[0008] In a first aspect, to achieve the above object, the application provides a deep fake image detection method, comprising:
[0009] obtaining a to-be-detected image, extracting deep image features of the to-be-detected image, and diffusing and adding noise to the deep image features to obtain a noisy image feature;
[0010] performing reverse denoising on the noisy image feature to obtain a denoised image feature;
[0011] reconstructing the denoised image feature to obtain a reconstructed detection image;
[0012] subtracting the to-be-detected image from the reconstructed detection image to obtain a residual image, and extracting image fusion features of the residual image;
[0013] performing fake analysis on the reconstructed detection image according to the image fusion features to obtain an image fake probability.
[0014] In a second aspect, the application further provides a deep fake image detection device, comprising:
[0015] a diffusion and noise adding module, configured to obtain a to-be-detected image, extract deep image features of the to-be-detected image, and diffuse and add noise to the deep image features to obtain a noisy image feature;
[0016] a reverse denoising module, configured to perform reverse denoising on the noisy image feature to obtain a denoised image feature;
[0017] an image reconstruction module, configured to reconstruct the denoised image feature to obtain a reconstructed detection image;
[0018] an image subtraction module, configured to subtract the to-be-detected image from the reconstructed detection image to obtain a residual image, and extract image fusion features of the residual image;
[0019] a fake analysis module, configured to perform fake analysis on the reconstructed detection image according to the image fusion features to obtain an image fake probability.
[0020] In a third aspect, the application further provides an electronic device, comprising:
[0021] at least one processor; and
[0022] A memory communicatively connected to the at least one processor; wherein,
[0023] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the deepfake image detection method described above.
[0024] Fourthly, the present invention also provides a computer-readable storage medium storing at least one computer program, which is executed by a processor in an electronic device to implement the deepfake image detection method described above.
[0025] This invention acquires an image to be detected, extracts its deep image features, and performs multi-level convolutional extraction to effectively capture shallow visual information and deep semantic structure, fusing them into richly expressive deep image features. These deep image features are then subjected to diffusion and noise addition to obtain noisy image features. A diffusion and noise addition mechanism is introduced, utilizing noise scheduling parameters to perturb the features at multiple scales. This enhances the model's robustness to input variations while preserving the core semantic information of the image. The noisy image features are then reversed to obtain denoised image features. By introducing a temporal embedding vector, dynamic perception of the diffusion stage is achieved. The combination of downsampling and upsampling paths with residual and attention mechanisms enhances the modeling ability for multi-scale noise information and improves the accuracy of noise prediction. Finally, the denoised image features are reconstructed to obtain a reconstructed detection image. The model sequentially performs deconvolution, resolution restoration, and convolution mapping to effectively restore the spatial structure and visual details of the image. The difference between the image to be detected and the reconstructed detection image is used to obtain a residual image, and image fusion features are extracted from this residual image. Nonlinear assignment enhancement and frequency domain filtering further amplify the salience of forgery traces and local perturbation features, making weak forgery signals more prominent. A deep convolutional network is then used to extract global image features, and a multi-scale fusion strategy is combined to fully integrate local details and overall structural information. Forgery analysis is performed on the reconstructed detection image based on the image fusion features to obtain the image forgery probability. Weighted cross-entropy is used to effectively solve the class imbalance problem, enhancing the model's generalization performance and robustness. The forgery discrimination model can accurately analyze the current image fusion features and accurately output the forgery probability of the reconstructed detection image, effectively improving the accuracy of image forgery detection. Attached Figure Description
[0026] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a schematic diagram of an application environment for a deepfake image detection method according to an embodiment of the present invention;
[0028] Figure 2 This is a flowchart illustrating a deepfake image detection method according to an embodiment of the present invention.
[0029] Figure 3 This is a flowchart illustrating the residual image processing module in a deepfake image detection method according to an embodiment of the present invention.
[0030] Figure 4 This is a schematic diagram of a module of a deepfake image detection device according to an embodiment of the present invention;
[0031] Figure 5 A schematic diagram of an electronic device for implementing a deepfake image detection method according to an embodiment of the present invention;
[0032] Figure 6 This is another schematic diagram of an electronic device that implements a deepfake image detection method according to an embodiment of the present invention.
[0033] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0034] To enable those skilled in the art to better understand the technical solutions of this disclosure, and to fully understand and implement the process of how this disclosure applies technical means to solve technical problems and achieve corresponding technical effects, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, not all embodiments. The embodiments of this disclosure and the various features within them can be combined with each other without conflict, and the resulting technical solutions are all within the protection scope of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort should fall within the protection scope of this disclosure.
[0035] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0036] This application provides a method for detecting deepfake images. The execution entity of this method includes, but is not limited to, at least one electronic device that can be configured to execute the device provided in this application, such as a server or a terminal. In other words, the deepfake image detection method can be executed by software or hardware installed on a terminal device or a server device. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0037] This invention provides a method for detecting deepfake images, which can be applied to applications such as... Figure 1In this application environment, the client communicates with the server via a network. The server can acquire the image to be detected through the client, extract deep image features from the image, and perform multi-level convolution extraction on the image to be detected. This effectively captures shallow visual information and deep semantic structure, fusing them into deep image features with rich expressive power. The deep image features are then diffused and denoised to obtain noisy image features. A diffusion and denoising mechanism is introduced, using noise scheduling parameters to perturb the features at multiple scales. This enhances the model's robustness to input changes while preserving the core semantic information of the image. The noisy image features are then reversed and denoised to obtain denoised image features. By introducing a temporal embedding vector, dynamic perception of the diffusion stage is achieved. The combination of downsampling and upsampling paths with residual and attention mechanisms enhances the modeling ability for multi-scale noise information and improves the accuracy of noise prediction. The denoised image features are then reconstructed to obtain the reconstructed detection image. Finally, the denoised image features are deconvolved sequentially. The process of multiplication, resolution restoration, and convolutional mapping effectively restores the spatial structure and visual details of an image. The difference between the image to be detected and the reconstructed detection image is used to obtain a residual image. Image fusion features of the residual image are extracted, and nonlinear assignment enhancement and frequency domain filtering further amplify the salience of forgery traces and local perturbation features, making weak forgery signals more prominent. A deep convolutional network is then used to extract global image features, and a multi-scale fusion strategy is combined to fully integrate local details and overall structural information. Forgery analysis is performed on the reconstructed detection image based on the image fusion features to obtain the image forgery probability. Weighted cross-entropy is used to effectively solve the class imbalance problem, enhancing the model's generalization performance and robustness. The forgery discrimination model can accurately analyze the current image fusion features and accurately output the forgery probability of the reconstructed detection image, effectively improving the accuracy of image forgery detection. Finally, the image forgery probability is fed back to the user client. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will be described in detail below through specific embodiments.
[0038] The following is an explanation of the present invention. The present invention precisely extracts the subtle difference regions in the original image that were not restored by the reconstruction network by aligning the image to be detected with the reconstructed detection image and subtracting them. Then, nonlinear assignment enhancement and frequency domain filtering are used to further amplify the salience of forgery traces and local perturbation features, making weak forgery signals more prominent. Then, a deep convolutional network is used to extract global image features, and a multi-scale fusion strategy is combined to fully integrate local details and overall structural information, effectively enhancing the model's perception and robustness in distinguishing different types of forgery behavior (such as splicing, tampering, generation and synthesis, etc.), accurately outputting the forgery probability of the reconstructed detection image, thereby improving the success rate of forgery detection.
[0039] Reference Figure 2 The diagram shown is a flowchart illustrating a deepfake image detection method according to an embodiment of the present invention. In this embodiment, the deepfake image detection method includes:
[0040] S1. Obtain the image to be detected, extract the deep image features of the image to be detected, and perform diffusion noise addition on the deep image features to obtain noisy image features.
[0041] In this embodiment of the invention, the image to be detected is input into the encoder. The encoder extracts the high-dimensional deep feature representation of the image through multi-layer convolution operation. The deep image features are sent to the diffusion noise module. Based on the preset noise scheduling parameters, standard Gaussian noise is gradually injected into the deep image features in discrete time steps to simulate the forward perturbation process of the stable diffusion model. Finally, the noise-added image features at the corresponding time step are generated for subsequent inverse denoising and reconstruction.
[0042] In specific healthcare scenarios, it can be used for forgery detection of medical images, such as analyzing X-ray films and CT images. First, deep diagnostic features of the image are extracted. Noise is added to simulate abnormal interference or forgery traces. Then, reconstruction and residual analysis are used to capture potential forgery or tampering information, thereby assisting doctors in identifying suspicious images and improving diagnostic security and reliability.
[0043] In specific fintech scenarios, it can be applied to verify the authenticity of image-based financial documents such as bills, identity documents, and scanned copies of contracts. By extracting the structured features of the image and learning to reconstruct its true appearance under noise interference, it can identify abnormal differences caused by forgery, modification, or synthesis, thus assisting financial risk control systems in identifying image fraud and ensuring the credibility of transactions and identity verification.
[0044] In this embodiment of the invention, acquiring the image to be detected and extracting the deep image features of the image to be detected includes:
[0045] The image to be detected is normalized to obtain a normalized image;
[0046] Perform a first convolution on the normalized image to obtain shallow visual features;
[0047] A second convolution is performed on the normalized image to obtain the mid-level semantic features;
[0048] A third convolution layer is applied to the normalized image to obtain deep structural features;
[0049] The shallow visual features, the mid-level semantic features, and the deep structural features are summarized into deep image features.
[0050] In detail, by performing a linear transformation on the pixel values of the image, the transformed pixel values are mapped to a preset numerical range (such as [0,1] or [-1,1]) to eliminate the influence caused by differences in image brightness, contrast, etc., thereby obtaining a normalized image, which provides a unified data foundation for subsequent image analysis and feature extraction.
[0051] The normalized image is subjected to multiple convolution operations in sequence: First, the shallow visual features of the image, such as low-level information such as edges and textures, are extracted through the first convolution layer; then, the middle semantic features are extracted through the second convolution layer to capture the local structure and patterns in the image; and finally, the deep structural features are obtained through the third convolution layer to extract the high-level semantic information of the image.
[0052] Furthermore, the normalized image is input into the first convolutional network, where local region features of the image are extracted by sliding convolutional kernels of a set size (such as 3×3 or 5×5). Combined with stride and padding parameters, a feature map containing shallow visual features such as edges and textures is generated. Then, it is input into the second convolutional layer, where more convolutional kernels with deeper receptive fields are used for feature extraction, refining mid-level semantic features such as object contours and shapes. The ReLU activation function and pooling operations (such as max pooling) can be combined to enhance non-linear expression and dimensionality reduction. Subsequently, it is input into the third convolutional layer, where a more complex convolutional kernel structure is used to extract deep structural features that span regions and have a high degree of abstraction, such as target component relationships or global semantic information.
[0053] The shallow visual features, mid-level semantic features, and deep structural features extracted by the three convolutional layers are combined by splicing or weighted fusion to form a multi-scale, rich deep image feature representation, providing comprehensive feature support for subsequent tasks.
[0054] In this embodiment of the invention, the step of diffusing and adding noise to the deep image features to obtain noisy image features includes:
[0055] Obtain the diffusion noise scheduling parameters for each of the deep image features;
[0056] Based on the aforementioned diffusion noise scheduling parameters, diffusion noise is applied to each corresponding deep image feature to obtain several noise-added features;
[0057] The noise-added features are fused to obtain noise-added image features.
[0058] In detail, the diffusion noise scheduling parameters are used to control the noise intensity and time step during the diffusion process. Based on these parameters, Gaussian noise is progressively injected into the corresponding deep image features to simulate the diffusion process and achieve a smooth transition of features from a clear state to a random state. This noise-adding operation yields a set of noisy features with different levels of noise perturbation, which enhances the model's robustness to feature perturbations or provides initial conditions for subsequent diffusion-based reconstruction and denoising generation processes.
[0059] By using methods such as deconvolution (transposed convolution), bilinear interpolation, or nearest neighbor interpolation, the noisy features at different scales are restored to a uniform spatial resolution. The noisy features at each level after upsampling are then fused by channel splicing or weighted summation to fully integrate semantic information and structural features at different time steps and noise levels, thereby obtaining multi-scale and multi-level noisy image features.
[0060] By performing multi-level convolutional extraction on the image to be detected, shallow visual information and deep semantic structure are effectively captured and fused into deep image features with rich expressive power. Furthermore, a diffusion noise mechanism is introduced, which uses noise scheduling parameters to perturb the features at multiple scales. This enhances the model's robustness to input changes while preserving the core semantic information of the image. Through upsampling and fusion of the noise features, feature representations under different noise intensities and scales are effectively integrated. The resulting noise-added image features have both strong recognition capabilities and adaptability to input ambiguity or uncertainty, providing a more stable, robust, and semantically complete feature foundation for subsequent tasks such as denoising reconstruction, anomaly detection, or generative modeling.
[0061] S2. Perform reverse denoising on the noisy image features to obtain denoised image features.
[0062] In this embodiment of the invention, the noisy image features are input into the diffusion reconstruction module. By introducing time step information and combining it with the U-Net structure, noise disturbances are gradually removed in multiple iteration steps. This simulates the reverse diffusion process from random noise to the original image features, and finally recovers the denoised image features that approximate the semantics of the original image, providing a foundation for high-quality image reconstruction and forgery detection.
[0063] In specific healthcare scenarios, by inputting the noisy image features into the diffusion reconstruction module, incorporating time-step information, and combining it with a U-Net structure, noise interference in the image can be gradually removed, restoring clearer image features that more closely resemble the actual anatomical structures. This denoising and reconstruction capability provides crucial support for high-quality medical image restoration, assisted diagnosis, and anomaly detection, with significant advantages, especially under low-dose imaging or blurred scanning conditions.
[0064] In specific fintech scenarios, utilizing a diffusion reconstruction module to progressively optimize noisy image features helps to restore more accurate semantics of invoices, certificates, or transaction vouchers, effectively improving recognition accuracy and forgery detection capabilities. This method can enhance the system's sensitivity and discriminatory power against image tampering and forgery in applications such as anti-fraud, remote authentication, and compliance auditing.
[0065] In this embodiment of the invention, the step of performing inverse denoising on the noisy image features to obtain denoised image features includes:
[0066] Obtain a preset time step, perform position encoding on the preset time step, and obtain a time embedding vector;
[0067] The temporal embedding vector is added to the noisy image features to obtain the noisy updated features;
[0068] The noisy updated features are progressively downsampled and compressed to obtain noisy compressed features;
[0069] The noise-compressed features are gradually upsampled and restored to obtain the image noise value at the current time step;
[0070] The image noise value is back-diffused to obtain the image feature value of the previous time step at the current time step;
[0071] The process of returning the image feature value to the image noise value through back-diffusion to obtain the image feature value of the previous time step at the current time step continues until the current time step is a preset value.
[0072] The image feature values are summarized to obtain the denoised image features.
[0073] In detail, a preset time step in the diffusion process is selected, and the position of this time step is encoded using sine and cosine functions to construct a temporal embedding vector. The temporal embedding vector can characterize the diffusion stage of the current feature. This temporal embedding vector is then fused with the corresponding noisy image features, usually by element-wise addition or channel concatenation, to achieve a deep integration of temporal information and image features, thereby obtaining noisy update features with time-series awareness.
[0074] Noise estimation of noisy image features is performed using a UNet network structure based on a hybrid residual convolution and spatial attention. The downsampling path sequentially compresses the feature space and extracts high-level semantics through four levels of residual modules (each level containing two ResNet blocks and a spatial self-attention mechanism). The upsampling path uses four levels of symmetric residual modules, combined with cross-scale skip connections and an attention mechanism, to progressively restore the features to their original resolution. The final output is the image noise value corresponding to the current time step, calculated as follows:
[0075] ∈ θ (Z t ,t)=UNet(Z t ,t)
[0076] Among them, Z t Let t represent the noise feature at step t, where t represents the time step.
[0077] The backdiffusion formula based on the diffusion model fuses image noise values with image features at the current time step to calculate image feature values from the previous time step. These image feature values are then fed back to the backdiffusion module as input, and the above steps are repeated iteratively forward until the time step decreases to a preset initial value (e.g., t=0). As the time step decreases, noise components in the image are gradually removed, and image features gradually become clearer. Finally, the image feature values generated at all time steps are aggregated, or the feature from the final step is selected as the result, yielding complete denoised image features for use by subsequent image reconstruction or discrimination modules. The calculation formula is shown below:
[0078]
[0079] α t =1-β t
[0080] Where, α t Z represents the noise preservation factor. t Zt represents the noise-adding feature at step t, and Z0 represents the deep image feature. Represents the cumulative retention factor from step 1 to step t, ∈ θ (Z t ,t) represents the image noise value, β t Let ε represent the diffusion noise scheduling parameters at step t, t represent the random noise, and σ represent the time step. t This represents the sampling control factor.
[0081] By introducing temporal embedding vectors, dynamic perception of the diffusion stage is achieved, enabling the model to adaptively adjust the denoising strategy according to the feature state at different time steps. The combination of downsampling and upsampling paths with residual and attention mechanisms enhances the modeling ability of multi-scale noise information and improves the accuracy of noise prediction. The backdiffusion iterative mechanism gradually restores image features, avoiding information loss caused by one-time restoration, so that the final denoised image features have higher structural fidelity and semantic consistency, providing a more accurate feature foundation for subsequent image reconstruction, recognition or forgery detection.
[0082] S3. Reconstruct the features of the denoised image to obtain the reconstructed detection image.
[0083] In this embodiment of the invention, the denoised image features are input into the decoder module, and the low-dimensional features are gradually restored to a high-resolution image through multi-layer upsampling and deconvolution operations. Finally, a reconstructed detection image with the same structure as the original image is generated, providing a basis for comparison for subsequent residual analysis and forgery identification.
[0084] In specific healthcare scenarios, by inputting the denoised image features into the decoder module, high-resolution medical images are gradually recovered, and the reconstructed results are highly consistent with the original image structure. This provides a precise foundation for subsequent lesion detection and image comparison analysis, improving the accuracy of disease diagnosis and assisting doctors in decision-making.
[0085] In specific fintech scenarios, the decoder module restores the denoised features into clear, high-resolution images of tickets or certificates, ensuring that the reconstructed image remains consistent with the original content. This technology provides a reliable basis for subsequent residual comparison and forgery identification, enhancing the effectiveness of financial security risk control.
[0086] In this embodiment of the invention, reconstructing the denoised image features to obtain a reconstructed detection image includes:
[0087] The denoised image features are deconvolved to obtain the image restoration features;
[0088] The image restoration features are then subjected to resolution restoration to obtain a high-resolution image;
[0089] The high-resolution image is convolved, and the convolved high-resolution image is mapped to the reconstructed detection image.
[0090] In detail, the denoised image features are input into the deconvolution module, and the spatial resolution of the features is gradually improved by using the deconvolution (transposed convolution) operation to achieve the mapping from compressed features to the original image size. The deconvolution layer upsamples the feature map through the learned convolution kernel, while preserving semantic structural information and local details.
[0091] Upsampling operations (such as bilinear interpolation and super-resolution convolution) are used to gradually increase the spatial size of the feature map, restoring it to the target high resolution. This process can be combined with multi-scale fusion or attention mechanisms to enhance the preservation of image edges and texture details.
[0092] The high-resolution image is input into the convolutional mapping module, and a set of convolutional layers are used to further extract features and correct details of the image, enhance the edge structure and local texture information of the image, and use the mapping layer (such as 1×1 convolution) to convert the convolved high-resolution image into an output format with the same dimensions as the original image, so as to achieve accurate mapping from the feature domain to the image domain, and finally generate a reconstructed detection image, providing a complete and clear visual foundation for subsequent image comparison analysis or forgery identification.
[0093] By sequentially performing deconvolution, resolution restoration, and convolution mapping on the denoised image features, the spatial structure and visual details of the image can be effectively restored. The deconvolution operation progressively increases the feature dimension, preserving semantic information while restoring the image contour. The resolution restoration process enhances image clarity and detail levels. Finally, the convolution mapping achieves a precise conversion of features to the image, ensuring that the output image is highly consistent with the real image in terms of structure and texture. This not only improves the image visualization quality but also provides a more stable and reliable image input foundation for subsequent detection tasks.
[0094] S4. Subtract the image to be detected from the reconstructed detection image to obtain a residual image, and extract the image fusion features of the residual image.
[0095] In this embodiment of the invention, the difference between the image to be detected and the reconstructed detection image is calculated to obtain a residual image, which reflects the subtle differences between the two. Feature information related to forgery is extracted from the residual image in order to accurately capture anomalies or tampering traces in the image and provide key evidence for forgery detection.
[0096] In specific healthcare scenarios, such as medical image processing, residual images are obtained by performing difference analysis between the original scanned image and the denoised image reconstructed using a diffusion model. These residual images reveal potential abnormal signals or lesion areas within the image. Extracting image fusion features from these residuals can assist in the automatic identification of artifacts or abnormal structures, thereby improving the accuracy of lesion detection and the level of image quality control.
[0097] In specific fintech scenarios, such as anti-counterfeiting detection of financial instruments and certificates, residual images are generated by comparing the image to be detected with a standard image restored by a reconstruction module. These residual images reveal traces of tampering or forgery. Based on the forgery features extracted from the residual images, counterfeit text, seals, or patterns can be effectively identified, enhancing the financial risk control system's ability to identify and prevent fraudulent activities.
[0098] Figure 3 This is a flowchart illustrating the residual image processing module in a deepfake image detection method according to an embodiment of the present invention.
[0099] In this embodiment of the invention, the step of subtracting the image to be detected from the reconstructed detection image to obtain a residual image, and extracting the image fusion features of the residual image, includes:
[0100] Align the image to be detected with the reconstructed detection image to obtain an aligned image group;
[0101] The residual image is obtained by subtracting the pixels of the image to be detected and the reconstructed detection image within the aligned image group;
[0102] The residual image is enhanced by nonlinear assignment to obtain an enhanced residual image;
[0103] The residual enhancement image is subjected to frequency domain filtering to obtain the residual transform image;
[0104] Deep convolution is performed on the residual transformed image to obtain global image features;
[0105] Multi-scale fusion is performed on the global image features to obtain image fusion features.
[0106] In detail, spatial alignment is performed on the image to be detected and the reconstructed detection image to ensure consistency in size, number of channels, and pixel arrangement between the two images, forming an aligned image group. In the aligned image group, the pixels at corresponding positions are subtracted one by one to calculate the difference between the image to be detected and the reconstructed detection image, generating a residual image. This image intuitively reflects the areas in the original image that were not effectively reconstructed, highlighting potential tampering traces or structural anomalies, and providing a foundation for subsequent forgery feature extraction.
[0107] The residual image is input into the nonlinear assignment enhancement module, which uses activation functions (such as hyperbolic tangent, sigmoid, or ReLU) to perform nonlinear mapping on the residual values. This amplifies subtle differences and suppresses background noise, highlighting the local mutation features of potential forgery regions. This helps improve the model's ability to perceive fine-grained forgery traces and provides a clearer and more discriminative input image for subsequent forgery feature extraction. The calculation formula is shown below:
[0108] R'=tanh(λ·R)
[0109] Where R represents the residual image, λ represents the adjustment coefficient, and R' represents the residual enhancement image.
[0110] The residual enhanced image is transformed from the spatial domain to the frequency domain using Fourier transform (such as the two-dimensional Fast Fourier Transform, FFT). Different frequency components are extracted from the image, and a high-pass filter is applied to preserve high-frequency information (such as abrupt edge changes and detail anomalies) while suppressing low-frequency background interference, resulting in a feature map with a more prominent frequency response. The processed frequency domain image is then restored to the spatial domain using inverse Fourier transform to generate a residual transformed image. This effectively enhances the structural details and texture anomalies of potential forgery regions in the image, providing more discriminative information for subsequent forgery feature extraction.
[0111] The residual transformed image is input into a deep convolutional neural network, and global image features are extracted through multiple convolutional operations: low-level convolutions capture local textures and edge anomalies, mid-level convolutions extract information on regional structural inconsistencies, and high-level convolutions aggregate long-distance dependencies and semantic forgery patterns to form a feature representation with global perception capabilities. The global image features extracted from different levels are fused at multiple scales, and feature concatenation, weighted summation, or attention mechanisms can be used to integrate feature information to generate the final image fusion feature, which is used to comprehensively characterize forgery traces and tampered areas in the image.
[0112] By aligning the image to be detected with the reconstructed image and subtracting them, the subtle difference regions in the original image that were not restored by the reconstruction network are accurately extracted. Then, nonlinear assignment enhancement and frequency domain filtering are used to further amplify the salience of forgery traces and local perturbation features, making weak forgery signals more prominent. Then, a deep convolutional network is used to extract global image features, and a multi-scale fusion strategy is combined to fully integrate local details and overall structural information, effectively enhancing the model's ability to perceive and distinguish different types of forgery behaviors (such as splicing, tampering, generation and synthesis), and providing a strong feature foundation for high-precision forgery detection.
[0113] S5. Perform forgery analysis on the reconstructed detection image based on the image fusion features to obtain the image forgery probability.
[0114] In this embodiment of the invention, based on the extracted image fusion features, an in-depth forgery analysis is performed on the reconstructed detection image. The model analyzes the potential anomalies and tampering traces in the image, and finally calculates and outputs the forgery probability of the image to quantitatively determine whether forgery behavior exists.
[0115] In specific healthcare scenarios, abnormal features extracted from residual images are combined with reconstructed image information for comprehensive analysis. A trained detection model is then used to assess the probability of forgery or human tampering in the image. This process not only identifies artifacts caused by scanning equipment malfunctions or image processing, but also helps to detect potential malicious forgery, thereby ensuring the authenticity of medical image data and the accuracy of diagnosis.
[0116] In specific fintech scenarios, by comparing the extracted image fusion features with the depth of the reconstructed image, a specially designed discriminant model is used to quantify the probability of image tampering. This analysis can accurately identify subtle signs of forgery in documents and certificates, such as text alteration and seal forgery, significantly improving the detection efficiency and response speed of financial risk control systems against counterfeiting, and ensuring the security of transactions and identity verification.
[0117] In this embodiment of the invention, the step of performing forgery analysis on the reconstructed and detected image based on the image fusion features to obtain the image forgery probability includes:
[0118] Obtain the distinguishing labels of historical forgery features and target samples, and analyze the historical forgery features using a preset classification model to obtain the forgery prediction probability;
[0119] A weighted cross-entropy is generated based on the distinguishing label and the forgery prediction probability;
[0120] The classification model is optimized using the weighted cross-entropy to obtain a forgery detection model;
[0121] The image fusion features are analyzed using the forgery discrimination model to obtain the image forgery probability of the reconstructed and detected image.
[0122] In detail, during image forgery detection, historical forgery features and corresponding distinguishing labels are acquired. Historical forgery features are forgery-related features extracted from previous samples using a residual encoder. Distinguishing labels are used to indicate the authenticity of images. These historical forgery features are input into a pre-defined classification model, which has the ability to distinguish between real and forged images. Through multi-dimensional analysis of the input features, the model outputs the forgery prediction probability corresponding to each set of features, used to assess the likelihood that an image is forged, thus providing a basis for subsequent image source tracing or content security judgment.
[0123] Based on the probability of distinguishing between labeled and forged predictions, the weighted cross-entropy loss function is calculated, as shown in the following formula:
[0124]
[0125] Where N represents the total number of target samples, w represents the weight, and y i p represents the distinguishing label of the i-th target sample. i Let represent the predicted forgery probability of the i-th target sample. By assigning different weights to different categories, the class imbalance problem is effectively alleviated. Using weighted cross-entropy as the objective function, the classification model is backpropagated and its parameters are updated. Through iterative optimization, the model's ability to distinguish between real and forged images is improved, ultimately resulting in a high-performance forgery discrimination model that accurately distinguishes between genuine and fake images.
[0126] Using a trained forgery detection model, the fusion features of the input image are analyzed and mapped in depth. Based on the learned discrimination ability, the model classifies and infers the fusion features, and finally outputs the image forgery probability of the reconstructed detection image to evaluate whether there are forgery traces in the image.
[0127] By continuously optimizing the classification model using historical forgery features and distinguishing labels, the model's ability to identify and accurately judge image forgery features has been significantly improved. Weighted cross-entropy is used to effectively address the class imbalance problem, enhancing the model's generalization performance and robustness. The forgery detection model can accurately analyze the current image fusion features and accurately output the forgery probability of the reconstructed image, thereby improving the reliability and success rate of forgery detection.
[0128] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0129] like Figure 4 The diagram shown is a functional block diagram of a deepfake image detection device provided in an embodiment of the present invention.
[0130] This disclosure provides a deepfake image detection device, which corresponds one-to-one with the deepfake image detection method described in the above embodiments. For example... Figure 4 As shown, the deepfake image detection device 100 can be installed in an electronic device. According to its functions, the deepfake image detection device 100 includes a diffusion noise-adding module 101, a reverse noise reduction module 102, an image reconstruction module 103, an image subtraction module 104, and a forgery analysis module 105. Detailed descriptions of each functional module are as follows:
[0131] The diffusion noise module 101 is used to acquire the image to be detected, extract the deep image features of the image to be detected, and perform diffusion noise on the deep image features to obtain noisy image features.
[0132] The reverse denoising module 102 is used to reverse denoise the noisy image features to obtain denoised image features;
[0133] Image reconstruction module 103 is used to reconstruct the features of the denoised image to obtain a reconstructed detection image;
[0134] The image subtraction module 104 is used to subtract the image to be detected from the reconstructed detection image to obtain a residual image, and extract the image fusion features of the residual image;
[0135] The forgery analysis module 105 is used to perform forgery analysis on the reconstructed detection image based on the image fusion features to obtain the image forgery probability.
[0136] In one embodiment, the diffusion noise module 101, when performing the process of acquiring an image to be detected and extracting deep image features from the image to be detected, is used to:
[0137] The image to be detected is normalized to obtain a normalized image;
[0138] Perform a first convolution on the normalized image to obtain shallow visual features;
[0139] A second convolution is performed on the normalized image to obtain the mid-level semantic features;
[0140] A third convolution layer is applied to the normalized image to obtain deep structural features;
[0141] The shallow visual features, the mid-level semantic features, and the deep structural features are summarized into deep image features.
[0142] In one embodiment, when the diffusion noise-adding module 101 performs diffusion noise-adding on the deep image features to obtain noisy image features, it is used to:
[0143] Obtain the diffusion noise scheduling parameters for each of the deep image features;
[0144] Based on the aforementioned diffusion noise scheduling parameters, diffusion noise is applied to each corresponding deep image feature to obtain several noise-added features;
[0145] The noise-added features are fused to obtain noise-added image features.
[0146] In one embodiment, when the inverse denoising module 102 performs inverse denoising on the noisy image features to obtain denoised image features, it is used to:
[0147] Obtain a preset time step, perform position encoding on the preset time step, and obtain a time embedding vector;
[0148] The temporal embedding vector is added to the noisy image features to obtain the noisy updated features;
[0149] The noisy updated features are progressively downsampled and compressed to obtain noisy compressed features;
[0150] The noise-compressed features are gradually upsampled and restored to obtain the image noise value at the current time step;
[0151] The image noise value is back-diffused to obtain the image feature value of the previous time step at the current time step;
[0152] The process of returning the image feature value to the image noise value through back-diffusion to obtain the image feature value of the previous time step at the current time step continues until the current time step is a preset value.
[0153] The image feature values are summarized to obtain the denoised image features.
[0154] In one embodiment, when the image reconstruction module 103 performs reconstruction of the denoised image features to obtain a reconstructed detection image, it is used to:
[0155] The denoised image features are deconvolved to obtain the image restoration features;
[0156] The image restoration features are then subjected to resolution restoration to obtain a high-resolution image;
[0157] The high-resolution image is convolved, and the convolved high-resolution image is mapped to the reconstructed detection image.
[0158] In one embodiment, when the image subtraction module 104 performs the subtraction of the image to be detected and the reconstructed detection image to obtain a residual image, and extracts the image fusion features of the residual image, it is used to:
[0159] Align the image to be detected with the reconstructed detection image to obtain an aligned image group;
[0160] The residual image is obtained by subtracting the pixels of the image to be detected and the reconstructed detection image within the aligned image group;
[0161] The residual image is enhanced by nonlinear assignment to obtain an enhanced residual image;
[0162] The residual enhancement image is subjected to frequency domain filtering to obtain the residual transform image;
[0163] Deep convolution is performed on the residual transformed image to obtain global image features;
[0164] Multi-scale fusion is performed on the global image features to obtain image fusion features.
[0165] In one embodiment, when the forgery analysis module 105 performs forgery analysis on the reconstructed detection image based on the image fusion features to obtain the image forgery probability, it is used to:
[0166] Obtain the distinguishing labels of historical forgery features and target samples, and analyze the historical forgery features using a preset classification model to obtain the forgery prediction probability;
[0167] A weighted cross-entropy is generated based on the distinguishing label and the forgery prediction probability;
[0168] The classification model is optimized using the weighted cross-entropy to obtain a forgery detection model;
[0169] The image fusion features are analyzed using the forgery discrimination model to obtain the image forgery probability of the reconstructed and detected image.
[0170] In this invention, a deepfake image detection device is first developed by acquiring an image to be detected, extracting its deep image features, and performing multi-level convolution extraction on the image to effectively capture shallow visual information and deep semantic structure, fusing them into deep image features with rich expressive power. These deep image features are then subjected to diffusion and noise addition to obtain noisy image features. A diffusion and noise addition mechanism is introduced, utilizing noise scheduling parameters to perturb the features at multiple scales, enhancing the model's robustness to input changes while preserving the core semantic information of the image. The noisy image features are then reversed to obtain denoised image features. By introducing a temporal embedding vector, dynamic perception of the diffusion stage is achieved. The combination of downsampling and upsampling paths with residual and attention mechanisms enhances the modeling ability for multi-scale noise information and improves the accuracy of noise prediction. Finally, the denoised image features are reconstructed to obtain reconstructed detection features. The image is processed by sequentially performing deconvolution, resolution restoration, and convolution mapping on the denoised image features, which effectively restores the spatial structure and visual details of the image. Then, the difference between the image to be detected and the reconstructed detection image is obtained to obtain a residual image, and the image fusion features of the residual image are extracted. Nonlinear assignment enhancement and frequency domain filtering are used to further amplify the salience of forgery traces and local perturbation features, making weak forgery signals more prominent. Then, a deep convolutional network is used to extract global image features, and a multi-scale fusion strategy is combined to fully integrate local details and overall structural information. Finally, forgery analysis is performed on the reconstructed detection image based on the image fusion features to obtain the image forgery probability. Weighted cross-entropy is used to effectively solve the class imbalance problem, enhancing the generalization performance and robustness of the model. The forgery discrimination model can accurately analyze the current image fusion features and accurately output the forgery probability of the reconstructed detection image, which can effectively improve the forgery detection accuracy of images. For specific limitations of a deep forgery image detection device, please refer to the limitations of a deep forgery image detection method above, which will not be repeated here. Each module in the above-mentioned deep forgery image detection device can be implemented in whole or in part by software, hardware, or a combination thereof. The above modules can be embedded in the processor of the computer device in hardware form or independent of it, or they can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of the above modules.
[0171] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a deepfake image detection method on the server side.
[0172] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When executed by the processor, the computer program implements the functions or steps of a deepfake image detection method on the client side.
[0173] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0174] The image to be detected is acquired, the deep image features of the image to be detected are extracted, and the deep image features are diffused and noise-added to obtain noisy image features;
[0175] The noisy image features are reverse-denoised to obtain the denoised image features;
[0176] The denoised image features are reconstructed to obtain the reconstructed detection image;
[0177] The image to be detected is subtracted from the reconstructed detected image to obtain a residual image, and the image fusion features of the residual image are extracted.
[0178] Based on the image fusion features, a forgery analysis is performed on the reconstructed and detected image to obtain the image forgery probability.
[0179] In the several embodiments provided by this invention, it should be understood that the disclosed devices and apparatuses can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.
[0180] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.
[0181] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.
[0182] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0183] In some embodiments of this example, a computer-readable storage medium is provided, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the steps of the method described in the above embodiments.
[0184] The readable storage medium of the present invention stores a computer program, which, when executed by a processor of an electronic device, can perform the following:
[0185] The image to be detected is acquired, the deep image features of the image to be detected are extracted, and the deep image features are diffused and noise-added to obtain noisy image features;
[0186] The noisy image features are reverse-denoised to obtain the denoised image features;
[0187] The denoised image features are reconstructed to obtain the reconstructed detection image;
[0188] The image to be detected is subtracted from the reconstructed detected image to obtain a residual image, and the image fusion features of the residual image are extracted.
[0189] Based on the image fusion features, a forgery analysis is performed on the reconstructed and detected image to obtain the image forgery probability.
[0190] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0191] Computer-readable storage media may also store at least one computer-executable program / instruction, such as computer-readable instructions. Computer-readable storage media include, but are not limited to, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Computer-readable storage media may include, for example, read-only memory (ROM), hard disk, flash memory, etc. For example, a non-transitory computer-readable storage medium may be connected to a computing device such as a computer, and then, when the computing device executes the computer-readable instructions stored on the computer-readable storage medium, the various methods described above can be performed.
[0192] In addition, the computer device may include (but is not limited to) a data bus, an input / output (I / O) bus, a display, and input / output devices (e.g., keyboard, mouse, speakers, etc.).
[0193] The processor can communicate with external devices via the I / O bus through wired or wireless networks.
[0194] In one embodiment, the at least one computer-executable instruction may also be compiled into or comprise a software product / computer program product, wherein one or more computer-executable instructions are executed by a processor to perform the steps of the various functions and / or methods in the embodiments described herein.
[0195] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0196] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0197] In the embodiments provided in this disclosure, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0198] It should be noted that, in this disclosure, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element limited by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0199] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
[0200] It should be noted that if any software tools or components not belonging to our company appear in the embodiments of this application, they are merely for illustrative purposes and do not represent actual use.
Claims
1. A method for detecting deepfake images, characterized in that, The method includes: The image to be detected is acquired, the deep image features of the image to be detected are extracted, and the deep image features are diffused and noise-added to obtain noisy image features; The noisy image features are reverse-denoised to obtain the denoised image features; The denoised image features are reconstructed to obtain the reconstructed detection image; The image to be detected is subtracted from the reconstructed detection image to obtain a residual image. A preset activation function is used to enhance the local features in the residual image to obtain a residual enhanced image. The residual enhanced image is transformed to the frequency domain, and the high-frequency information in the residual enhanced image is retained in the frequency domain to obtain a frequency domain feature map. The frequency domain feature map is mapped to the spatial domain to obtain a residual transformed image. Global image features in the residual transformed image are extracted through multi-layer convolution, and global image features at different levels are fused at multiple scales to obtain image fusion features. Based on the image fusion features, a forgery analysis is performed on the reconstructed and detected image to obtain the image forgery probability.
2. The deepfake image detection method as described in claim 1, characterized in that, The process of acquiring the image to be detected and extracting deep image features from the image to be detected includes: The image to be detected is normalized to obtain a normalized image; Perform a first convolution on the normalized image to obtain shallow visual features; A second convolution is performed on the normalized image to obtain the mid-level semantic features; A third convolution layer is applied to the normalized image to obtain deep structural features; The shallow visual features, the mid-level semantic features, and the deep structural features are summarized into deep image features.
3. The deepfake image detection method as described in claim 1, characterized in that, The process of diffusing and adding noise to the deep image features to obtain noisy image features includes: Obtain the diffusion noise scheduling parameters for each of the deep image features; Based on the aforementioned diffusion noise scheduling parameters, diffusion noise is applied to each corresponding deep image feature to obtain several noise-added features; The noise-added features are fused to obtain noise-added image features.
4. The deepfake image detection method as described in claim 1, characterized in that, The inverse denoising of the noisy image features to obtain denoised image features includes: Obtain a preset time step, perform position encoding on the preset time step, and obtain a time embedding vector; The temporal embedding vector is added to the noisy image features to obtain the noisy updated features; The noisy updated features are progressively downsampled and compressed to obtain noisy compressed features; The noise-compressed features are gradually upsampled and restored to obtain the image noise value at the current time step; The image noise value is back-diffused to obtain the image feature value of the previous time step at the current time step; The process of returning the image feature value to the image noise value through back-diffusion to obtain the image feature value of the previous time step at the current time step continues until the current time step is a preset value. The image feature values are summarized to obtain the denoised image features.
5. The deepfake image detection method as described in claim 1, characterized in that, The process of reconstructing the denoised image features to obtain the reconstructed detection image includes: The denoised image features are deconvolved to obtain the image restoration features; The image restoration features are then subjected to resolution restoration to obtain a high-resolution image; The high-resolution image is convolved, and the convolved high-resolution image is mapped to the reconstructed detection image.
6. The deepfake image detection method as described in claim 1, characterized in that, The step of subtracting the image to be detected from the reconstructed detected image to obtain a residual image includes: Align the image to be detected with the reconstructed detection image to obtain an aligned image group; The residual image is obtained by subtracting the pixels of the image to be detected and the reconstructed detection image within the aligned image group.
7. The deepfake image detection method as described in claim 1, characterized in that, The step of performing forgery analysis on the reconstructed and detected image based on the image fusion features to obtain the image forgery probability includes: Obtain the distinguishing labels of historical forgery features and target samples, and analyze the historical forgery features using a preset classification model to obtain the forgery prediction probability; A weighted cross-entropy is generated based on the distinguishing label and the forgery prediction probability; The classification model is optimized using the weighted cross-entropy to obtain a forgery detection model; The image fusion features are analyzed using the forgery discrimination model to obtain the image forgery probability of the reconstructed and detected image.
8. A deepfake image detection device, characterized in that, The device includes: The diffusion noise module is used to acquire the image to be detected, extract the deep image features of the image to be detected, and perform diffusion noise on the deep image features to obtain noisy image features; The inverse denoising module is used to perform inverse denoising on the noisy image features to obtain denoised image features; The image reconstruction module is used to reconstruct the features of the denoised image to obtain a reconstructed detection image; The image subtraction module is used to subtract the image to be detected from the reconstructed detection image to obtain a residual image, enhance the local features in the residual image using a preset activation function to obtain a residual enhanced image, transform the residual enhanced image to the frequency domain, retain the high-frequency information in the residual enhanced image in the frequency domain to obtain a frequency domain feature map, map the frequency domain feature map to the spatial domain to obtain a residual transformed image, extract global image features in the residual transformed image through multi-layer convolution, and fuse the global image features at different levels at multiple scales to obtain image fusion features; The forgery analysis module is used to perform forgery analysis on the reconstructed detection image based on the image fusion features to obtain the image forgery probability.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform a deepfake image detection method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements a deepfake image detection method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method for training image detection model, image detection method and corresponding device
CN117593570A
Face forgery detection method based on multi-domain clue reconstruction
CN120088833A