Image steganalysis method and device

By dividing the image into blocks according to texture complexity and optimizing the training parameters, the high false detection rate problem of the existing image steganalysis method is solved and a higher accuracy is achieved.

CN118447315BActive Publication Date: 2025-10-03SOUTH CHINA NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410575518.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-10
Publication Date
2025-10-03
Estimated Expiration
2044-05-10

AI Technical Summary

Technical Problem

The existing image steganalysis methods have a high false detection rate and are difficult to accurately distinguish between the secret image and the carrier image. This is mainly because the existing methods do not fully consider the texture characteristics of the image, resulting in difficulty in identifying the noise differences in the image blocks.

Method used

The image is divided into multiple image blocks of the same size and marked from large to small according to texture complexity. Residual information is obtained through multi-layer convolution and depth-wise separable convolution processing. The distance between the feature vectors of the image blocks is calculated, and the training parameters are optimized using the inter-block similarity loss function and the cross-entropy loss function to generate a two-dimensional feature vector for classification.

Benefits of technology

The accuracy of image steganalysis is improved, and it can more accurately identify secret images and carrier images, reducing the false positive rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118447315B_ABST
    Figure CN118447315B_ABST
Patent Text Reader

Abstract

The present invention relates to an image steganalysis method and apparatus, comprising the following steps: obtaining image information to be classified, dividing the image to be classified into n image blocks of equal size, where n ≥ 3; preprocessing each image block to obtain residual information for each image block; extracting a feature vector from the residual information of each image block; pairing the n image blocks according to texture complexity, calculating the distance between the feature vectors of each pair of image blocks to form an image block feature distance group; fusing the feature vectors of the n image blocks with the image block feature distance group to generate a fused feature vector; converting the fused feature vector into a two-dimensional feature vector, wherein the two-dimensional feature vector corresponds to the classification probability of the carrier image and the secret image; and determining the type of the image to be classified based on the two-dimensional feature vector. The image steganalysis method and apparatus of the present invention can increase the difference in steganographic signal characteristics between image blocks and has the advantage of high accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an image steganalysis method and device. Background Art

[0002] With the increasing importance of multimedia information security, steganography techniques such as S-UNIWARD (Spatial Universal Wavelet Relative Distortion) and WOW are often used to protect the security of private communications by hiding secret information in digital media for transmission. Steganalysis methods detect whether images contain illegal secret information (steganographic information), which helps police investigate crimes and effectively supports and maintains social security.

[0003] You et al. have proposed a steganalysis method using a Siamese neural network (SiaStegNet) (You W, Zhang H, Zhao X. A Siamese CNN for Image Steganalysis [J]. IEEE Transactions on Information Forensics and Security, 16:291-306, 2020). Existing image steganalysis methods divide an image into two equal-sized blocks, one on the left and one on the right. These blocks are then processed sequentially through preprocessing, feature extraction, and classification modules to identify the relationship between the noise levels of the different blocks. This determines whether the image contains stego information and classifies the image as either a secret image or a carrier image. The classification principle is that, since the embedded secret image changes the noise distribution, the noise content of the two blocks of the embedded secret image is dissimilar. However, the noise distribution of the carrier image, which does not contain secret information, remains unchanged, so the noise content of the two blocks of the carrier image is similar. By determining the difference in noise content between the two blocks, the image can be determined to be a secret image or a carrier image.

[0004] However, the existing image steganalysis methods still have the problem of high false detection rate, which is specifically manifested in that the secret image is identified as the carrier image. Summary of the Invention

[0005] Based on this, the purpose of the present invention is to overcome the defects or shortcomings of the prior art and provide an image steganalysis method and device, which has the advantage of high accuracy.

[0006] The image steganalysis method comprises the following steps:

[0007] Step S10: Obtain information of the image to be classified, and divide the image to be classified into n image blocks of the same size; where n≥3;

[0008] Step S20: performing multi-layer convolution preprocessing on each image block to obtain residual information of each image block;

[0009] Step S30: extracting a corresponding feature vector from the residual information of each image block;

[0010] Step S40: grouping n image blocks into image block pairs according to texture complexity, calculating the distance between the feature vectors of each pair of image blocks to form an image block feature distance group;

[0011] Step S50: Fusing the feature vectors of the n image blocks with the image block feature distance group to generate a fused feature vector; converting the fused feature vector into a two-dimensional feature vector, wherein the two-dimensional feature vector corresponds to the classification probabilities of the two classification results of the carrier image and the secret image;

[0012] Step S60: Determine the type of the image to be classified according to the two-dimensional feature vector.

[0013] The image steganalysis method of the present invention can increase the difference in steganalysis signal characteristics between image blocks and has the advantage of high accuracy.

[0014] Furthermore, step S40 specifically includes the steps of: pairing image blocks with adjacent texture complexity, pairing the image block with the largest texture complexity with the image block with the smallest texture complexity, and pairing the image blocks with the largest and smallest texture complexities in sequence until the image blocks are adjacent to each other or only one unpaired image block remains, calculating the distance between the feature vectors of each pair of image blocks to form an image block feature distance group.

[0015] Furthermore, n=4; in step S10, each image block is marked as a first complex block, a second complex block, a third complex block, and a fourth complex block in descending order of texture complexity;

[0016] In step S40, the image block feature distance group specifically includes: the distance between the feature vector of the first complex block and the feature vector of the second complex block; the distance between the feature vector of the third complex block and the feature vector of the fourth complex block; the distance between the feature vector of the first complex block and the feature vector of the fourth complex block; the distance between the feature vector of the second complex block and the feature vector of the third complex block.

