Image tamper detection and positioning method based on multi-domain fusion and dynamic quantitative perception

By employing a multi-domain feature fusion and dynamic quantization-based image tampering detection method, the generalization and accuracy issues of existing image tampering detection technologies are resolved, achieving high-precision pixel-level tampering localization and multi-scene adaptability.

CN122176485APending Publication Date: 2026-06-09CHANGSHA UNIVERSITY OF SCIENCE AND TECHNOLOGY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHANGSHA UNIVERSITY OF SCIENCE AND TECHNOLOGY
Filing Date
2026-03-04
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing image tampering detection methods have poor generalization ability, fail to fully integrate RGB and DCT domain information, lose spatial coordinate information, have weak adaptability, are difficult to adapt to diverse real-world scenarios, and lack pixel-level positioning accuracy.

Method used

A multi-domain feature fusion method is adopted, combining artifact features from the RGB and DCT domains. A detection and localization model based on multi-domain fusion and dynamic quantization perception is constructed by adapting different quantization parameters through a dynamic quantization perception module. Pixel-level tampering detection is performed using the dual-branch backbone network and fully convolutional segmentation head of HRNet.

Benefits of technology

It significantly improves detection and localization accuracy, with p-F1 score and p-AP score increasing by 12%–25% and 8%–18% respectively. It maintains high accuracy under various compression qualities and multiple compression scenarios, shortens the training cycle by more than 30%, and supports pixel-level localization for both JPEG and non-JPEG image formats.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122176485A_ABST
    Figure CN122176485A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image tampering detection and positioning, and relates to an image tampering detection and positioning method based on multi-domain fusion and dynamic quantization perception. The method comprises the following steps: S1: obtaining RGB pixel data, Y channel DCT coefficients and a quantization table of a to-be-detected image to obtain a to-be-detected data set; S2: performing multi-dimensional feature extraction on the to-be-detected data set to obtain a multi-dimensional feature set; S3: processing the multi-dimensional feature set to obtain a fused multi-dimensional feature tensor; S4: constructing a detection and positioning model based on multi-domain fusion and dynamic quantization perception; S5: performing two-stage training on the constructed detection and positioning model using a labeled image tampering sample data set; and S6: inputting the processed multi-dimensional feature tensor into the trained model to output a pixel-level tampering positioning result, thereby completing the image tampering detection and positioning. The present application has the advantages of significantly improved detection and positioning accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image tampering detection and localization technology, and relates to an image tampering detection and localization method based on multi-domain fusion and dynamic quantization perception. Background Technology

[0002] With the popularization of mobile terminals and image editing software, image tampering technology has become increasingly convenient. Tampered images are used in malicious scenarios such as false evidence and fabricated news, which seriously endangers social trust. Existing image tampering detection methods are mainly divided into two categories: those based on image acquisition artifacts and those based on JPEG compression artifacts. However, they have significant drawbacks: (1) Traditional methods rely on manually designed features, have poor generalization ability, and have long development cycles; (2) Existing deep learning methods mostly utilize RGB domain or DCT domain information alone, failing to fully integrate the complementarity of the two types of artifacts, and the feature fusion method is simple; (3) Directly inputting DCT coefficients into convolutional neural networks will lose spatial coordinate information, resulting in insufficient learning of compression artifacts; (4) They have weak adaptability to different quantization parameters and multiple compression scenarios. The detection accuracy drops significantly in tampered images without initial compression artifacts, and models trained for specific tampering types are difficult to adapt to diverse real-world scenarios.

[0003] In addition, some methods use DCT histograms as feature inputs, but histograms lose spatial information and are only suitable for image-level classification, not for pixel-level tamper localization. A few methods that fuse multi-domain information lack adaptation mechanisms for dynamic changes in quantization parameters, resulting in insufficient robustness in real-world scenarios with tampered images of varying compression qualities. Therefore, there is an urgent need for a high-precision tamper detection and localization method that can fully integrate multi-domain artifact features, preserve spatial information, and adapt to dynamic quantization scenarios. Summary of the Invention

