A color image quantization step estimation method based on frequency clustering prior knowledge

By converting color images to the frequency domain and constructing a Res2Net-C network, combined with multi-channel convolution, the accuracy problem of quantization stride estimation on small-sized images is solved, improving the accuracy of quantization stride estimation for luminance and chrominance channels in color images, and enhancing the training efficiency and accuracy of the network.

CN115761022BActive Publication Date: 2026-05-01NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING UNIV OF INFORMATION SCI & TECH
Filing Date
2022-11-28
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing techniques have low accuracy in estimating the quantization step size of JPEG images on small images, especially heavily compressed images. Furthermore, traditional methods do not make sufficient use of the chroma channel information in color images, resulting in poor estimation accuracy and versatility.

Method used

By preprocessing color images by converting them from the spatial domain to the frequency domain, and constructing an improved Res2Net-C network structure, combined with multi-channel convolution to estimate the quantization stride, we can leverage frequency clustering prior knowledge and multi-scale feature learning.

Benefits of technology

It significantly improves the estimation accuracy of quantization step size, enhances the ability to estimate the quantization step size of luminance and chrominance channels in color images, reduces the amount of computation and the number of parameters, and improves the training efficiency and accuracy of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115761022B_ABST
    Figure CN115761022B_ABST
Patent Text Reader

Abstract

The application discloses a color image quantization step estimation method based on frequency clustering prior knowledge, first, the color image obtained in advance is pretreated, and the image is converted from a spatial domain to a frequency domain; second, an improved Res2Net-C network structure is constructed to obtain quantization step information in the frequency domain; finally, a multi-channel convolution is introduced to assist in estimating the quantization step of the chroma channel. The application converts the image from the spatial domain to the frequency domain through the pretreatment operation, facilitates the network to explore the traces of the quantization step in the JPEG image, and significantly improves the accuracy of estimating the quantization step; the new Res2Net-C network structure can explore the multi-scale information of the image, thereby improving the accuracy of estimating the quantization step; compared with the traditional method for estimating the quantization step, the application has high accuracy and is easier to train.
Need to check novelty before this filing date? Find Prior Art

Description

A method for estimating the quantization step size of color images based on frequency clustering prior knowledge Technical Field

[0001] This invention belongs to the field of information security, specifically relating to a method for estimating the quantization step size of color images based on prior knowledge of frequency clustering. Background Technology

[0002] With the advent of the 5G era, digital images are transmitted at faster speeds and disseminated through a wider range of media. However, as software technology matures, image editing software such as Photoshop and GIMP becomes increasingly powerful. Digital images are frequently tampered with without leaving any visible traces. Tamperers often use altered images to mislead people into misjudging an event. This behavior leads to the unreliability of online images. To rebuild the credibility of digital images, image forensics techniques have emerged.

[0003] Due to its advantages such as high transmission speed and small storage space, the JPEG format has become the most commonly used image storage format. Therefore, forensic issues related to JPEG images have received increasing attention. Examples include JPEG steganography, re-JPEG compression forensics, JPEG resampling forensics, and quantization step size estimation for JPEG images.

[0004] For JPEG forensics, tamperers typically modify JPEG images, saving them in either bitmap or JPEG format after modification. If a JPEG compressed image is saved as a bitmap (i.e., after decompressing the JPEG stream), information about the quantization steps of the JPEG compression is lost. Even if the image is saved as a JPEG (i.e., the JPEG stream is re-encoded), only the final compression information is retained in the JPEG header. Without accurate estimation of the quantization step size, JPEG images cannot be fully analyzed. Therefore, quantization step size estimation has become popular in digital image forensics. Previous research has focused on two main areas: quantization step size estimation for single-compressed images and initial quantization step size estimation for recompressed images.

[0005] For a single compressed image, the DCT coefficients after inverse quantization will be distributed around integer multiples of the quantization step size. Based on this characteristic, most researchers estimate the quantization step size according to the histogram characteristics of the DCT coefficients. In addition, some scholars estimate the quantization step size based on the characteristics of JPEG quantization noise.

[0006] For recompressed images, the second compression overwrites traces left by the first compression, making it difficult to estimate the first quantization step. The severity of the second compression affects the accuracy of the quantization step estimation. Assuming the grids of the two compressions are aligned, some researchers indirectly estimate the quantization step size by estimating the quality factor (QF) of the first compression. However, some software, such as Photoshop, does not use a standard quantization table for compression, so these methods have poor generality. To improve the algorithm's generality, researchers have shifted their focus from estimating QF to estimating the quantization step size at different frequencies.