[0017] Furthermore, the inter-block similarity loss function is used to calculate the similarity loss between the four image blocks. L sim, through similarity loss L sim adjusts the trainable parameters in steps S20 to S50 until the similarity loss L sim tends to converge, and the formula of the inter-block similarity loss function is as follows:

[0018]

[0019] in, L sim is the inter-block similarity loss function; m represents manually set hyperparameters; , represents the true label value, 0 represents the carrier image, and 1 represents the secret image; r 1. r 2 represent the feature vectors of the first complex block and the second complex block respectively, s 1. s 2 represent the feature vectors of the fourth complex block and the third complex block respectively.

[0020] Furthermore, the similarity loss between the four image blocks is calculated using the inter-block similarity loss function. L The steps after sim include:

[0021] Use the cross entropy loss function to calculate the classification loss of the image to be classified Lcls , the formula of the cross entropy loss function is as follows:

[0022]

[0023] in, L cls is the classification loss function; p represents the confidence level of the classification probability, p [0, 1]; represents the true label value, , =0 indicates the carrier image, =1 indicates a secret image;

[0024] Use the total loss function to convert the similarity loss L sim and classification loss L cls is merged into a total loss L, and the trainable parameters in steps S20 to S50 are adjusted by the total loss L until the total loss L converges. The formula of the total loss function is as follows:

[0025]

[0026] in, L is the total loss function; represents a hyperparameter.

[0027] Furthermore, the step S20 specifically includes: step S22: performing multi-scale convolution processing on each image block, comprehensively obtaining residual information of the overall image block and local details, and generating a channel map containing residual information; including using 25 3×3 convolution kernels and 5 5×5 convolution kernels for convolution processing.

[0028] Furthermore, after step S22, the method further includes: step S24: performing depth-wise separable convolution processing on each channel map to generate a residual map; the depth-wise separable convolution processing includes: first processing with a 3×3 convolution kernel and then with a 1×1 convolution kernel, performing normalization processing with a BN algorithm, activating data with an activation function, and generating 30 residual maps; the depth-wise separable convolution processing is performed twice, and in the first depth-wise separable convolution processing, processing is performed with a 3×3 convolution kernel and then with an ABS activation function; after each normalization processing, the data is activated with a TLU activation function.

[0029] Furthermore, the step S30 specifically includes: step S32: performing inverse residual processing on the residual information, the inverse residual processing sequentially including the processing of the first part, the second part, the SE attention part and the third part, the first part sequentially including a 1×1 convolution layer, a BN layer and a Relu6 activation function; the second part sequentially including a 3×3 convolution layer, a BN layer and a Relu6 activation function; the third part sequentially including a 1×1 convolution layer and a BN layer; the input of the first part and the output of the third part are added together to output the feature information of each image block.

[0030] Furthermore, the step S10 specifically includes:

[0031] Step S12: using the Sobel operator to process the image pixel map to obtain the gradient map of the image;

[0032] Step S14: using the peak value of the histogram of the gradient image as a threshold, performing thresholding on the gradient image to obtain a binary gradient image;

[0033] Step S16: Divide the image into four image blocks of equal size, calculate the ratio of white pixels to black pixels in each image block corresponding to the binary gradient map in the entire image, and mark each image block according to the ratio of white pixels, from large to small, as the first complex block, the second complex block, the third complex block, and the fourth complex block;

[0034] After step S24, the method further includes step S26: performing convolution and activation processing on the residual map to convert shallow layer information of the residual map into deep layer information; fusing the deep layer information after the convolution and activation processing with the shallow layer information before the convolution and activation processing to obtain residual information;

[0035] After step S32, the following steps are further included:

[0036] Step S34: performing convolution and activation processing on the feature information of each image block;

[0037] Step S36: using a pyramid pooling method to organically fuse feature information of different scales to obtain a high-level feature vector;

[0038] Step S38: compressing the high-level feature vector using a global average pooling method to obtain a feature vector of the image block;

[0039] The step S50 specifically includes:

[0040] Step S52: Fusing the feature vectors of the n image blocks of the image to be classified. The fusion formula is: , where Max represents the maximum value of the feature vectors of n image blocks, Min represents the minimum value of the feature vectors of n image blocks, Mean represents the mean of the feature vectors of n image blocks, Var represents the variance of the feature vectors of n image blocks, and F represents the fused feature vector of n image blocks; the fused feature vector F and the image block feature distance group are fused and spliced ​​into an image fusion feature vector;

[0041] Step S54: Convert the image fusion feature vector into a two-dimensional feature vector containing two elements, process the two-dimensional feature vector, output the classification probability, and output the confidence level. p , p In the range [0, 1];

[0042] Furthermore, an image steganalysis device is provided, comprising:

[0043] The image partitioning module is used to execute step S10: obtaining information of the image to be classified, and dividing the image to be classified into n image blocks of the same size; wherein n ≥ 3;

[0044] n steganalysis subnetworks sharing structures and parameters, wherein the number of the steganalysis subnetworks is equal to the number of blocks of the image to be classified; each steganalysis subnetwork includes a preprocessing module and a feature extraction module;

[0045] The preprocessing module is configured to execute step S20: performing multi-layer convolution preprocessing on each image block to obtain residual information of each image block;

[0046] The feature extraction module is configured to execute step S30: extracting a corresponding feature vector from the residual information of each image block;