[0004] To achieve the above objectives, this invention provides an image tampering detection and localization method based on multi-domain feature fusion, comprising the following steps: Step S1: Obtain the RGB pixel data, Y channel DCT coefficients, and quantization table of the image to be detected to obtain the dataset to be detected; Step S2: Extract multi-dimensional features from the dataset to be detected to obtain a multi-dimensional feature set; Step S3: Standardize, convert, and fuse the multi-dimensional feature set to obtain the fused multi-dimensional feature tensor; Step S4: Construct a detection and localization model based on multi-domain fusion and dynamic quantization perception; Step S5: Use the labeled image tampering sample dataset to perform two-stage training on the constructed detection and localization model; Step S6: Input the multi-dimensional feature tensor processed by steps S1-S3 into the trained model, output the pixel-level tampering localization result, and complete the image tampering detection and localization.

[0005] Furthermore, in step S1, if the image to be detected is a JPEG format image, the Y channel quantization table is parsed from the file header, and the image is subjected to 8×8 block DCT transformation to obtain the Y channel DCT coefficients; if it is a non-JPEG format, the DCT coefficients are generated by JPEG quality 100 colorless subsampling compression, and the default quantization table element is 1.

[0006] Furthermore, the multi-dimensional feature set includes RGB domain acquisition artifact features, DCT domain compression artifact features, and quantization-related features.

[0007] Furthermore, step S3 specifically includes: Step S3.1: Normalize the RGB image and map the pixel values ​​to the [0,1] interval to obtain the RGB domain preprocessed features; Step S3.2: Standardize the DCT coefficients and convert them into a DCT volume of (T+1)×H×W according to the formula. The value of T is in the range of 15-25. The clip function restricts the coefficient range to [-T,T]. The symmetric features are simplified by absolute value transformation to obtain the DCT domain preprocessed features. Step S3.3: Perform array standardization on the quantization table, calculate the statistical characteristics of the quantization table, and expand the quantization table to a unified dimension to obtain preprocessed quantization-related features; Step S3.4: Fuse the RGB domain preprocessing features, DCT domain preprocessing features, and preprocessing quantization related features into a unified feature tensor. Specifically, the preprocessing quantization features are extended to the same spatial dimension as the DCT volume to form a unified feature tensor.

[0008] Furthermore, the detection and localization model includes a feature embedding layer, a DCT domain feature enhancement module, a dynamic quantization perception module, a multi-domain feature fusion network, and a tamper-proof localization output layer; The feature embedding layer is used to map the fused unified feature tensor to the hidden space, and the dimension of the hidden space is set to 64-256. The DCT domain feature enhancement module uses a frequency separation operation to split the DCT volume into 8x8 frequency components, performs batch normalization and ReLU activation through 8x8 convolution with an expansion coefficient of 8, and then compresses the number of channels through 1×1 convolution to extract frequency domain specific features. The number of convolution kernels in the 8x8 convolution is 32-128, and the number of convolution kernels in the 1×1 convolution is 64-256. The dynamic quantization perception module repeats the quantization table in an array and multiplies it element-by-element with the DCT domain feature map to simulate the JPEG dequantization process. It introduces 2-3 fully connected layers as adaptive weight layers for quantization parameters, inputs the statistical features of the quantization table, and outputs a weight vector that is weighted and fused with the multiplication result to dynamically adjust the feature contribution. The multi-domain feature fusion network is constructed based on a dual-branch backbone network of HRNet. The RGB branch learns image acquisition artifacts, the DCT branch learns compression artifacts, the RGB branch extracts features at four resolutions, and the DCT branch uses a three-resolution variant of HRNet to extract compression artifact features at the corresponding resolution. The fusion unit performs upsampling or downsampling scale matching on the feature maps of the same resolution of the dual branches. After element-wise addition and fusion, the fused features are optimized by 3×3 convolution. The tamper location output layer uses a fully convolutional segmentation head to output a single-channel tamper probability map through 1×1 convolution, and finally outputs pixel-level tamper probability values.