[0007] Since most traditional algorithms estimate the quantization step size using DCT coefficients, the limited number of DCT coefficients when applied to small images leads to low accuracy in estimating the quantization step. With the development of deep learning, it has played a significant role in solving various tasks. Some CNN-based methods have been designed to estimate the quantization step size. However, these algorithms suffer from high computational cost and low accuracy. To address these issues, this invention designs a preprocessing operation that transforms the spatial domain image into the frequency domain using DCT transformation. Furthermore, since the network input is frequency domain information, networks designed based on spatial domain information are difficult to apply to frequency domain information. Therefore, a network model that can utilize frequency domain information needs to be designed.

[0008] This invention analyzes the shortcomings of existing traditional or deep learning algorithms and focuses on solving the problem of quantization step size estimation on small-sized images. It also utilizes multi-channel convolution for the first time to estimate the quantization step size of the color channel. Summary of the Invention

[0009] Purpose of the invention: To address the above problems, this invention proposes a more accurate method for estimating the step size of color image quantization based on frequency clustering prior knowledge.

[0010] Technical Solution: The color image quantization step size estimation method based on frequency clustering prior knowledge described in this invention specifically includes the following steps:

[0011] (1) Preprocess the pre-acquired color image to convert the image from the spatial domain to the frequency domain;

[0012] (2) Construct an improved Res2Net-C network structure to obtain quantization step size information in the frequency domain;

[0013] (3) Multi-channel convolution is introduced to help estimate the quantization step size of the chroma channel.

[0014] Furthermore, the implementation process of step (1) is as follows:

[0015] Perform DCT transformation on the image, and the same positions in each 8×8 block form a column vector L.i Arrange the column vectors in zig-zag order to form a C×64 matrix X = (L1, L2, L3, ..., L...). i ,…,L 64 Then, the column vector L i The elements inside are sorted from smallest to largest. Obtain the matrix

[0016] Furthermore, the implementation process of step (2) is as follows:

[0017] The ResNet-C structure is merged into Res2Net to form the Res2Net-C network structure. ResNet consists of an input stem, four convolutional groups, and a final output layer. The input stem uses the ResNet-C structure, while the four convolutional groups use the Res2Net structure.

[0018] By using grouped filtering, the network expands its receptive field through multiple 3×3 convolutions. Assuming h(.) represents a 3×3 convolution operation, then:

[0019] y1=x1(1)

[0020] y2=h(x2) (2)

[0021] y3=h(x3)+h(h(x2)) (3)