[0047] a feature vector distance calculation module, configured to execute step S40: grouping n image blocks into image block pairs according to texture complexity, calculating the distance between the feature vectors of each pair of image blocks, and forming an image block feature distance group;

[0048] The classification module is configured to execute step S50: fusing the feature vectors of the n image blocks with the image block feature distance group to generate a fused feature vector; converting the fused feature vector into a two-dimensional feature vector, wherein the two-dimensional feature vector corresponds to the classification probabilities of the two classification results of the carrier image and the secret image;

[0049] The judgment module is used to execute step S60: judging the type of the image to be classified according to the two-dimensional feature vector.

[0050] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 Schematic diagram of the image steganalysis device of the present invention;

[0052] Figure 2 Flowchart of the image steganalysis method of the present invention. DETAILED DESCRIPTION

[0053] To address the problem of existing techniques easily misclassifying the stego image as the carrier image, the present inventors conducted the following analysis: In practice, statistical analysis of a large number of stego images containing steganographic information reveals that the stego signal content in the left and right image blocks of the same image gradually approaches equality, making it difficult to distinguish the differences in the stego signal characteristics between the left and right image blocks. This can lead to the noise in the two image blocks being perceived as similar, thus misclassifying the image as the carrier image. In reality, stego signals are often embedded in areas with complex texture to avoid detection. However, existing techniques simply divide the image into two equal blocks, without considering the image's texture characteristics. Therefore, when dividing the blocks, the stego signal is likely to be equally divided, making it difficult to distinguish the noise differences between the two blocks, resulting in a high misclassification rate.

[0054] Based on this, the present invention provides an image steganalysis method and device for increasing the difference in steganalysis signal characteristics between image blocks. The technical solution and beneficial effects of the present invention will be described in detail below with reference to the accompanying drawings.

[0055] See also Figures 1 and 2 , Figure 1 Schematic diagram of the image steganalysis device of the present invention; Figure 2This is a flow chart of the image steganalysis method of the present invention. The image steganalysis device of the present invention includes an image partitioning module 10, n steganalysis subnetworks 200 sharing a structure and parameters, a feature vector distance calculation module 40, a classification module 50, and a judgment module 60. Where n ≥ 3, each steganalysis subnetwork includes a preprocessing module 20 and a feature extraction module 30. The number of steganalysis subnetworks is equal to the number of image blocks after the image to be classified is partitioned by the image partitioning module 10. Preferably, four steganalysis subnetworks 200 are used as an example for detailed description in this embodiment.

[0056] The image partitioning module 10 is configured to execute step S10: obtaining information of an image to be classified, dividing the image to be classified into n (n ≥ 3) image blocks of equal size, and labeling each image block in descending order of texture complexity as a first complex block, a second complex block, and so on, an nth complex block. Preferably, n = 4, and labeling each image block in descending order of texture complexity as a first complex block, a second complex block, a third complex block, and a fourth complex block.

[0057] The pre-processing module 20 is configured to execute step S20: performing multi-layer convolution pre-processing on each image block to obtain residual information of each image block.

[0058] The feature extraction module 30 is configured to execute step S30: extracting a corresponding feature vector from the residual information of each image block.

[0059] The feature vector distance calculation module 40 is configured to execute step S40: pairing n image blocks according to texture complexity, calculating the distance between the feature vectors of each pair of image blocks to form an image block feature distance group. Specifically, the module 40 pairs image blocks with adjacent texture complexity, pairs the image block with the largest texture complexity with the image block with the smallest texture complexity, and sequentially pairs the image blocks with the next largest and smallest texture complexities until any two image blocks are adjacent or only one unpaired image block remains, and calculates the distance between the feature vectors of each pair of image blocks to form an image block feature distance group. The distance is a Euclidean distance.

[0060] In this embodiment, the number of image blocks is 4, so the image block feature distance group includes: the Euclidean distance between the feature vector of the first complex block and the feature vector of the second complex block, denoted as d 1; the Euclidean distance between the feature vector of the third complex block and the feature vector of the fourth complex block is recorded as d 2; The Euclidean distance between the feature vector of the first complex block and the feature vector of the fourth complex block is recorded as d 3; The Euclidean distance between the feature vector of the second complex block and the feature vector of the third complex block is recorded as d 4.

[0061] The classification module 50 is used to execute step S50: fusing the feature vectors of n image blocks and the image block feature distance group to generate a fused feature vector; converting the fused feature vector into a two-dimensional feature vector, wherein the two-dimensional feature vector corresponds to the classification probabilities of the two classification results of the carrier image and the secret image.

[0062] The determination module 60 is configured to execute step S60: determining the type of the image to be classified based on the two-dimensional feature vector. Specifically, 0 is used as the predicted label corresponding to the carrier image, and 1 is used as the predicted label corresponding to the secret image. The probabilities of the two classification results of the two-dimensional feature vectors are compared. When the probability of the classification result being the carrier image is greater, the subscript index of the image to be classified is output as 0, indicating that the image to be classified is the carrier image. When the probability of the classification result being the secret image is greater, the subscript index of the image to be classified is output as 1, indicating that the image to be classified is the secret image.

[0063] Wherein, step S10 specifically includes:

[0064] Step S11: Use the Sobel operator to process the image pixel map to obtain the gradient map of the image;

[0065] Step S12: using the peak value of the histogram of the gradient image as a threshold, performing thresholding on the gradient image to obtain a binary gradient image;