[0009] Furthermore, step S5 specifically includes: Step S5.1: Use the pixel-level binary cross-entropy loss function with class weights to evaluate the difference between the model output and the true label. The calculation formula is as follows: ; in, The labels are real; 0 represents a normal pixel, and 1 represents a tampered pixel. The tampering probability is the output of the model. To modify the class weight, the value range is 3-8; Step S5.2: Optimize model parameters using the gradient descent algorithm; Step S5.3: A two-stage training strategy is adopted. In the first stage, the DCT branch is pre-trained on a large-scale dual JPEG compressed dataset with a learning rate of 0.01-0.1 and an iteration round of 20-40 rounds. In the second stage, the RGB branch uses ImageNet pre-trained weights and, together with the DCT branch, performs end-to-end fine-tuning on the tampered image dataset. The learning rate is set to 0.001-0.01, and the number of iteration rounds is set to 150-250 rounds. Training stops when the validation set loss no longer decreases within 3-5 consecutive training epochs to avoid overfitting. Further, step S6 specifically involves: Step S6.1: Map the fused unified feature tensor to the hidden space through the embedding layer; Step S6.2: Extract frequency domain specific features using the DCT domain feature enhancement module; Step S6.3: Adapt the quantization parameter characteristics of the image through the dynamic quantization perception module; Step S6.4: Extract multi-resolution fusion features through a dual-branch fusion network to capture tampering traces and artifact differences in the image; Step S6.5: Obtain a pixel-level tampering probability map by modifying the tampering positioning output layer; Step S6.6: Dynamically calculate the segmentation threshold based on the mean of the quantization table. The threshold calculation formula is: threshold = 0.3 + 0.2 × mean of quantization table / 50. Convert the probability map into a binary mask. If the probability value is greater than the threshold, it is determined to be a tampered pixel; otherwise, it is a normal pixel. Output the tampered area location result.

[0010] The beneficial effects of this invention are: (1) By adopting the technical solution of the present invention, the detection and positioning accuracy is significantly improved. The p-F1 score of the present invention reaches 55.62%-93.97%, and the p-AP reaches 68.76%-95.87%. Compared with the existing best methods Noiseprint and ManTra-Net, the p-F1 score is improved by an average of 12%-25%, and the p-AP score is improved by an average of 8%-18%. By adopting DCT volume representation combined with frequency separation operation, the problem of spatial information loss in DCT domain is solved, and the positioning accuracy is improved by 15%-30% compared with DCT histogram features.

[0011] (2) This invention integrates RGB domain acquisition artifacts and DCT domain compression artifacts. By using a dynamic quantization sensing module to adapt to different quantization parameter scenarios, in tampered images with varying compression quality and multiple compressions, the p-AP remains above 85% in additional compression scenarios, which is significantly better than single-domain methods.

[0012] (3) The dual-stage pre-training mechanism of the present invention uses a large-scale dual JPEG dataset to initialize the DCT branch, shortening the training cycle by more than 30%; in tampered images without initial compression artifacts, the RGB branch can still maintain high detection accuracy (p-F1≥90%), and the detection effect on common tampering types such as copy-move and splicing is significant.

[0013] (4) The end-to-end network architecture of the present invention supports pixel-level tampering location, can handle multiple image formats including JPEG and non-JPEG, and adapts to the image detection requirements of different resolutions and compression qualities. Attached Figure Description

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

[0015] Figure 1This is a flowchart of the method of the present invention. Detailed Implementation

[0016] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to embodiments and accompanying drawings. The content mentioned in the embodiments is not intended to limit the present invention.

[0017] like Figure 1 As shown, this invention provides an image tampering detection and localization method based on multi-domain fusion and dynamic quantization perception, comprising the following steps: Step S1: Obtain the RGB pixel data, Y channel DCT coefficients, and quantization table of the image to be detected to obtain the dataset to be detected; Specifically, an image reading tool is used to load the image to be detected. If it is in JPEG format, the Y-channel quantization table is obtained by parsing the file header, and the image is subjected to an 8×8 block DCT transform to obtain the Y-channel DCT coefficients. If it is in PNG format, DCT coefficients are generated by JPEG quality 100 colorless subsampling compression, and all elements of the quantization table are set to 1. The acquired image must contain complete format information and pixel data to ensure the integrity of feature extraction.

