Bit plane guided depth counterfeit image detection method

Through the bit plane decomposition and maximum gradient region selection mechanism, combined with a lightweight classifier, the problem of decreased detection performance of images generated by the diffusion model is solved, and fast and accurate true and false image discrimination is achieved, thereby improving detection accuracy and computational efficiency.

CN120673243APending Publication Date: 2025-09-19SOUTHEAST UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510827078.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Existing deepfake image detection methods experience significantly reduced detection performance when faced with images generated by diffusion models, and are ineffective when processing low-quality images, making it difficult to quickly and effectively distinguish real images from AI-forged images.

Method used

Through bit plane decomposition image processing, a low-bit noise image is generated. Combining the maximum gradient region selection mechanism and a lightweight classifier, a noise-guided classifier is constructed to perform discrimination based on the comprehensive information of the noise image and the original image.

Benefits of technology

It achieves the ability to quickly and accurately distinguish real images from AI-forged images within milliseconds, significantly improving detection accuracy and enhancing the model's generalization ability and computational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120673243A_ABST
    Figure CN120673243A_ABST
Patent Text Reader

Abstract

The invention relates to a bit plane guided depth forgery image detection method. For a given image, firstly, a noise image generation method based on a bit plane is provided, and multiple image normalization strategies including scaling and threshold processing are explored; secondly, in order to amplify a noise mode to enhance a detection effect, an image region selection mechanism based on a maximum gradient is designed: a diversity score is calculated through a multi-directional gradient, and a region with the highest score is selected for key analysis; and finally, constructing a lightweight classification module for judging and outputting whether the image is real or forged, and giving two structures of a noise-based classifier and a noise-guided classifier. In a GenImage benchmark test, the method shows excellent performance at an average accuracy rate of 98.9%, and has excellent cross-generator generalization ability: the detection accuracy rate from the GAN to the diffusion model exceeds 98.2%, otherwise, the detection accuracy rate reaches 99.2%. In addition, the method can realize millisecond-level error extraction, and the processing speed is increased by nearly two orders of magnitude compared with the existing method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This paper proposes a bit-plane-guided deepfake image detection method, which aims to quickly and accurately determine whether an image is a real image or an image generated by AI forgery. Background Art

[0002] With the rapid development of generative models, especially generative adversarial networks (GANs) and diffusion models, AI-generated fake images are becoming increasingly realistic, even making it difficult for humans to distinguish between real images and AI-generated fakes. These AI-generated images can also be used for illicit purposes, such as spreading false information or harmful content, which could mislead or harm the public. Therefore, there is an urgent need for robust techniques to distinguish AI-generated fakes from real images.

[0003] In recent years, technology has begun to focus on error-based detection methods, that is, error images generated based on the image itself, for classifying and discriminating between genuine and counterfeit images. Low-bit plane images, as an effective error image representation method, can effectively characterize noise patterns in images and expose artifacts in noise patterns in AI-forged images, making them an effective feature representation method for distinguishing genuine and counterfeit images. Furthermore, the image decomposition and synthesis by bit plane is extremely efficient, avoiding the significant time and computing power consumption associated with diffusion reconstruction required by other error-based detection methods.

[0004] Early deep learning-based deep fake detection methods mainly focused on the detection of GAN-generated images. However, recent studies have found that with the emergence of diffusion models, when GAN-based detection methods are applied to diffusion-generated images, the detection performance drops significantly. Regarding the detection of images generated by diffusion models, many works are based on the error of reconstructed images. The current mainstream public literature and papers propose the following methods: DIRE (CVPR2023) performs another Diffusion process on the original image to generate a reconstructed image, calculates the error between the original image and the reconstructed image, and uses this as the basis for distinguishing the authenticity of the image, but does not combine the RGB information of the original image; SeDID (arXiv2023) calculates the loss error of a given step in the forward and reverse diffusion process as the basis for distinguishing the authenticity of the image, but may need to adjust parameters for different diffusion models to achieve optimal performance; LaRE (CVPR2024) generates a latent representation for the original image through a VAE encoder, generates a reconstructed representation for the latent representation, and calculates the latent Representing and reconstructing the error representation, and aligning the error image with the original image in both spatial and channel dimensions, thereby performing image authenticity verification, but there is still room for improvement when processing low-quality images. SSP (arXiv2024) passes the image through a high-pass filter to extract the image's noise pattern as an error classification, but it is highly dependent on the image noise pattern and may not be robust for complex or specially processed images. ZED (ECCV2024) calculates the expected coding cost and actual coding cost of the image, calculates the difference between the two costs, and uses this difference to determine the image's authenticity, but there is still room for improvement when detecting very low-quality images (for example, compression quality below 90). In summary, how to propose a fast and effective error image calculation method for authenticity verification has become a technical challenge. Summary of the Invention