[0066] Step S13: Divide the image into four equal-sized image blocks. Calculate the proportion of white pixels to black pixels in each image block corresponding to the binarized gradient map. A greater proportion of white pixels indicates a more complex texture; a greater proportion of black pixels indicates a smoother texture. Each image block is labeled according to its texture complexity, from most complex to least complex. In some embodiments, the upper-left corner coordinates of each image block in the binarized gradient map are stored so that the upper-left corner coordinates of the corresponding four image blocks can be extracted from the pixel map during subsequent calculations. When the image is input to the preprocessing module, the varying degrees of texture in different regions of the image can be noted. In some embodiments, the image pixel map is 256×256, and a fixed window size of 128×128 is used for the binarized gradient map. The step size is the same as the window size, meaning that the image is divided into four equal-sized image blocks, each of which is 128×128 in size.

[0067] The pre-processing module 20 specifically includes a multi-scale filtering unit 22 , a depthwise separable convolution unit 24 , and an information fusion unit 26 .

[0068] The multi-scale filtering unit 22 is configured to perform step S22: performing multi-scale convolution processing on each image block, comprehensively obtaining residual information for both the overall image block and local details, and generating a channel map containing the residual information. Specifically, the multi-scale filtering unit 22 includes 25 3×3 convolution kernels and 5 5×5 convolution kernels, for a total of 30 convolution kernels. The 3×3 convolution kernels extract more subtle information, preventing the loss of steganographic information; while the 5×5 convolution kernels reflect information about the entire region, reducing interference from other information outside the steganographic signal. The 30 convolution kernels generate 30 residual features in different directions. After processing each image block by the multi-scale high-pass filtering unit 22, 30 channel maps containing residual information are generated. The corresponding image size is 128×128, and the number of channels is 30. Compared to conventional filtering units that directly use 30 5×5 convolution kernels, the multi-scale high-pass filtering unit 22 of the present invention extracts more subtle image information. The extracted subtle information and overall image information can help subsequent modules make more accurate judgments.

[0069] The depthwise separable convolution unit 24 is used to execute step S24: perform depthwise separable convolution processing on each channel map, integrate the information between multiple channel maps, enrich the residual features, and generate a residual map. Specifically, each channel map is subjected to two depthwise separable convolution processes, and each depthwise separable convolution process includes: processing 30 channel maps with 60 3×3×30 convolution kernels to obtain 60 convolved channel maps, and then using 30 1×1×60 convolution kernels, using the BN (Batch Normalization) algorithm for normalization, activating the data with an activation function, and generating 30 residual maps. During the depthwise separable convolution process, the depthwise separable convolution unit 24 integrates the information between the 30 channel maps and ensures that the input channel map and the output residual map have the same image size.

[0070] Since the steganographic signal embedding process can be viewed as adding low-amplitude additive noise to cover the image, the steganographic signal is characterized by low amplitude. Therefore, in this embodiment, the activation function after each normalization process is set to TLU (Threshold Logic Unit) to adapt to the application scenario of low-amplitude steganographic signals.

[0071] Furthermore, in the first depthwise separable convolution process, the 60 convolved channel maps are processed with an ABS (absolute value) activation function to take into account the symbolic symmetry of the residual image and improve the performance of the image steganalysis device.

[0072] Furthermore, in this embodiment, after the two depthwise separable convolutions, the following operation is further included: the 30 residual maps obtained after the two depthwise separable convolutions are correspondingly added to the 30 channel map features containing residual information obtained in step S22, completing information fusion of the channel maps to obtain a fused residual map. Information fusion can prevent the features of shallow steganographic signals from being lost after multiple processing, helping subsequent modules to make more accurate judgments.

[0073] Information fusion unit 26 is configured to execute step S26: performing convolution and activation processing on the residual map to convert shallow-layer information of the residual map into deep-layer information; and fusing the deep-layer information after convolution and activation processing with the shallow-layer information before convolution and activation processing to obtain residual information. Specifically, information fusion unit 26 includes three first convolution and activation processing layers, each of which is denoted as processing layer A. The information fusion unit 26 is configured to execute the following steps: processing the residual map data with a 3×3 convolution kernel, normalizing it with the BN algorithm, and activating the data with a ReLU (rectified linear unit) activation function; processing the activated data with a 3×3 convolution kernel and normalizing it with the BN algorithm; adding the output information of each processing layer A to the input information of each processing layer A, activating the data with the ReLU activation function, and outputting the data. After three rounds of convolution and activation processing, the residual information of the image is ultimately obtained.

[0074] The feature extraction module 30 specifically includes an inverse residual unit 32 , an information fusion and feature enrichment unit 34 , a pyramid pooling unit 36 ​​, and a global average pooling unit 38 .

[0075] The inverted residual unit 32 is used to perform step S32: extracting feature information of each image block from the residual information. Specifically, the residual information is subjected to inverted residual processing, which sequentially includes a first part, a second part, an SE ("compression-excitation") attention part, and a third part. The first part sequentially includes a 1×1 convolution layer, a BN layer, and a Relu6 activation function. The second part sequentially includes a 3×3 convolution layer, a BN layer, and a Relu6 activation function. The third part sequentially includes a 1×1 convolution layer and a BN layer. The input of the first part and the output of the third part are added together to output the feature information of each image block. In this case, the number of channels corresponding to the feature information is 30. Among them, the first part is used to increase the number of features and provide more sources of information; the second part is used to realize feature extraction, and during the extraction process, the feature information extraction between each residual map will not be interfered with each other; the third part compresses the number of features to the number at the time of input, ensuring that the number of features of the output is the same as that of the input, and subsequently the features before the inverse residual processing can be added and fused with the features after the processing to realize feature reuse, helping the network to learn and represent data more efficiently. The specific structure of the SE attention part between the second part and the third part is a common structure disclosed in the technology of this field and will not be repeated here. The SE attention part of the present invention can focus on the steganographic signal features of the complex texture area of ​​the image, extract more steganographic signals in the complex texture area of ​​the image, and increase the difference of the steganographic signals between the complex texture area of ​​the image and the smooth texture area.