[0018] Step S2: Extract multi-dimensional features from the dataset to be detected to obtain a multi-dimensional feature set; It should be further explained that the multi-dimensional feature set includes RGB domain acquisition artifact features, DCT domain compression artifact features, and quantization-related features.

[0019] RGB domain artifact features acquisition: Sensor noise features are extracted through pixel-level noise analysis, CFA interpolation artifacts are extracted based on the principle of color filtering array, color consistency features are obtained by calculating the color deviation between adjacent pixels, and edge continuity features are obtained by analyzing edge gradient continuity.

[0020] DCT domain compression artifact characteristics: For the coefficients after 8×8 block DCT transformation, statistical histogram of low frequency coefficient distribution, non-zero proportion of high frequency coefficients (sparseness), calculation of Pearson correlation coefficient of coefficients within the block, and analysis of the difference in corresponding position coefficients between adjacent blocks.

[0021] Quantification-related characteristics: Calculate the mean, variance, and maximum value of the quantization table, and derive the corresponding compression quality factor based on the quantization table.

[0022] The mean of the quantization table reflects the overall compression strength, the variance reflects the uniformity of quantization, and the maximum value reflects the maximum degree of quantization.

[0023] Step S3: Standardize, convert, and fuse the multi-dimensional feature set to obtain the fused multi-dimensional feature tensor; Specifically, step S3.1: RGB domain feature preprocessing The min-max normalization method is used to map the pixel value of each channel of the RGB image to [0,1], as shown in the formula: ; in, The original pixel value, and These are the minimum and maximum pixel values ​​for that channel, respectively. These are the normalized pixel values; Step S3.2: DCT domain feature preprocessing The DCT coefficients are Z-score standardized to have a mean of 0 and a variance of 1, and then converted to a DCT volume of 21 × H × W (T=20) using the formula: ; ; Simplify symmetric features through absolute value transformation; Step S3.3: Quantization Feature Preprocessing The quantification table is standardized, and its statistical characteristic expression is calculated as follows: ; in, For quantification table elements, It is the mean. It is variance. S3.4: Feature Fusion The RGB normalized features, DCT volume features, and quantization statistical features are fused into a three-dimensional feature tensor, where the quantization statistical features are extended to the same spatial dimension as the DCT volume through a broadcast mechanism.

[0024] Further explanation is needed. The RGB normalization feature is H×W×3, where H represents the image height (number of pixel rows), W represents the image width (number of pixel columns), and 3 represents the three color channels of RGB (red, green, and blue). The DCT volume feature is 21×H×W, where 21 represents the (T+1)×H×W DCT volume, and T takes values ​​from 15 to 25, preferably 20, corresponding to the number of channels after Z-score normalization, clip limitation, and absolute value transformation of the DCT coefficients. The quantization statistics feature is 1×3, where 1 indicates that the feature is a one-dimensional vector, and 3 corresponds to the three statistical features of the quantization table: mean, variance, and maximum value. The three-dimensional feature tensor is 25×H×W, where 25 is obtained by adding the three channels of the RGB feature, the 21 channels of the DCT volume feature, and the one channel expanded from the quantization statistics feature.

[0025] Step S4: Construct a detection and localization model based on multi-domain fusion and dynamic quantization perception; Specifically, the detection and localization model includes a feature embedding layer, a DCT domain feature enhancement module, a dynamic quantization perception module, a multi-domain feature fusion network, and a tamper-proof localization output layer.

[0026] Feature embedding layer: A 1×1 convolution is used to map the 25×H×W feature tensor to a 128-dimensional hidden space, outputting a 128×H×W feature map.

[0027] The DCT domain feature enhancement module includes volume transformation, frequency domain separation, and convolutional feature extraction.