[0005] In order to solve the above problems, the technical solutions of the present invention are as follows:

[0006] The bit-plane guided deep fake image detection method comprises the following steps:

[0007] This paper innovatively improves error extraction by decomposing images using bit-plane decomposition, effectively characterizing noise patterns in images using lower bit-planes. The main process is divided into three aspects: first, a bit-plane-based noise image generation method; second, a maximum gradient-based image region selection mechanism; and third, a lightweight classifier.

[0008] More specifically, we first proposed a bit-plane-based noise image generation method and explored various image normalization strategies, including scaling and thresholding. Secondly, to amplify noise patterns for enhanced detection, we designed a maximum-gradient-based image region selection mechanism. This algorithm calculates a diversity score using multi-directional gradients and selects the regions with the highest scores for focused analysis. Finally, we constructed a lightweight classification module, presenting both noise-based and noise-guided classifier architectures.

[0009] 1. Bit-plane based noise image generation method

[0010] Bit plane noise image construction: An image bit plane consists of the binary representation of each pixel at a specific bit. Since grayscale images are usually represented by 8 bits per pixel, there are a total of 8 bit planes. Similarly, RGB images can be considered as consisting of 3 channels of grayscale images. Let x c represents an RGB image under channel c∈{R,G,B}, represents the kth bit plane (0≤k≤7) corresponding to channel c, then the image can be decomposed into:

[0011]

[0012] Low-bit image generation: To further extract the noise pattern in the image, the three lowest-order bit planes of each channel (i.e. and ) Generate a low-bit image by adding bit planes. The specific formula is as follows:

[0013]

[0014] Among them, z c Represents a low-bit image synthesized by RGB images in each channel.

[0015] Normalization: Since z c The pixel value range is 0 to 7, so normalization is required before extracting image features. Two different methods are used: scaling and thresholding.

[0016] Scaling: Use the minimum-maximum normalization method to linearly map pixel values ​​to the [0,255] interval:

[0017]

[0018] in, represents the normalized noise image under channel c.

[0019] Thresholding: Since the pixel values ​​of the low-level plane are sparsely distributed, the noise characteristics can be enhanced by thresholding. c All values ​​greater than 0 are set to 255 directly, and the rest remain 0. The formula is defined as:

[0020]

[0021] in Represents the noise image z in channel c in formula (1) c The value of row i and column j.

[0022] The bit-plane decomposition method can effectively detect AI artifacts in low-frequency areas of an image, thereby better training the model to identify forged images. Furthermore, compared to other similar methods, bit-plane decomposition is based on image processing methods to extract error noise, which is extremely fast, taking only milliseconds.

[0023] 2. Image region selection mechanism based on maximum gradient

[0024] While noise patterns in low-bit images are key features for distinguishing real from generated images, they still contain a lot of useless information that can interfere with detection. To further extract intrinsic features that can essentially distinguish real from generated images, a maximum gradient-based image region selection mechanism is introduced to select the most informative regions from the image for further detection.

[0025] For low-bit images It is randomly divided into non-overlapping blocks, and then a divergence-based scoring function is designed to measure the sparsity of image gradients in different directions. is a noise block, where p represents the index of the number of regions, then the score g p The calculation is as follows:

[0026]

[0027] Among them, * represents the image convolution operation, ||·||1 represents the L1 norm of the matrix, g x 、g y 、g xy and g yx is the convolution kernel:

[0028]

[0029] The first two items of the score represent horizontal and vertical gradients, and the last two items represent diagonal gradients.

[0030] Select the one with the highest g p Scored noise blocks:

[0031]

[0032] Here, p* identifies the region with the best score.