[0022] y4=h(x4)+h(hx3))+h(h(h(x2)) (4)

[0023] Where h(h(.)) represents obtaining a 5×5 receptive field by using two 3×3 convolutions, and h(h(h(.))) represents obtaining a 7×7 receptive field by using three 3×3 convolutions.

[0024] Furthermore, the implementation process of step (3) is as follows:

[0025] The input is an image containing three YCbCr channels. Multichannel convolution uses multiple filters to convolve the multichannel image; the number of channels in each filter must be the same as the number of input channels; the convolution results of each channel are summed element-wise to obtain the final feature map; after multichannel convolution, the number of output channels is equal to the number of filters.

[0026] Furthermore, the convolutional residual blocks for each layer of the four convolutional groups are 3, 4, 6, and 3, respectively.

[0027] Beneficial Effects: Compared with the prior art, the beneficial effects of this invention are as follows: This invention transforms the image from the spatial domain to the frequency domain through preprocessing operations, which facilitates the network in discovering traces of quantization step size in JPEG images and significantly improves the accuracy of estimating the quantization step size; The novel Res2Net-C network structure proposed in this invention can discover multi-scale information of the image, thereby improving the accuracy of estimating the quantization step size; This invention greatly reduces the number of parameters and computational load while increasing the receptive field, and compared with the corresponding traditional methods for estimating the quantization step size, it has higher accuracy and is easier to train. Attached Figure Description

[0028] Figure 1 is a flowchart of the present invention;

[0029] Figure 2 is a flowchart of image preprocessing;

[0030] Figure 3 is a schematic diagram of the Res2Net-C network structure;

[0031] Figure 4 shows the structural diagrams of the Bottleneck block and Res2Net; where (a) is a structural diagram of the Bottleneck block; and (b) is a structural diagram of the Res2Net.

[0032] Figure 5 shows the input stream structure of ResNet and ResNet-C; where (a) is the input stream of ResNet and (b) is the input stream of ResNet-C.

[0033] Figure 6 is a schematic diagram of a multi-channel convolution structure. Detailed Implementation

[0034] The present invention will now be described in further detail with reference to the accompanying drawings.

[0035] This invention proposes a color image quantization step size estimation method based on frequency clustering prior knowledge, capable of estimating the quantization step size of the luminance and chrominance channels of a JPEG color image under arbitrary quality factor compression. As shown in Figure 1, the input is a single-compressed or recompressed color image of size M×N, which is then converted from the RGB color space to the YCbCr color space through color space conversion. Next, each channel is preprocessed into a feature matrix of size C×64. Finally, the three feature matrices are input into a neural network. The output of the network is the quantization step size of the three channels. However, the Cb and Cr channels use the same quantization step size during compression, so the network output consists of two 8×8 quantization tables.

[0036] As shown in Figure 2, after performing DCT transformation on the image, the same positions in each 8×8 block form a column vector L. iThen, these column vectors are arranged in zig-zag order to form a C×64 matrix X = (L1, L2, L3, ..., L...). i ,…,L 64 Finally, L i The elements inside are sorted from smallest to largest. Obtain the final matrix

[0037] The advantage of preprocessing images is that the column vectors This can reflect the histogram distribution of its DCT coefficients, which is beneficial for the network to learn information about the quantization step size. For a single compression, each... The most frequent element is likely the quantization step size or an integer multiple thereof. For recompression, due to the effects of secondary compression, the feature vector... The distribution of elements in a neural network exhibits trends of contraction, expansion, and invariance, and the neural network can learn information about the quantization step size based on these trends.

[0038] The proposed Res2Net-C architecture is shown in Figure 3. Res2Net is chosen as the main network structure, and then the ResNet-C structure is merged into Res2Net to form the Res2Net-C network structure. ResNet consists of one input stream, four convolutional groups, and one final output layer. In the network, the ResNet-C structure is used for the input stream, while the Res2Net structure is used for the residual blocks.

[0039] First, the feature matrix is ​​convolved using three convolutional kernels (the stride of the first kernel is 2, and the stride of the second kernel is 1). Then, it passes through four convolutional groups, with residual blocks of 3, 4, 6, and 3 respectively for each layer. After the last convolutional residual block, global average pooling is performed. The final output is 128 integers generated using fully connected layers.

[0040] Res2Net achieves this by constructing hierarchical residual connections within a single residual block. It represents multi-scale features at the granular level, increasing the receptive field of each network layer. In fact, the structure of Res2Net is shown in Figure 4, where (a) is a schematic diagram of the Bottleneck block structure; and (b) is a schematic diagram of the Res2Net structure. Res2Net constructs hierarchical residual connections within a single residual block, replacing the common single 3×3 convolutional kernel. Res2Net replaces the n-channel 3×3 convolutional kernel with a smaller filter bank, each bank having... There are channels, where s represents the number of groups. In this invention, s = 4, where it is assumed that h(.) represents a 3×3 convolution operation, then:

[0041] y1=x1(1)

[0042] y2=h(x2) (2)

[0043] y3=h(x3)+h(h(x2)) (3)

[0044] y4=h(x4)+h(hx3))+h(h(h(x2)) (4)

[0045] Here, h(h(.)) represents obtaining a 5×5 receptive field using two 3×3 convolutions, and h(h(h(.))) represents obtaining a 7×7 receptive field using three 3×3 convolutions. Therefore, by using grouped filtering, the network expands its receptive field by using multiple 3×3 convolutions.

[0046] The feature matrix consists of 64 vectors representing the corresponding DCT coefficient distributions, arranged in a zig-zag pattern, ensuring that adjacent vectors have similar DCT coefficient distributions. When this feature matrix is ​​fed into a Res2Net network, Res2Net can learn information from 3, 5, and 7 neighboring vectors. Compared to ResNet, this multi-scale feature matrix helps the network learn more about the relationships between column vectors, thus improving the accuracy of estimating the quantization step size. Therefore, Res2Net is used as the main network architecture.

[0047] Furthermore, a ResNet-C structure based on Res2Net was introduced to avoid interference from 7×7 convolutions. As shown in Figure 5, (a) is the input stream of ResNet, and (b) is the input stream of ResNet-C. The idea behind ResNet-C is to replace the 7×7 convolutions with three 3×3 convolutions. Its advantage is that while maintaining the receptive field of 7×7, it significantly reduces the number of parameters and computational cost. Simultaneously, the addition of activation functions between network layers increases the network's non-linear expressive power. If the feature matrix is ​​fed into the ResNet-C structure, the neural network can avoid the influence of interference information in the feature matrix. At the same time, the added non-linear activation layers allow the network to learn the information from the feature matrix more deeply, which can also improve the estimation accuracy of the quantization step size.

[0048] In neural networks, multi-channel convolution can be used to jointly mine information from multiple channels. Figure 6 illustrates a multi-channel convolution scenario. The input is an image with three YCbCr channels. Multi-channel convolution uses multiple filters to convolve the multi-channel image. It's important to note that the number of channels in each filter must be the same as the number of input channels, because each filter needs to convolve the pixel values ​​of each channel separately. Then, the convolution results for each channel are element-wise summed to obtain the final feature map. After multi-channel convolution, the number of output channels equals the number of filters.

[0049] This invention proposes a preprocessing operation to perform frequency clustering in the frequency domain. The feature matrix obtained after preprocessing is beneficial for the network to learn traces of quantization step size in JPEG images. Applying multi-channel convolution to the neural network helps the network discover the relationship between the three channels of a color image, and thus estimate the quantization step size of the brightness channel.

[0050] To balance accuracy and mean squared error, this paper uses the mean squared error loss function (MSE) as the loss function:

[0051]

[0052] Where, N c q represents the total number of estimated quantization steps. i x represents the quantization step size of the i-th prediction. This represents the quantization step size of the i-th real value.

[0053] Currently, the quantization step size approach only utilizes the Y channel of color images. However, color images have three channels: Y, Cb, and Cr. The Cb and Cr channels contain chromaticity information about the image. To fully utilize the chromaticity information in the Cb and Cr channels (a previously unconsidered area), this paper modifies the network input, changing the original single Y channel input to a three-channel input (Y, Cb, and Cr). The network output is changed from a 64-bit quantization step size (the quantization step size of the luma channel) to a 128-bit quantization step size (the quantization step size of both the luma and chromaticity channels). Regarding the network structure, multi-channel convolution can be used in neural networks to jointly mine information from multiple channels.

Claims

1. A method for estimating the quantization step size of color images based on prior knowledge of frequency clustering, characterized in that, The process includes the following steps: (1) preprocessing the pre-acquired color image to convert the image from the spatial domain to the frequency domain; (2) constructing an improved Res2Net-C network structure to obtain the quantization step size information in the frequency domain; (3) introducing multi-channel convolution to assist in estimating the quantization step size of the chroma channels; the implementation process of step (1) is as follows: performing DCT transformation on the image, each The same positions in the block form a column vector The column vectors are arranged in zig-zag order. matrix ; Then the column vector The elements inside are sorted from smallest to largest. , to obtain the matrix The implementation process of step (3) is as follows: the input is an image containing three YCbCr channels, and the multi-channel convolution uses multiple filters to convolve the multi-channel image; the number of channels in each filter must be the same as the number of input channels; the convolution results of each channel are added element by element to obtain the final feature map; after multi-channel convolution, the number of output channels is equal to the number of filters.

2. The color image quantization step size estimation method based on frequency clustering prior knowledge according to claim 1, characterized in that, The implementation process of step (2) is as follows: The ResNet-C structure is merged into Res2Net to form a Res2Net-C network structure; ResNet consists of an input stem, four convolutional groups, and a final output layer; the input stem uses the ResNet-C structure; the four convolutional groups use the Res2Net structure; the network uses multiple... Convolution expands the receptive field; assuming h(.) represents... For the convolution operation, then: (1) (2) (3) (4) Where h(h(.)) represents the use of twice The convolution can be used to obtain The receptive field, h(h(h(.))) represents the number of times it is used. The convolution can be used to obtain The feeling of being wild.

3. The color image quantization step size estimation method based on frequency clustering prior knowledge according to claim 2, characterized in that, The convolutional residual blocks for each layer of the four convolutional groups are 3, 4, 6, and 3, respectively.