[0028] The volume transformation input is the (T+1)×H×W DCT volume (T takes values ​​of 15-25, preferably 20) after Z-score standardization and absolute value transformation. The DCT volume is then subjected to dimensionality verification and format normalization to ensure the uniformity of feature dimensions. The output is the normalized DCT volume feature. Frequency domain separation performs an 8×8 block frequency component splitting operation on the normalized DCT volume, splitting the DCT volume into 64×H / 8×W / 8 frequency component feature maps according to frequency characteristics. Each channel corresponds to an independent frequency component, realizing the separation and decoupling of frequency domain features, and outputting a multi-channel frequency component feature map. Convolutional feature extraction is the core processing step, which consists of a dilated convolutional layer, a batch normalization layer, an activation layer, and a 1×1 convolutional layer connected in series: (1) Dilated convolutional layer: 8×8 convolutional kernels with a dilation coefficient of 8 are used, and 64 convolutional kernels are configured to perform dilated convolution operation on the frequency component feature map, expand the receptive field while retaining spatial information, and output the dilated convolutional feature map; (2) Batch normalization layer: the dilated convolutional feature map is batch normalized to eliminate the difference in dimensions and improve the stability of model training; (3) Activation layer: the ReLU activation function is used to perform nonlinear transformation on the normalized feature map to enhance the feature expression ability of the model; (4) 1×1 convolutional layer: 128 1×1 convolutional kernels are configured to perform channel compression and feature fusion on the activated feature map, and output the final frequency domain specific feature map.

[0029] Dynamic quantization perception module: This module solves the problem of dynamic adaptation of quantization parameters. The specific steps and structure are divided into a quantization table processing branch, a DCT feature fusion branch, and an adaptive weight fusion branch. These three branches work together to output the final features. The detailed process is as follows: Quantization table processing branch: (1) Input the standardized quantization table and its statistical features (mean, variance, maximum value); (2) Perform array repetition and dimension expansion operations on the standardized quantization table to expand the quantization table to the same spatial dimension as the feature map output by the DCT domain feature enhancement module (e.g., 128×H×W), thereby achieving dimension matching between the quantization table and the DCT domain features; (3) Output the dimension-matched quantization table feature map.

[0030] DCT Feature Fusion Branch: (1) The input is the frequency domain specific feature map output by the DCT domain feature enhancement module and the dimension matching quantization table feature map output by the quantization table processing branch; (2) Perform element-wise multiplication on the two feature maps to simulate the dequantization process of the JPEG image and realize the initial fusion of quantization parameters and DCT domain features; (3) The output is the quantization-DCT fusion feature map.

[0031] Adaptive weight fusion branch: This is the core adaptive part of the module, consisting of a fully connected weight layer + weight vector generation + weighted fusion: (1) Fully connected weight layer: 2-3 fully connected layers are introduced in series. The input is the statistical features of the quantization table. The number of hidden units is set as needed (e.g., 64, 128). The mapping relationship between quantization parameters and feature contribution is learned through the fully connected layer; (2) Weight vector generation: The output of the fully connected weight layer is transformed by dimension to generate a weight vector with the same number of channels as the quantization-DCT fusion feature map, realizing the weight allocation of features in different channels; (3) Weighted fusion: The weight vector is multiplied by the quantization-DCT fusion feature map through a channel-wise weighted multiplication operation to dynamically adjust the contribution of each feature under different quantization parameters; (4) The output is the final dynamic quantization adaptation feature map.

[0032] Multi-domain feature fusion network: The RGB branch uses HRNet-W18 to extract features at four resolutions: 64×H×W, 128×H / 2×W / 2, 256×H / 4×W / 4, and 512×H / 8×W / 8. The DCT branch uses a three-resolution variant of HRNet-W18 to extract features at corresponding resolutions: 64×H×W, 128×H / 2×W / 2, and 256×H / 4×W / 4. The fusion unit performs scale matching on the feature maps of the same resolution in both branches, and after element-wise addition and fusion, the fused features are optimized by 3×3 convolutions with 64 convolutional kernels. Tampering localization output layer: The fused features are upsampled to the input image resolution and output as a single-channel tampering probability map through 1×1 convolution.