[0033] Compared with other current function calculations for calculating image block diversity, the calculation method of the present invention is based on gradient diversity and uses matrix operations instead of a large number of loop operations in specific operations, which greatly improves work efficiency.

[0034] 3. Lightweight classifier

[0035] Noise-based classifier: A convolutional neural network pre-trained on ImageNet is used as the classifier for low-bit image patches. Due to the small size of the image patches, they need to be resized to a standard size of 256×256 before being fed into the convolutional classifier.

[0036] Noise-guided classifier: Align the original image and the error map from a spatial perspective to provide more reliable information for classification. For the original image x, first obtain the feature map through the image encoder (such as ResNet-50), and then use pooling, flattening and flattening operations to obtain the query Q, key K and value V required by the spatial attention mechanism. For the error region z p* , the error E required for spatial attention is obtained through flattening and projection operations. At this point, the multi-head attention guided by noise can be defined as:

[0037]

[0038] Among them, softmax(·) is the activation function, d k is the dimension of the tensor K. Based on this, we further implement a multi-head attention mechanism based on the Transformer. The final output vector will be passed through a fully connected layer with a binary cross-entropy loss to distinguish real images from forged ones.

[0039] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for detecting deep fake images guided by a bit plane is implemented.

[0040] A computer-readable storage medium stores computer instructions, which, when executed by a processor, implement the bit-plane-guided deep fake image detection method.

[0041] Compared to existing technologies, the noise-guided classifier proposed in this paper integrates information from both noisy and original images, providing a better basis for the model to distinguish authenticity and improving the model's generalization capabilities. The present invention consistently outperforms other state-of-the-art methods on the GenImage dataset. Experimental results show that the present method significantly outperforms other methods in heterogeneous skeleton applications, validating the effectiveness of the present method. Compared to several state-of-the-art error calculation-based methods (such as DIRE, LaRE, and ESSP), the present method far surpasses the state-of-the-art methods in both accuracy and average accuracy across all test subsets (an improvement of 11.9%), and achieves millisecond-level image processing speed in terms of computational efficiency, an improvement of nearly two orders of magnitude over the state-of-the-art methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is the overall structural diagram of the method of the present invention;

[0043] Figure 2 These are the two classifiers of the method of the present invention. DETAILED DESCRIPTION

[0044] The present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention.

[0045] Example: Figure 1 As shown, the bit plane-guided deep fake image detection method of the present invention includes the following steps:

[0046] This paper innovatively improves error extraction by decomposing images using bit-plane decomposition, effectively characterizing noise patterns in images using lower bit-planes. The main process is divided into three aspects: first, a bit-plane-based noise image generation method; second, a maximum gradient-based image region selection mechanism; and third, a lightweight classifier.

[0047] More specifically, we first proposed a bit-plane-based noise image generation method and explored various image normalization strategies, including scaling and thresholding. Secondly, to amplify noise patterns for enhanced detection, we designed a maximum-gradient-based image region selection mechanism. This algorithm calculates a diversity score using multi-directional gradients and selects the regions with the highest scores for focused analysis. Finally, we constructed a lightweight classification module, presenting both noise-based and noise-guided classifier architectures.

[0048] The detailed parameter settings are as follows: before the maximum gradient-based image region selection mechanism, the noisy image is scaled to a resolution of 256×256; after this mechanism, a 32×32 noise region is selected from the image according to the rules and upsampled to 256×256; then this region is directly input into the classifier or jointly fused with the corresponding original image before input into the classifier.

[0049] During training, the image encoder of the classifier uses ResNet-50, the learning rate is set to 0.0001, the training batch size is 64, the training rounds are 30, and Adam is selected as the optimizer.

[0050] The specific process is:

[0051] 1. Bit-plane based noise image generation method

[0052] Bit plane noise image construction: An image bit plane consists of the binary representation of each pixel at a specific bit. Since grayscale images are usually represented by 8 bits per pixel, there are a total of 8 bit planes. Similarly, RGB images can be considered as consisting of 3 channels of grayscale images. Let x c represents an RGB image under channel c∈{R,G,B}, represents the kth bit plane (0≤k≤7) corresponding to channel c, then the image can be decomposed into:

[0053]

[0054] Low-bit image generation: To further extract the noise pattern in the image, the three lowest-order bit planes of each channel (i.e. and ) Generate a low-bit image by adding bit planes. The specific formula is as follows:

[0055]

[0056] Among them, z c Represents a low-bit image synthesized by RGB images in each channel.

[0057] Normalization: Since z c The pixel value range is 0 to 7, so normalization is required before extracting image features. Two different methods are used: scaling and thresholding.

[0058] Scaling: Use the min-max normalization method to linearly map pixel values ​​to the [0,255] interval:

[0059]

[0060] in, represents the normalized noise image under channel c.

[0061] Thresholding: Since the pixel values ​​of the low-level plane are sparsely distributed, the noise characteristics can be enhanced by thresholding. c All values ​​greater than 0 are set to 255 directly, and the rest remain 0. The formula is defined as:

[0062]

[0063] in Represents the noise image z in channel c in formula (1) c The value of row i and column j.

[0064] 2. Image region selection mechanism based on maximum gradient

[0065] While noise patterns in low-bit images are key features for distinguishing real from generated images, they still contain a lot of useless information that can interfere with detection. To further extract intrinsic features that can essentially distinguish real from generated images, a maximum gradient-based image region selection mechanism is introduced to select the most informative regions from the image for further detection.

[0066] For low-bit images It is randomly divided into non-overlapping blocks, and then a divergence-based scoring function is designed to measure the sparsity of image gradients in different directions. is a noise block, where p represents the index of the number of regions, then the score g p The calculation is as follows:

[0067]

[0068] Among them, * represents the image convolution operation, ||·||1 represents the L1 norm of the matrix, g x 、g y 、g xy and g yx is the convolution kernel:

[0069]

[0070] The first two items of the score represent horizontal and vertical gradients, and the last two items represent diagonal gradients.

[0071] Select the one with the highest g p Scored noise blocks:

[0072]

[0073] Here, p* identifies the region with the best score.

[0074] 3. Lightweight classifier

[0075] Noise-based classifiers: e.g. Figure 2 As shown in Figure 1, a convolutional neural network pre-trained on ImageNet is used as a classifier for low-bit image patches. Due to the small size of the image patches, they need to be resized to a standard size of 256×256 before being fed into the convolutional classifier.

[0076] Classifier guided by noise: e.g. Figure 2 As shown in Figure 1, the original image and the error map are aligned from a spatial perspective to provide more reliable information for classification. For the original image x, the feature map is first obtained through an image encoder (such as ResNet-50), and then the query Q, key K and value V required by the spatial attention mechanism are obtained by using pooling, flattening and flattening operations respectively. For the error region z p* , the error E required for spatial attention is obtained through flattening and projection operations. At this point, the multi-head attention guided by noise can be defined as:

[0077]

[0078] Among them, softmax(·) is the activation function, d k is the dimension of the tensor K. Based on this, we further implement a multi-head attention mechanism based on the Transformer. The final output vector will be passed through a fully connected layer with a binary cross-entropy loss to distinguish real images from forged ones.

[0079] Table 1 compares the detection accuracy of the method of the present invention and the latest method; Table 2 compares the model parameter quantity and computation time of the method of the present invention and the latest method.

[0080] Tables 1 and 2 show the comparison between the present invention and the latest methods (LOTA behavior is the result of the method of the present invention). The present invention consistently outperforms other state-of-the-art methods on the GenImage dataset. Experimental results show that the method of the present invention is significantly better than other methods in heterogeneous skeleton applications, verifying the effectiveness of the method of the present invention. Compared with several of the most advanced error calculation-based methods (DIRE, LaRE, ESSP, etc.), the method of the present invention far exceeds the latest methods in terms of accuracy and average accuracy of each test subset (increased by 11.9%), and achieves millisecond-level image processing speed in terms of computational efficiency, which is nearly two orders of magnitude higher than the latest methods.

[0081] Table 1:

[0082]

[0083] Table 2:

[0084]

[0085] It should be noted that the above embodiments are not intended to limit the scope of protection of the present invention, and equivalent changes or substitutions made on the basis of the above technical solutions fall within the scope of protection of the claims of the present invention.

Claims

