High-quality factor JPEG image steganalysis method based on dual-branch network

By converting rounding error and truncation error into error images, and using a dual-branch network (including Transformer and CNN) to extract features, combined with attention mechanisms for steganography analysis, the problem of low accuracy of JPEG image steganography analysis in the prior art is solved, and efficient and accurate steganography trace detection is achieved.

CN119168839BActive Publication Date: 2025-04-18NANJING UNIV OF INFORMATION SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411659465.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-04-18
Estimated Expiration
2044-11-20

AI Technical Summary

Technical Problem

The prior art is not accurate when performing steganography analysis of high-quality factor JPEG images, and feature extraction lacks theoretical support and interpretability.

Method used

Using a dual-branch network method, the rounding error and truncation error are converted into error images, and features are extracted in combination with Transformer and CNN networks, and feature selective attention is used to perform feature selection attention, and finally steganography analysis is performed.

Benefits of technology

It significantly improves the accuracy of steganography analysis of high-quality factor compressed JPEG images, can accurately detect steganography traces, without relying on specific steganography algorithms, does not cause damage to the image, and improves computing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168839B_ABST
    Figure CN119168839B_ABST
Patent Text Reader

Abstract

The invention discloses a high-quality factor JPEG image steganalysis method based on a dual-branch network. For a JPEG image to be analyzed, firstly, the frequency domain is converted to the spatial domain to obtain a non-rounded pixel value block that is not rounded or truncated, then the non-rounded pixel value block is rounded and truncated, and then the rounding error and the truncation error are normalized and added to convert into an error image; the JPEG image and the error image are input into a trained dual-branch network, the branch network includes a parallel Transformer network module and a CNN network module, and frequency domain features and spatial domain features are extracted at the same time; the frequency domain features and spatial domain features are fused through a fusion module, and the obtained fusion features are input into a classifier to determine whether it is steganographic. The invention can perform steganalysis on JPEG images compressed by a high-quality factor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to information security and image processing technology, and in particular to a high-quality factor JPEG image steganalysis method based on a double-branch network. Background Art

[0002] As digital images are widely used on social media, image steganography has also developed. Image steganography is a technique that embeds secret information into images, with the goal of transmitting secret information without being detected. Due to the decline in image storage prices and users' preference for maintaining image quality, i.e. retaining more image detail information, high-quality factor compressed JPEG images have become popular on social media. At the same time, due to the increase in free steganographic software, steganists may also tend to choose JPEG images compressed with higher quality factors to increase the embedding capacity. Therefore, it is necessary to develop efficient and accurate steganalysis methods to provide strong support for the security and privacy protection of digital images.

[0003] To perform steganalysis on JPEG images, it is necessary to extract rich features from the image to determine whether the image is a steganographic image. Early JPEG domain steganalysis methods first decompressed the JPEG domain image into the spatial domain, used filters to obtain noise residuals, and finally processed and extracted statistical features in the quantization stage. However, this traditional method has limitations. Not only does it require researchers to manually design features, but the feature adjustment process is cumbersome and inefficient. In recent years, the application of deep learning has significantly improved the accuracy of steganalysis. Deep learning networks have the ability to learn and express features, which eliminates the need for researchers to manually design complex high-dimensional features. However, most deep learning-based steganalyzers are end-to-end, and the extracted features lack certain theoretical support and interpretability. The prior art first determined whether a JPEG image contained steganographic information by determining whether the DCT coefficients in the image conformed to the statistical distribution of natural images. This method was originally used to detect JSteg steganography, but it was difficult to detect steganography with more complex embedding methods. Later, the structural features of JPEG images were used to manually extract statistical features from the images, and then combined with support vector machines (SVM) for classification to determine whether there is steganographic information in the image. This has high requirements for data volume and computing resources and has limited adaptability.

[0004] Transformer was originally used to handle natural language processing tasks, and its self-attention mechanism can better capture global information. In 2020, the Google team successfully verified the feasibility of the Transformer architecture in the field of computer vision. Existing methods are mostly used for target recognition and image segmentation, but steganalysis can be regarded as an image binary classification problem, and steganographic images are almost impossible to recognize with the naked eye, requiring neural networks to extract higher-dimensional information. Currently, JPEG image steganalysis mainly uses CNN networks, which have low accuracy. Summary of the invention