[0033] Step S5: Use the labeled image tampering sample dataset to perform two-stage training on the constructed detection and localization model; Specifically, the dataset preparation involved using nine public datasets (CASIAv2, FantasticReality, etc.) and five custom datasets (SPCOCO, CMRAISE, etc.), covering tampering types such as copy-move and splicing, and including JPEG / non-JPEG formats and images of various compression qualities. The datasets were divided into training, validation, and test sets in a ratio of 70%:15%:15%. Loss function and optimizer: The pixel-level binary cross-entropy loss function with class weights is adopted, the class weights are modified by ω_y=5, the optimizer is AdamW, and the weight decay coefficient is 1e-4. Two-stage training: In the first stage, the DCT branch is pre-trained on a dataset of 10,540 single / double JPEG compressed images with a learning rate of 0.05, a batch size of 32-128, with a preferred batch size of 64, and 30 iterations. In the second stage, the ImageNet pre-trained weights of the RGB branch and the DCT branch are loaded and fine-tuned on the tampered image dataset. The learning rate is 0.005, the batch size is 16-64, with 32 being preferred, and the iteration is 200 rounds. An early stopping strategy is adopted, and training stops when the validation set loss no longer decreases for 3 consecutive rounds.

[0034] Step S6: Input the multi-dimensional feature tensor processed by steps S1-S3 into the trained model, output the pixel-level tampering localization result, and complete the image tampering detection and localization.

[0035] Specifically, step S6.1: Map the fused feature tensor to a 128-dimensional hidden space through an embedding layer; Step S6.2: Extract frequency domain specific features using the DCT domain feature enhancement module; Step S6.3: Adapt the quantization parameter characteristics of the image through the dynamic quantization perception module and adjust the feature contribution. Step S6.4: Extract multi-resolution fusion features through a dual-branch fusion network to capture tampering traces in the image; Step S6.5: Obtain a pixel-level tampering probability map by modifying the tampering positioning output layer; The segmentation threshold is dynamically calculated based on the mean of the quantization table: threshold = 0.3 + 0.2 × (mean of quantization table / 50). The probability map is converted into a binary mask. The probability value is 1 if it is greater than the threshold, and 0 otherwise. The result of tampering area location is output.

[0036] To verify the effectiveness of the present invention, experiments were conducted on a computing device equipped with GPU acceleration, and the experimental results are shown in Tables 1 and 2.

[0037] Table 1: Performance Comparison with Existing Methods ; Table 2: Detection Results of Different Tampering Types ; The following detailed description, in conjunction with specific embodiments, provides further details.

[0038] Example 1: This embodiment involves JPEG format splicing and image manipulation.

[0039] Input: JPEG format image, size 1024×768, quantization quality factor 70, including spliced ​​and manipulated areas; Follow steps S1-S5 to complete feature extraction, preprocessing, and model training; Parameter settings: T=20, DCT branch pre-training iterations 30 rounds, joint training learning rate 0.005, batch size 32, iterations 200 rounds, adaptive threshold = 0.3 + 0.2 × (7 / 50) = 0.328; Results: The tampered area p-F1=78.79%, p-AP=86.41%, and the positioning accuracy error ≤2 pixels; Analysis: This image was generated by stitching together image fragments from different sources. There are compression artifacts and color consistency issues at the stitching boundaries. This invention captures these differences through multi-domain feature fusion and accurately locates the tampered area.

[0040] Example 2: This embodiment involves copying, moving, and tampering with non-JPEG format images.

[0041] Input: PNG format image, size 800×600, including copied, moved and tampered areas; Feature extraction, preprocessing, and model training are completed according to steps S1-S5. When generating DCT coefficients, JPEG quality 100 is used, and the default quantization table element is 1. Parameter settings: T=20, adaptive threshold=0.3+0.2×(1 / 50)=0.304; Results: The tampered region p-F1=55.62% and p-AP=68.76%, which is an improvement of 22.1% compared with existing methods; Analysis: The image is in PNG format and has no initial compression artifacts. It was tampered with by copying and moving a portion of the same image. This invention relies on RGB domain artifact features (such as edge continuity and color consistency) to accurately detect the tampered area.