1. A bit-plane guided deepfake image detection method, characterized by: The method comprises the following steps: Step 1: Generate noise image based on bit plane: For the input RGB image, decompose it into 8 bit plane images according to bit plane, and select the lower 3 bit planes to generate low-bit noise image, and use scaling and thresholding to normalize pixel values. Step 2: Image region selection mechanism based on maximum gradient: For the low-bit noise image output in step 1, perform random cropping, calculate the specific gradient value of each noise block, and output the noise block with the maximum gradient value. Step 3. Lightweight classifier: For the noise block output in step 2, upsample it to the specified size (256×256) and use two classification heads for discrimination: a noise-based classification head and a noise-guided classification head, and output the image label.

2. The bit-plane-guided deepfake image detection method according to claim 1, characterized in that: The noise image generation method based on bit plane is as follows: (1) Bit plane noise image construction: For the input RGB image x, it is regarded as a grayscale image composed of 3 channels. For the grayscale image x under a given channel c∈{R,G,B} c , whose bit plane is composed of the binary representation of each pixel at a specific bit, and contains 8 bit planes in total. represents the kth bit plane (0≤k≤7) corresponding to channel c, then the image is decomposed under channel c as follows: (2) Low-bit image generation: Under each channel, for the 8 bit planes decomposed in (1), select the lowest-order 3 bit planes (i.e. and ) Generates a low-bit image by adding bit planes, and outputs a low-bit image z synthesized by the RGB image in each channel c : (3) Normalization: z obtained in (2) c The pixel value range is 0 to 7. Two methods are used to normalize the pixel value to 0 to 255: scaling and thresholding. The normalized low-bit noise image is output. Scaling: For z obtained in (2) c , the minimum-maximum normalization method is used to linearly map the pixel values ​​to the [0,255] interval, and the normalized low-bit noise image is output Thresholding: For z obtained in (2) c , enhance noise features by thresholding - for z c All values ​​greater than 0 are directly set to 255, and the rest remain 0, and the normalized low-bit noise image z is output. c , the formula is defined as: in Represents the noise image z in channel c in formula (1) c The value of row i and column j.

3. The bit-plane-guided deepfake image detection method according to claim 1, characterized in that: The image region selection mechanism based on maximum gradient is as follows: For the low-bit noise image z obtained in (3), it is randomly divided into non-overlapping blocks, and then for each noise block (p represents the index of the number of regions), and the sparsity of image gradients in different directions is measured according to the designed gradient-based scoring function: Among them, * represents the image convolution operation, ||·||1 represents the L1 norm of the matrix, g x 、g y 、g xy and g yx is the convolution kernel: The first two items of the score represent horizontal and vertical gradients, and the last two items represent diagonal gradients. Select the one with the highest g p Scored noise blocks: Among them, p* identifies the region with the best score, and the output has the highest g p Scored noise blocks 4. The bit-plane guided deepfake image detection method according to claim 1, characterized in that: Lightweight classifiers include noise-based classifiers and noise-guided classifiers, as follows: For the noise block obtained by formula (6), the input classifier is judged (including noise-based classifier and noise-guided classifier), and the prediction result of the image is output - real or fake. (1) Noise-based classifier: First, the noise block is resized to the standard size of 256×256 and then input into the convolution classifier. The convolutional neural network pre-trained on ImageNet is used as the classifier for low-bit image blocks. (2) Classifier guided by noise: The original image x is introduced, and the feature map is first obtained through the image encoder (such as ResNet-50). Then, the query Q, key K and value V required by the spatial attention mechanism are obtained by using pooling, flattening and flattening operations respectively. For the noise block z p* , the error E required for spatial attention is obtained by flattening and projection operations, thus obtaining the multi-head attention guided by noise: Among them, softmax(·) is the activation function, d k is the dimension of the tensor K. Based on this, we further implement the multi-head attention mechanism according to Transformer. The final output vector will be used to distinguish real images from forged images through a fully connected layer containing binary cross entropy loss.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for detecting deep fake images guided by bit planes as claimed in any one of claims 1 to 4 is implemented.

6. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the computer instructions are executed by a processor, the method for detecting deep fake images guided by bit planes according to any one of claims 1 to 4 is implemented.