[0076] The information fusion and feature enrichment unit 34 is configured to execute step S34: performing convolution and activation processing to fuse and enrich the feature information of the image block. Specifically, the information fusion and feature enrichment unit 34 sequentially comprises a second convolution and activation processing layer (denoted as processing layer B), processing layer A, processing layer B, and processing layer A. The structure of processing layer B is similar to that of processing layer A, except that the addition of the output information of processing layer B to the input information of processing layer B also includes a 1×1 convolution block to increase the number of image channels and reduce the image size, thereby enriching the residual features of each image block. After processing layers B and A once, the feature information corresponding to the image size is 64×64 with 64 channels; after processing layers B and A twice, the feature information corresponding to the image size is 32×32 with 128 channels. The addition of the output information of each processing layer to the input information of each processing layer is intended to enhance the stego signal and prevent the vanishing gradient problem in the neural network.

[0077] The pyramid pooling unit 36 ​​is configured to perform step S36: organically fuse feature information of different scales using a pyramid pooling method to obtain a high-level feature vector. Specifically, the pyramid pooling unit 36 ​​divides the feature into different sub-regions according to the depth of the feature, extracts representative features from each sub-region, and organically fuses the features to obtain a high-level feature vector. The high-level feature vector has a dimension of 128.

[0078] The global average pooling unit 38 is used to perform step S38: compress the high-level feature vector using the global average pooling method to extract the main features and reduce the number of parameters to prevent the overfitting problem of the neural network. The image size after dimensionality reduction is 1×1, the number of channels is 128, and the dimension of the feature vector is 128. The feature vector obtained at this time is the feature vector of the image block. r 1. r 2 represent the feature vectors of the first complex block and the second complex block respectively, and s 1. s 2 represent the feature vectors of the fourth complex block and the third complex block respectively.

[0079] The classification module 50 includes a fusion unit 52 and a classification unit 54 .

[0080] The fusion unit 52 is used to perform step S52: fusing the feature vectors of the n image blocks of the image to be classified. The fusion formula is: ,in, Max Represents the maximum value of the feature vectors of n image blocks, Min Represents the minimum value of the feature vector of n image blocks, Mean represents the mean of the feature vectors of n image blocks, Var represents the variance of the feature vectors of n image blocks, F represents the fusion feature vectors of n 128-dimensional image blocks; the fused image block feature vector F and the image block feature distance group are spliced ​​into an image fusion feature vector. In this embodiment, n=4, the fused image block feature vector F and the four Euclidean distances are spliced ​​into a single image fusion feature vector. d 1~ d 4 are concatenated into a 516-dimensional image fusion feature vector.

[0081] The classification unit 54 is specifically a fully connected layer, which is used to perform step S54: converting the 516-dimensional image fusion feature vector into a two-dimensional feature vector containing two elements, where each element represents the score or probability of a category. In this embodiment, the two-dimensional feature vector is processed using the Softmax function to output the classification probability, that is, the classification probability representing the two classification results of the carrier image and the secret image, so that the probabilities are both in the range of [0, 1] and the sum is 1, and the confidence level of the classification probability is calculated. p, p In the range [0, 1].

[0082] Since a pair of carrier images and secret images contain the same semantic information, but there are large semantic differences between different carrier images in the same category, this leads to a lack of distinctiveness in the image features. That is, the images for steganalysis have large intra-class differences and small inter-class differences, which affects the accuracy of image classification by steganalysis methods and devices.

[0083] In order to further improve the accuracy of image classification by the steganalysis method and device of the present invention, the present invention optimizes and trains the trainable parameters in steps S20 to S50 of the image steganalysis method, that is, optimizes and trains the trainable parameters in the preprocessing module 20, feature extraction module 30, feature vector distance calculation module 40 and classification module 50 of the steganalysis device.

[0084] Prior to training, a dataset is obtained, comprising carrier images without secret information and steganalyst images containing secret information. The dataset is derived from the BOSSBase1.01 dataset, which contains 10,000 512×512 images with varying degrees of texture. To reduce computational cost, in this embodiment, the images are resampled to 256×256 to increase training speed. Furthermore, to improve test performance, the dataset is obtained by uniformly resizing the images using the imresize function in Matlab with default parameters. The dataset is divided into a training set, a validation set, and a test set in a ratio of 6:1:3 for training set:validation set:test set. During training, the training set is input into a steganalysis device, and steps S10 to S50 are executed to obtain the feature vectors and image block feature distance group data for each image block output in step S40, as well as the confidence data for the classification probability output in step S50. The training set is used for multiple trainings. After each training, the validation set is input into the steganalysis device to verify the training effect, verify whether overfitting occurs, and adjust the training parameters. After the training is completed, the test set is input into the trained steganalysis device to test the training effect.