[0042] Example 3: This embodiment involves multiple compressions and image manipulations.

[0043] Input: JPEG image (initial compression quality 60, secondary compression quality 90), including splicing + copy-move mixed tampering; Follow steps S1-S5 to complete feature extraction, preprocessing, and model training; Parameter settings: T=20, learning rate of dynamic quantization perception module weight layer 0.001, adaptive threshold = 0.3 + 0.2 × ((7 + 2) / 50) = 0.336; Results: The tampered region had p-F1=72.35% and p-AP=81.27%, and still maintained p-AP=79.5% with an additional compression quality of 60. Analysis: The image underwent two JPEG compressions of different qualities, resulting in complex compression artifacts. This invention uses a dynamic quantization sensing module to adapt to different quantization parameters and effectively fuses multi-domain features, achieving high-precision tamper location.

[0044] The above embodiments are preferred implementations of the present invention. In addition, the present invention can be implemented in other ways. Any obvious substitutions without departing from the concept of the present technical solution are within the protection scope of the present invention.

[0045] To facilitate understanding by those skilled in the art of the improvements of this invention over the prior art, some descriptions of this invention have been simplified, and for clarity, some other elements have been omitted from this application. Those skilled in the art should realize that these omitted elements may also constitute the content of this invention.

Claims

1. An image tampering detection and localization method based on multi-domain fusion and dynamic quantization perception, characterized in that, Includes the following steps: Step S1: Obtain the RGB pixel data, Y channel DCT coefficients, and quantization table of the image to be detected to obtain the dataset to be detected; Step S2: Extract multi-dimensional features from the dataset to be detected to obtain a multi-dimensional feature set; Step S3: Standardize, convert, and fuse the multi-dimensional feature set to obtain the fused multi-dimensional feature tensor; Step S4: Construct a detection and localization model based on multi-domain fusion and dynamic quantization perception; Step S5: Use the labeled image tampering sample dataset to perform two-stage training on the constructed detection and localization model; Step S6: Input the multi-dimensional feature tensor processed by steps S1-S3 into the trained model, output the pixel-level tampering localization result, and complete the image tampering detection and localization.

2. The image tampering detection and localization method based on multi-domain fusion and dynamic quantization perception as described in claim 1, characterized in that, In step S1, if the image to be detected is a JPEG format image, the Y channel quantization table is parsed from the file header, and the image is subjected to 8×8 block DCT transformation to obtain the Y channel DCT coefficients; if it is a non-JPEG format, the DCT coefficients are generated by JPEG quality 100 color subsampling compression, and the default quantization table element is 1.

3. The image tampering detection and localization method based on multi-domain fusion and dynamic quantization perception as described in claim 2, characterized in that, The multi-dimensional feature set includes RGB domain acquisition artifact features, DCT domain compression artifact features, and quantization-related features.

4. The image tampering detection and localization method based on multi-domain fusion and dynamic quantization perception as described in claim 3, characterized in that, Step S3 specifically involves: Step S3.1: Normalize the RGB image and map the pixel values ​​to the [0,1] interval to obtain the RGB domain preprocessed features; Step S3.2: Standardize the DCT coefficients and convert them into a DCT volume of (T+1)×H×W according to the formula. The value of T is in the range of 15-25. The clip function restricts the coefficient range to [-T,T]. The symmetric features are simplified by absolute value transformation to obtain the DCT domain preprocessed features. Step S3.3: Perform array standardization on the quantization table, calculate the statistical characteristics of the quantization table, and expand the quantization table to a unified dimension to obtain preprocessed quantization-related features; Step S3.4: Fuse the RGB domain preprocessing features, DCT domain preprocessing features, and preprocessing quantization related features into a unified feature tensor. Specifically, the preprocessing quantization features are extended to the same spatial dimension as the DCT volume to form a unified feature tensor.