[0005] Purpose of the invention: The purpose of the present invention is to solve the deficiencies in the prior art and to provide a high-quality factor JPEG image steganalysis method based on a dual-branch network. The innovation of the present invention is to utilize rounding error and truncation error as well as a novel dual-branch network structure and to selectively focus on the features extracted by the dual-branch network through an attention mechanism, thereby performing steganalysis.

[0006] Technical solution: A high-quality factor JPEG image steganalysis method based on a dual-branch network of the present invention is characterized by comprising the following steps:

[0007] Step 1: For the JPEG image to be analyzed, first convert it from the frequency domain to the spatial domain to obtain a non-rounded pixel value block without rounding or truncation. , then the non-rounded pixel value block Perform rounding and truncation operations to obtain rounding error and truncation error, and then normalize the rounding error and truncation error and add them to convert them into an error image; the specific method is:

[0008] Step 1.1, calculate the rounding and truncation errors; first multiply the quantized DCT coefficients by the quantization table to perform dequantization operation, and then perform inverse DCT transformation to obtain the decompressed non-rounded pixel value block , and the non-rounded pixel value blocks Round to an integer and clip to a limited dynamic range of [0, 255]; then the error caused by the rounding operation is called the rounding error rerror, and the part outside the range of [0, 255] is truncated, and the error caused by the truncation operation is called the truncation error terror;

[0009] Step 1.2, normalize the truncation error and the rounding error respectively; finally, add the normalized truncation error and rounding error to obtain an error image;

[0010] Step 2, construct and train a dual-branch network, input the JPEG image and the error image in step 1 into the trained dual-branch network, the dual-branch network includes a parallel Transformer network module and a CNN network module, extracts the frequency domain features of the JPEG image through the CNN network module, and extracts the spatial domain features of the error image through the Transformer network module;

[0011] Step 3: The frequency domain features and spatial domain features are fused through the fusion module. The fused features are fed into the classifier. The offset probability of the pixels in the JPEG image is obtained through the Softmax layer. The offset probability is used to analyze whether it is steganographic.

[0012] Furthermore, the non-rounded pixel value block y obtained in step 1 is ij The calculation formula is as follows:

[0013] (1)

[0014] in, c is the quantized DCT coefficient, q is a quantization table; and The data type is a floating point number. To obtain the final decompressed image, the result is rounded to an integer and clipped to a limited dynamic range of [0,255].

[0015] The calculation formulas for obtaining rounding error and truncation error are as follows:

[0016] (2)

[0017] (3)

[0018] The calculation formula for error normalization is as follows:

[0019] Error_norm=(max(error( y ij )-error( y ij )) / (max(error( y ij ))-min(error( y ij ))) (4)

[0020] The formula for adding the normalized rounding error and truncation error to the error image is as follows:

[0021] (5)

[0022] in, is the resulting error image.

[0023] Furthermore, the specific structure and parameter settings of the CNN network module of the dual-branch network are as follows: the CNN network module includes an input layer, seven stacked layers and an output layer, each stacked layer includes a convolutional layer (C), a BN layer (B) and a nonlinear activation function (R), and all convolutional layers use a 3×3 convolution kernel; the third stacked layer starts to use jump connections; the nonlinear activation function (R) uses a ReLU function.

[0024] Furthermore, the Transformer network module of the CNN network module of the dual-branch network first performs linear projection on the error image, and then extracts spatial domain information through the attention module, and residual connections are used between the attention modules.

[0025] Furthermore, the fusion module in step 3 fuses the frequency domain information extracted by the CNN network module and the spatial domain information extracted by the Transformer network module, and compresses and simplifies them; the specific fusion method of the fusion module is:

[0026] First, the attention module aggregates the spatial dimensions (height H and width W) of the input feature map through a global average pooling operation to generate a channel descriptor for each channel; then there is a self-gating mechanism consisting of two fully connected (FC) layers and a nonlinear activation function (usually sigmoid). The first FC layer reduces the dimension of the channel descriptor, applies ReLU nonlinear activation, and the second FC layer projects it back to the original channel dimension. The output is used to recalibrate the original input feature map. Here, the attention module can selectively emphasize information-rich features while suppressing less useful features, allowing the model to focus on the most relevant features in the task. The convolution layer is used to further extract high-dimensional features and reduce feature dimensions.

[0027] Furthermore, the classifier includes a global average pooling layer, a fully connected layer and a SoftMax layer, and the fusion features are passed through the classifier to obtain the probability of the estimated offset of the pixel , is the interval [0, 1],

[0028] ;

[0029] At the same time, the cross entropy loss function is used as the loss function, and the network parameters are continuously optimized based on the loss function. The cross entropy loss is expressed as:

[0030] (8)

[0031] in, represents the true label of the sample, If it is 0, it means the JPEG image is a normal image. 1, indicating that the JPEG image is a steganographic image; represents the probability of the model predicting class 1 (the probability of a steganographic image), and N represents the number of samples.

[0032] Beneficial effects: Compared with the prior art, the present invention has the following advantages:

[0033] 1. The present invention converts JPEG images into error images by using preprocessing operations, which facilitates the network to discover steganalysis traces in JPEG images. After the preprocessing operation, the accuracy of steganalysis of high-quality factor compressed JPEG images can be significantly improved.

[0034] 2. The present invention utilizes rounding error and truncation error for image steganalysis, which can accurately detect steganalysis traces without relying on a specific steganalysis algorithm and causing no damage to the image itself.

[0035] 3. The dual-branch network of the present invention can extract high-dimensional feature information of the image, thereby improving the accuracy of steganalysis. In addition, the attention mechanism helps the model reduce unnecessary computational overhead and improve computational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a schematic diagram of the overall network framework of the present invention;

[0037] Figure 2 It is a schematic diagram of the CNN network module of the present invention;

[0038] Figure 3 It is a schematic diagram of the Transformer network module of the present invention;

[0039] Figure 4 It is a schematic diagram of the fusion module of the present invention;

[0040] Figure 5 Schematic diagram of the classifier of the present invention. DETAILED DESCRIPTION

[0041] The technical solution of the present invention is described in detail below, but the protection scope of the present invention is not limited to the embodiments.

[0042] Most of the existing JPEG image steganalysis methods are based on deep learning, usually using convolutional neural networks (CNN) to capture more complex and subtle steganalysis information and automatically extract features. However, in high-quality factor compressed JPEG images, the high-frequency details and low-frequency content of the image are relatively complete, which makes it difficult for deep learning models to extract sufficient and discriminative features from them and difficult to detect hidden information. Manually designed features are often based on specific domain knowledge and clear mathematical or statistical principles, and can capture steganalysis traces more accurately. Transformer To solve the problems of the prior art, the present invention proposes a dual-branch network based on Transformer and CNN, in which the CNN branch extracts the frequency domain information of the JPEG image, the Transformer branch extracts the spatial domain information of the error image of the JPEG image, and the fusion block fuses the frequency domain information and the spatial domain information, thereby realizing the steganalysis of the JPEG image.

[0043] like Figure 1 As shown, the high-quality factor JPEG image steganalysis method based on a dual-branch network of the present invention is characterized by comprising the following steps:

[0044] Step 1: For the JPEG image to be analyzed, first convert it from the frequency domain to the spatial domain to obtain a non-rounded pixel value block without rounding or truncation. , then the non-rounded pixel value block Perform rounding and truncation operations to obtain rounding error and truncation error, and then normalize the rounding error and truncation error and add them to convert them into an error image; the specific method is:

[0045] Step 1.1, calculate the rounding and truncation errors; first multiply the quantized DCT coefficients by the quantization table to perform dequantization operation, and then perform inverse DCT transformation to obtain the decompressed non-rounded pixel value block , and the non-rounded pixel value blocks Round to an integer and clip to a limited dynamic range of [0, 255]; then the error caused by the rounding operation is called the rounding error rerror, and the part outside the range of [0, 255] is truncated, and the error caused by the truncation operation is called the truncation error terror;

[0046] Step 1.2, normalize the truncation error and the rounding error respectively; finally, add the normalized truncation error and rounding error to obtain an error image;

[0047] Step 2, construct and train a dual-branch network, input the JPEG image and the error image in step 1 into the trained dual-branch network, the dual-branch network includes a parallel Transformer network module and a CNN network module, extracts the frequency domain features of the JPEG image through the CNN network module, and extracts the spatial domain features of the error image through the Transformer network module;

[0048] Step 3: The frequency domain features and spatial domain features are fused through the fusion module. The fused features are fed into the classifier. The offset probability of the pixels in the JPEG image is obtained through the Softmax layer. The offset probability is used to analyze whether it is steganographic.

[0049] In step 1 of this embodiment, a non-rounded pixel value block is obtained. The calculation formula is as follows:

[0050] (1)

[0051] in, c is the quantized DCT coefficient, q is a quantization table; and The data type is a floating point number. To obtain the final decompressed image, the result is rounded to an integer and clipped to a limited dynamic range of [0,255].

[0052] The calculation formulas for obtaining rounding error and truncation error are as follows:

[0053] (2)

[0054] (3)

[0055] The calculation formula for error normalization is as follows:

[0056] Error_norm=(max(error( y ij )-error( y ij )) / (max(error( y ij ))-min(error( y ij )))(4)

[0057] The formula for adding the normalized rounding error and truncation error to the error image is as follows:

[0058] (5)

[0059] in, is the resulting error image.

[0060] like Figure 2 As shown, the specific structure and parameter settings of the CNN network module of the dual-branch network of this embodiment are as follows: the CNN network module includes an input layer, seven stacked layers and an output layer, each stacked layer includes a convolutional layer (C), a BN layer (B) and a nonlinear activation function (R), and all convolutional layers use a 3×3 convolution kernel; the third stacked layer starts to use jump connections; the nonlinear activation function (R) uses a ReLU function.

[0061] like Figure 3 As shown, the Transformer network module of the CNN network module of the dual-branch network of this embodiment first performs linear projection on the error image, and then extracts spatial domain information through multi-head self-attention and multi-layer perceptron, and residual connections are used between each module.

[0062] like Figure 4 As shown in the figure, the fusion module of this embodiment consists of an attention mechanism and a convolution layer. First, the attention module aggregates the spatial dimensions (height H and width W) of the input feature map through a global average pooling operation to generate a global descriptor for each channel. Subsequently, the attention module recalibrates the channel features through a self-gating mechanism. The mechanism consists of two fully connected (FC) layers and a nonlinear activation function (usually Sigmoid): the first fully connected layer reduces the dimension of the channel descriptor and applies the ReLU activation function; the second fully connected layer maps it back to the original channel dimension and generates channel weights for re-weighting the input feature map. In this way, the attention module can selectively enhance information-rich features while suppressing irrelevant or redundant features, so that the model focuses on task-related areas. After the attention module, the convolution layer further extracts high-dimensional features and realizes feature dimensionality reduction, thereby improving the expressiveness and computational efficiency of the features. By combining the attention mechanism and the convolution operation, the fusion module can more effectively capture global and local features and improve the overall performance of the model.

[0063] like Figure 5 As shown, the classifier of this embodiment includes a global average pooling layer, a fully connected layer and a SoftMax layer. The fusion features are passed through the classifier to obtain the probability of the estimated offset of the pixel , is the interval [0, 1],

[0064]

[0065] At the same time, the cross entropy loss function is used as the loss function, and the network parameters are continuously optimized based on the loss function. The cross entropy loss is expressed as:

[0066] (8)

[0067] in, represents the true label of the sample, If it is 0, it means the JPEG image is a normal image. If it is 1, it means that the JPEG image is a steganographic image. represents the probability of the model predicting class 1 (the probability of a steganographic image), and N represents the number of samples.

Claims

1. A high-quality factor JPEG image steganalysis method based on a dual-branch network, characterized in that: The following steps are involved: Step 1: For the JPEG image to be analyzed, first convert it from the frequency domain to the spatial domain to obtain a non-rounded pixel value block without rounding or truncation. , then the non-rounded pixel value block Perform rounding and truncation operations to obtain rounding error and truncation error, and then normalize the rounding error and truncation error and add them to convert them into an error image; the specific method is: Step 1.1, calculate the rounding and truncation errors; first multiply the quantized DCT coefficients by the quantization table to perform dequantization operation, and then perform inverse DCT transformation to obtain the decompressed non-rounded pixel value block , and the non-rounded pixel value blocks Round to an integer and clip to a limited dynamic range of [0, 255]; then the error caused by the rounding operation is regarded as the rounding error rerror, and the part outside the range of [0, 255] is truncated, and the error caused by the truncation operation is called the truncation error terror; Step 1.2, normalize the truncation error and the rounding error respectively; finally, add the normalized truncation error and rounding error to obtain an error image; Step 2, construct and train a dual-branch network, input the JPEG image and the error image in step 1 into the trained dual-branch network, the dual-branch network includes a parallel Transformer network module and a CNN network module, extracts the frequency domain features of the JPEG image through the CNN network module, and extracts the spatial domain features of the error image through the Transformer network module; The specific structure and parameter settings of the CNN network module of the dual-branch network are as follows: the CNN network module includes an input layer, seven stacked layers and an output layer, each stacked layer includes a convolution layer C, a BN layer B and a nonlinear activation function R, and all convolution layers use a 3×3 convolution kernel; the third stacked layer of the stacked layer starts to use a jump connection; the nonlinear activation function R uses a ReLU function; The Transformer network module of the dual-branch network first performs linear projection on the error image, and then extracts spatial domain information through multi-head self-attention and multi-layer perceptron, and residual connections are used between modules; Step 3: The frequency domain features and spatial domain features are fused through the fusion module. The fused features are fed into the classifier. The offset probability of the pixels in the JPEG image is obtained through the Softmax layer. The offset probability is used to analyze whether it is steganographic.

2. The high-quality factor JPEG image steganalysis method based on a dual-branch network according to claim 1 is characterized in that: The non-rounded pixel value block is obtained in step 1 The calculation formula is as follows: (1) in, c is the quantized DCT coefficient, q is a quantization table; and The data type is a floating point number. To obtain the final decompressed image, the result is rounded to an integer and clipped to a limited dynamic range of [0, 255]; The calculation formulas for obtaining rounding error and truncation error are as follows: (2) (3) The calculation formula for error normalization is as follows: Error_norm=(max(error( y ij )-error( y ij )) / (max(error( y ij ))-min(error( y ij ))) (4) The formula for adding the normalized rounding error and truncation error to the error image is as follows: (5) in, is the resulting error image.

3. The high-quality factor JPEG image steganalysis method based on a dual-branch network according to claim 1 is characterized in that: The fusion module in step 3 fuses the frequency domain information extracted by the CNN network module and the spatial domain information extracted by the Transformer network module, and compresses and simplifies them; The specific fusion method of the fusion module is: First, the attention module aggregates the spatial dimensions of the input feature map through a global average pooling operation to generate a channel descriptor for each channel; then there is a self-gating mechanism consisting of two fully connected FC layers and a nonlinear activation function. The first FC layer reduces the dimension of the channel descriptor, and the second FC layer projects it back to the original channel dimension.

4. The high-quality factor JPEG image steganalysis method based on a dual-branch network according to claim 1 is characterized in that: The classifier includes a global average pooling layer, a fully connected layer and a SoftMax layer. The fusion features are passed through the classifier to obtain the probability of the estimated offset of the pixel. , is the interval [0, 1], ; At the same time, the cross entropy loss function is used as the loss function, and the network parameters are continuously optimized based on the loss function. The cross entropy loss is expressed as: (8) in, represents the true label of the sample, If it is 0, it means the JPEG image is a normal image. If it is 1, it means that the JPEG image is a steganographic image. represents the probability of the model predicting class 1, and N represents the number of samples.

Citation Information

Patent Citations

  • Method and system for estimating non-aligned recompressed image offset based on double-branch network

    CN117409064A

  • Image steganalysis method based on CNN and Transform

    CN117424963A