[0085] Specifically, during training, the Euclidean distance is used to measure the distance between each two feature vectors, and the inter-block similarity loss function is used to calculate the similarity between the four image blocks to obtain the similarity loss. L sim. The inter-block similarity loss function is shown in formula (1):

[0086]

[0087] in, L sim represents similarity loss; mrepresents manually set hyperparameters; represents the true label value, , =0 indicates the carrier image, =1 indicates a secret image; r 1. r 2 represent the feature vectors of the first complex block and the second complex block respectively, s 1. s 2 represent the feature vectors of the fourth complex block and the third complex block respectively.

[0088] The inter-block similarity loss function can increase the steganalytic signal extracted by the image steganalysis device, penalize the network's focus on image semantics, increase inter-class distances, and enhance both intra-class sample similarity and inter-class sample diversity. The steganalytic signal plays a key role in distinguishing between carrier and secret images. The more steganalytic signals a secret image's high-level feature vector contains, the more likely it is to reduce intra-class distances, thereby reducing the interference caused by semantic differences between carrier images within a class.

[0089] when y = 0, the inter-block similarity loss function trains the network to ignore the texture complexity and smoothness information of the carrier image, so as to reduce the semantic difference between the same type of carrier images, that is, to reduce the intra-class distance; when y = 1, the inter-block similarity loss function trains the network to make r 1 and s 1. r 2 and s The eigenvector of 2 is kept as m The difference in the steganalytic content between image blocks is increased, so that the high-level feature vector of the cryptanalytic image contains more steganalytic signals, that is, the distance between classes is widened.

[0090] In addition, the cross entropy loss function is used to evaluate the distance between the true label and the predicted label to obtain the classification loss L cls. The classification loss function is shown in formula (2):

[0091]

[0092] in, L cls represents classification loss; p represents the confidence level of the classification probability, p [0, 1]; , represents the true label value, 0 represents the carrier image, and 1 represents the secret image.

[0093] Next, use the total loss function to convert the similarity loss L sim and classification loss L cls is combined into a total loss L, and the calculation result of the total loss L is used as feedback information of the back-propagation algorithm to update the trainable parameters until the total loss L converges. The total loss function is shown in formula (3):

[0094]

[0095] In some embodiments, the inter-block similarity loss function can be used alone to train and optimize the trainable parameters. L The calculation result of sim is used as feedback information of the back propagation algorithm to update the trainable parameters until the similarity loss L sim tends to converge.

[0096] Effect testing

[0097] (1) Comparative experiment

[0098] This invention uses the accuracy rate Acc (Accuracy) as a measure of technical effect. The higher the accuracy rate, the higher the performance of the steganalysis detection method. The calculation formula of the accuracy rate is:

[0099]

[0100] Among them, C is the number of real carrier images, S is the number of real secret images; N is the number of carrier images classified by the device of the present invention, and P is the number of secret images classified by the device of the present invention.

[0101] The prior art SiaStegNet and the optimal embodiment (n=4) of the steganalysis method of the present invention were used to combat WOW and S-UNIWARD steganography. Comparative experiments were conducted at four embedding rates ranging from 0.1 bpp to 0.4 bpp to test the image classification accuracy Acc. The experimental results are shown in Table 1:

[0102] Table 1 Detection accuracy of SiaStegNet and the steganalysis method of the present invention against steganography

[0103]

[0104] The results show that, compared with the existing methods, the image classification accuracy of the proposed method against WOW and S-UNIWARD steganography under four embedding rate conditions is higher than the accuracy of the existing methods under the same conditions.

[0105] (2) Ablation Study

[0106] Ablation experiments gradually remove certain components of the neural network to study their impact on device performance. Specifically, ablation experiments were conducted against S-UNIWARD steganography at a 0.4 bpp embedding rate. The experiments explored the differences in steganographic signal characteristics between blocks with complex textures and blocks with smooth textures, after the present invention partitioned the image into blocks and sorted them by texture complexity. The results also explored the impact of the inter-block similarity loss function designed by the present invention on device performance.

[0107] The experiment was divided into four groups: Control Group 1, Experimental Group 1, Experimental Group 2, and Experimental Group 3. Experimental Group 1 was the optimal embodiment of the present invention (n=4). The difference between Control Group 1 and Experimental Group 1 was that two image blocks corresponding to the left and right of the image block were paired together, i.e., the image block located in the upper left was paired with the image block located in the upper right, and the image block located in the lower left was paired with the image block located in the lower right. The distance between the feature vectors of each pair of image blocks was calculated, and the similarity loss function of SiaStegNet was used. The difference between Experimental Group 2 and Experimental Group 1 was that the similarity loss function of SiaStegNet was used. The difference between Experimental Group 3 and Experimental Group 1 was that two image blocks corresponding to the left and right of the image block were paired together, and the distance between the feature vectors of each pair of image blocks was calculated. All other experimental conditions were the same for all groups. For experimental results, please refer to Table 2.

[0108] It should be noted that since the SiaStegNet network in the prior art only divides the image into two left and right image blocks, it is not convenient to compare with the optimal embodiment of the present invention. Therefore, in the experiment of the present invention, each group of images is divided into four blocks. When using the loss function of SiaStegNet, the similarity loss of each of the two pairs of image blocks composed of the left and right image blocks is calculated, and the average is taken as the final similarity loss.

[0109] Table 2 Comparison of texture complexity and the impact of the designed loss function on detecting S-UNIWARD steganography

[0110]