5. The image tampering detection and localization method based on multi-domain fusion and dynamic quantization perception as described in claim 4, characterized in that, The detection and localization model includes a feature embedding layer, a DCT domain feature enhancement module, a dynamic quantization perception module, a multi-domain feature fusion network, and a tamper-proof localization output layer. The feature embedding layer is used to map the fused unified feature tensor to the hidden space, and the dimension of the hidden space is set to 64-256. The DCT domain feature enhancement module uses a frequency separation operation to split the DCT volume into 8x8 frequency components, performs batch normalization and ReLU activation through 8x8 convolution with an expansion coefficient of 8, and then compresses the number of channels through 1×1 convolution to extract frequency domain specific features. The number of convolution kernels in the 8x8 convolution is 32-128, and the number of convolution kernels in the 1×1 convolution is 64-256. The dynamic quantization perception module repeats the quantization table in an array and multiplies it element-by-element with the DCT domain feature map to simulate the JPEG dequantization process. It introduces 2-3 fully connected layers as adaptive weight layers for quantization parameters, inputs the statistical features of the quantization table, and outputs a weight vector that is weighted and fused with the multiplication result to dynamically adjust the feature contribution. The multi-domain feature fusion network is constructed based on a dual-branch backbone network of HRNet. The RGB branch learns image acquisition artifacts, the DCT branch learns compression artifacts, the RGB branch extracts features at four resolutions, and the DCT branch uses a three-resolution variant of HRNet to extract compression artifact features at the corresponding resolution. The fusion unit performs upsampling or downsampling scale matching on the feature maps of the same resolution of the dual branches. After element-wise addition and fusion, the fused features are optimized by 3×3 convolution. The tamper location output layer uses a fully convolutional segmentation head to output a single-channel tamper probability map through 1×1 convolution, and finally outputs pixel-level tamper probability values.

6. The image tampering detection and localization method based on multi-domain fusion and dynamic quantization perception as described in claim 5, characterized in that, Step S5 specifically involves: Step S5.1: Use the pixel-level binary cross-entropy loss function with class weights to evaluate the difference between the model output and the true label. The calculation formula is as follows: ; in, The labels are real; 0 represents a normal pixel, and 1 represents a tampered pixel. The tampering probability is the output of the model. To modify the class weight, the value range is 3-8; Step S5.2: Optimize model parameters using the gradient descent algorithm; Step S5.3: A two-stage training strategy is adopted. In the first stage, the DCT branch is pre-trained on a large-scale dual JPEG compressed dataset with a learning rate of 0.01-0.1 and an iteration round of 20-40 rounds. In the second stage, the RGB branch uses ImageNet pre-trained weights and, together with the DCT branch, performs end-to-end fine-tuning on the tampered image dataset. The learning rate is set to 0.001-0.01, and the number of iteration rounds is set to 150-250 rounds. Training should be stopped when the validation set loss no longer decreases within 3-5 consecutive training epochs to avoid overfitting.

7. The image tampering detection and localization method based on multi-domain fusion and dynamic quantization perception as described in claim 6, characterized in that, Step S6 specifically involves: Step S6.1: Map the fused unified feature tensor to the hidden space through the embedding layer; Step S6.2: Extract frequency domain specific features using the DCT domain feature enhancement module; Step S6.3: Adapt the quantization parameter characteristics of the image through the dynamic quantization perception module; Step S6.4: Extract multi-resolution fusion features through a dual-branch fusion network to capture tampering traces and artifact differences in the image; Step S6.5: Obtain a pixel-level tampering probability map by modifying the tampering positioning output layer; Step S6.6: Dynamically calculate the segmentation threshold based on the mean of the quantization table. The threshold calculation formula is: threshold = 0.3 + 0.2 × mean of quantization table / 50. Convert the probability map into a binary mask. If the probability value is greater than the threshold, it is determined to be a tampered pixel; otherwise, it is a normal pixel. Output the tampered area location result.