[0111] The results show that the classification accuracy corresponding to the differences in the steganographic signal features between image blocks according to the complexity of the image block texture is significantly improved. When the inter-block similarity loss function is combined with the uniform distribution of the image according to the complexity of the texture, the classification accuracy is the highest, reaching 91.71%. This shows that comparing the differences in the steganographic signal features between image blocks according to the complexity of the image block texture and using the inter-block similarity loss function have a more obvious effect on improving the classification accuracy of the method of the present invention.

[0112] Based on the same inventive concept, the present application also provides an electronic device, which can be a terminal device such as a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). The device includes one or more processors and a memory, wherein the processor is configured to execute a program to implement the image steganalysis method of the present invention; and the memory is configured to store a computer program executable by the processor.

[0113] Based on the same inventive concept, the present application also provides a computer-readable storage medium, corresponding to the embodiment of the aforementioned image steganalysis method, wherein the computer-readable storage medium stores a computer program thereon, and when the program is executed by a processor, the steps of the image steganalysis method described in any of the aforementioned embodiments are implemented.

[0114] The present application may take the form of a computer program product implemented on one or more storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-usable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. The information can be computer-readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include but are not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

[0115] Compared to existing techniques, the present invention divides the image into blocks and labels them according to their texture complexity. By comparing blocks with complex textures with blocks with smooth textures, the differences in steganographic signal characteristics between blocks are increased. A new loss function, the inter-block similarity loss function, is proposed to effectively train the present invention's device, amplifying the differences in steganographic signal content between blocks and effectively distinguishing semantic edges from steganographic signals in an image, thereby improving the accuracy of the present invention's image classification method. Furthermore, a multi-scale high-pass filtering unit and a depthwise separable convolution unit are employed in the preprocessing module to enhance residual information. In the feature extraction module, an inverted residual unit with an attention module and a pyramid pooling unit are used to extract rich steganographic signals, increasing the total content of the extracted steganographic signals and further improving the accuracy of the present invention's image classification method.

[0116] The above-described embodiments merely represent several implementations of the present invention. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make numerous modifications and improvements without departing from the spirit of the present invention, and the present invention is intended to encompass such modifications and variations.

Claims

1. An image steganalysis method, characterized in that: The following steps are involved: Step S10: Obtain information of the image to be classified, and divide the image to be classified into n image blocks of the same size; where n≥3; Step S20: performing multi-layer convolution preprocessing on each image block to obtain residual information of each image block; Step S30: extracting a corresponding feature vector from the residual information of each image block; Step S40: grouping n image blocks into image block pairs according to texture complexity, calculating the distance between the feature vectors of each pair of image blocks to form an image block feature distance group; Step S50: Fusing the feature vectors of the n image blocks with the image block feature distance group to generate a fused feature vector; converting the fused feature vector into a two-dimensional feature vector, wherein the two-dimensional feature vector corresponds to the classification probabilities of the two classification results of the carrier image and the secret image; Step S60: determining the type of the image to be classified according to the two-dimensional feature vector; When n=4, each image block is marked as the first complex block, the second complex block, the third complex block, and the fourth complex block in descending order of texture complexity; the image block feature distance group specifically includes: the distance between the feature vector of the first complex block and the feature vector of the second complex block; the distance between the feature vector of the third complex block and the feature vector of the fourth complex block; the distance between the feature vector of the first complex block and the feature vector of the fourth complex block; the distance between the feature vector of the second complex block and the feature vector of the third complex block; Use the inter-block similarity loss function to calculate the similarity loss L between the four image blocks sim , through the similarity loss L sim The trainable parameters in steps S20 to S50 are adjusted until the similarity loss L sim Tends to converge, the formula of the inter-block similarity loss function is as follows: Among them, L sim is the inter-block similarity loss function; m represents an artificially set hyperparameter; y∈{0,1} represents the true label value, 0 represents the carrier image, and 1 represents the secret image; r1 and r2 represent the feature vectors of the first and second complex blocks respectively, and s1 and s2 represent the feature vectors of the fourth and third complex blocks respectively.

2. The image steganalysis method according to claim 1, characterized in that: The step S40 specifically includes the steps of pairing image blocks with adjacent texture complexity, pairing the image block with the largest texture complexity with the image block with the smallest texture complexity, and sequentially pairing the image blocks with the next largest and smallest texture complexities until the image blocks are adjacent to each other or only one unpaired image block remains, and calculating the distance between the feature vectors of each pair of image blocks to form an image block feature distance group.

3. The image steganalysis method according to claim 1, wherein: The similarity loss L between the four image blocks is calculated using the inter-block similarity loss function sim The next steps include: Use the cross entropy loss function to calculate the classification loss L of the image to be classified cls , the formula of the cross entropy loss function is as follows: Among them, L cls is the classification loss function; p represents the confidence of the classification probability, p∈[0,1]; y represents the true label value, y∈{0,1}, y=0 represents the carrier image, and y=1 represents the secret image; Use the total loss function to convert the similarity loss L sim and classification loss L cls The total loss L is aggregated and the trainable parameters in steps S20 to S50 are adjusted by the total loss L until the total loss L converges. The formula of the total loss function is as follows: L=L cls (p,y)+λL sim (3) Where L is the total loss function and λ is the hyperparameter.

4. The image steganalysis method according to any one of claims 1 to 3, characterized in that: The step S20 specifically includes: step S22: performing multi-scale convolution processing on each image block, comprehensively obtaining residual information of the entire image block and local details, and generating a channel map containing the residual information; including using 25 3×3 convolution kernels and 5 5×5 convolution kernels for convolution processing.

5. The image steganalysis method according to claim 4, characterized in that: After step S22, the method also includes: step S24: performing depth-wise separable convolution processing on each channel map to generate a residual map; the depth-wise separable convolution processing includes: first processing with a 3×3 convolution kernel and then with a 1×1 convolution kernel, normalizing with a BN algorithm, activating the data with an activation function, and generating 30 residual maps; the depth-wise separable convolution processing is performed twice, and in the first depth-wise separable convolution processing, processing is performed with a 3×3 convolution kernel and then with an ABS activation function; after each normalization process, the data is activated with a TLU activation function.

6. The image steganalysis method according to claim 5, characterized in that: The step S30 specifically includes: step S32: performing inverse residual processing on the residual information, the inverse residual processing includes processing of the first part, the second part, the SE attention part and the third part in sequence, the first part includes a 1×1 convolution layer, a BN layer and a Relu6 activation function in sequence; the second part includes a 3×3 convolution layer, a BN layer and a Relu6 activation function in sequence; the third part includes a 1×1 convolution layer and a BN layer in sequence; the input of the first part and the output of the third part are added together to output the feature information of each image block.

7. The image steganalysis method according to claim 6, characterized in that: The step S10 specifically includes: Step S12: using the Sobel operator to process the image pixel map to obtain the gradient map of the image; Step S14: using the peak value of the histogram of the gradient image as a threshold, performing thresholding on the gradient image to obtain a binary gradient image; Step S16: Divide the image into four image blocks of equal size, calculate the ratio of white pixels to black pixels in each image block corresponding to the binary gradient map in the entire image, and mark each image block according to the ratio of white pixels, from large to small, as the first complex block, the second complex block, the third complex block, and the fourth complex block; After step S24, the method further includes step S26: performing convolution and activation processing on the residual map to convert shallow layer information of the residual map into deep layer information; fusing the deep layer information after the convolution and activation processing with the shallow layer information before the convolution and activation processing to obtain residual information; After step S32, the following steps are further included: Step S34: performing convolution and activation processing on the feature information of each image block; Step S36: using a pyramid pooling method to organically fuse feature information of different scales to obtain a high-level feature vector; Step S38: compressing the high-level feature vector using a global average pooling method to obtain a feature vector of the image block; The step S50 specifically includes: Step S52: Fusing the feature vectors of the n image blocks of the image to be classified, using the fusion formula: F = {Max, Min, Mean, Var}, where Max represents the maximum value of the feature vectors of the n image blocks, Min represents the minimum value of the feature vectors of the n image blocks, Mean represents the mean of the feature vectors of the n image blocks, Var represents the variance of the feature vectors of the n image blocks, and F represents the fused feature vector of the n image blocks; fusing the fused feature vector F and the image block feature distance group to form a fused image feature vector; Step S54: converting the image fusion feature vector into a two-dimensional feature vector containing two elements, processing the two-dimensional feature vector, outputting the classification probability, and outputting the confidence p, where p is in the range of [0, 1].

8. An image steganalysis device, characterized in that: include: The image partitioning module is used to obtain the information of the image to be classified and divide the image to be classified into n image blocks of the same size; where n ≥ 3; n steganalysis subnetworks sharing structures and parameters, wherein the number of the steganalysis subnetworks is equal to the number of blocks of the image to be classified; each steganalysis subnetwork includes a preprocessing module and a feature extraction module; The preprocessing module is used to perform multi-layer convolution preprocessing on each image block to obtain residual information of each image block; The feature extraction module is used to extract the corresponding feature vector from the residual information of each image block; A feature vector distance calculation module is used to group n image blocks into image block pairs according to texture complexity, calculate the distance between the feature vectors of each pair of image blocks, and form an image block feature distance group; A classification module is configured to fuse the feature vectors of the n image blocks with the image block feature distance group to generate a fused feature vector; convert the fused feature vector into a two-dimensional feature vector, wherein the two-dimensional feature vector corresponds to the classification probabilities of the two classification results of the carrier image and the secret image; A judgment module, used to judge the type of the image to be classified based on the two-dimensional feature vector; When n=4, each image block is marked as the first complex block, the second complex block, the third complex block, and the fourth complex block in descending order of texture complexity; the image block feature distance group specifically includes: the distance between the feature vector of the first complex block and the feature vector of the second complex block; the distance between the feature vector of the third complex block and the feature vector of the fourth complex block; the distance between the feature vector of the first complex block and the feature vector of the fourth complex block; the distance between the feature vector of the second complex block and the feature vector of the third complex block; Use the inter-block similarity loss function to calculate the similarity loss L between the four image blocks sim , through the similarity loss L sim The trainable parameters in steps S20 to S50 are adjusted until the similarity loss L sim Tends to converge, the formula of the inter-block similarity loss function is as follows: Among them, L sim is the inter-block similarity loss function; m represents an artificially set hyperparameter; y∈{0,1} represents the true label value, 0 represents the carrier image, and 1 represents the secret image; r1 and r2 represent the feature vectors of the first and second complex blocks respectively, and s1 and s2 represent the feature vectors of the fourth and third complex blocks respectively.

Citation Information

Patent Citations

  • Video steganography method, system and device based on macro block complexity

    CN111711822A

  • Image steganography based on texture fusion feature block matching and large embedding rate product code

    CN115049715A