Image steganography method based on generative adversarial network
The image steganography method constructed by generative adversarial networks solves the problem of insufficient security in existing image steganography methods, and improves adversarial detection and visual quality. The generated steganographic images are visually imperceptible and can resist various steganalysis methods.
Patent Information
- Application Number
- CN202211487022.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-24
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-11-24
AI Technical Summary
Existing image steganography methods are poor at resisting deep steganalysis and have a significant impact on the visual characteristics of the carrier image, resulting in insufficient security.
A generative adversarial network-based image steganography method is adopted. A generator network and a discriminator network with a U-Net encoder-decoder architecture are constructed. The ideal embedding is simulated by a double-tanh function. The loss function is designed by combining cross-entropy loss, embedding capacity, visual similarity and high-pass filtering error. The generator is trained to generate detection-resistant steganalytic images.
It effectively resists detection by both deep and traditional steganalysis, improving the anti-detection and visual quality of image steganography methods and ensuring that encrypted images remain imperceptible.
Smart Images

Figure CN115731088B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of multimedia information security, and relates to an image steganography method based on a generative adversarial network. BACKGROUND
[0002] With the development of computer technology and the wide popularity of the Internet, people can easily obtain information through the Internet. The rapid development of big data and cloud computing technology also provides great convenience for people to obtain, store and share information. At the same time, as the most intuitive and convenient way to carry information, multimedia, especially images, has been widely used in the Internet. However, the continuous development of Internet technology not only brings convenience to people, but also brings a series of security and privacy problems. Due to the openness of the Internet, secret information transmitted by people may be intercepted by attackers, and personal privacy information may be leaked. Therefore, information security has become a hot research topic.
[0003] Currently, there are three methods for protecting information security: secure channel, encryption technology and steganography. Although the transmission through the secure channel has the highest secrecy, it is not suitable for using cloud storage to obtain and save secret information. Encryption technology is one of the most important privacy protection methods in the field of information security, which protects user private information from illegal browsing through encryption algorithms. However, directly sending ciphertext in an insecure channel cannot hide the behavior of secret communication, which may lead to the discovery and attack of encryption behavior. Steganography has a hiding effect on both the content of secret information and the behavior of secret communication. Steganography usually hides secret information in character, audio, image or video media carriers, making it become the "noise" of the carrier, so as to transmit the secret through the network. Therefore, steganography has a wide application prospect in the field of multimedia digital images.
[0004] Traditional non-adaptive steganography methods started in the 1990s. With the in-depth research of scholars in recent years and the rapid development of deep learning, adaptive steganography and deep steganography methods have been proposed. At the same time, a series of steganalysis methods have also been proposed to analyze whether the carrier hides secret information. Therefore, how to more efficiently hide secret information and resist steganalysis attacks has very important research value. However, there are still the following deficiencies in the existing image steganography methods:
[0005] (1) Adaptive steganography methods define the modification cost according to the characteristics of the carrier image, and select pixels for embedding secret information according to a certain method, so that the final embedding cost is as low as possible. However, the existing adaptive steganography methods have poor resistance to deep steganography, which has hidden dangers in security.
[0006] (2) The existing deep steganography method automatically extracts image features through a convolutional neural network, and then generates a stego image through a neural network or constructs a probability model to embed secret information to obtain a stego image. However, the existing method is relatively simple in network design, and the feature information of the carrier image is not fully extracted. At the same time, when designing the loss function, most of them do not consider the influence of image visual characteristics, and the embedded information has a great influence on the visual quality of the stego image. SUMMARY
[0007] To solve the above technical problems, the purpose of the present application is to provide an image steganography method based on a generative adversarial network, which can effectively resist deep and traditional steganalysis attacks and enhance the anti-detection performance of the steganography method.
[0008] The present application provides an image steganography method based on a generative adversarial network, comprising:
[0009] Step 1: Use a large convolution kernel and construct a generator network based on a U-Net encoder-decoder architecture without using complex network structure and deconvolution, and a discriminator network for adversarial training;
[0010] Step 2: input the carrier image into the generator to generate an embedding probability model, simulate ideal embedding through a double-tanh function to obtain a simulated stego image, and use cross-entropy to construct a discriminator loss function to train the discriminator;
[0011] Step 3: based on the cross-entropy loss of the discriminator, the embedding capacity, the image visual similarity and the high-pass filter error, design the loss function of the generator and train the generator;
[0012] Step 4: repeat steps 2 and 3, and iterate the generator and discriminator multiple times until the entire training is completed;
[0013] Step 5: use the trained generative adversarial network and STC encoder to generate a stego image.
[0014] In the image steganography method based on the generative adversarial network of the present application, the step 1 is specifically:
[0015] Step 1.1: build a generator network based on a U-Net architecture, including a plurality of encoder modules and decoder modules connected in sequence;
[0016] Step 1.2: build a discriminator network based on a deep steganalysis network SRNet.
[0017] In the image steganography method based on the generative adversarial network of the present application, a multi-layer convolution stack deep network structure is used in the encoder, and a large convolution kernel is used instead of a small convolution kernel to extract deeper image information, and the activation function of the encoder uses ReLU6.
[0018] In the image steganography method based on the generative adversarial network, the up-sampling and convolution structure are used in the decoder, and the deconvolution is not used, so as to avoid the chessboard effect of the generated result.
[0019] In the image steganography method based on the generative adversarial network, the step 2 is specifically as follows:
[0020] Step 2.1: input the carrier image into the generator network in batches, and generate embedding probabilities of a batch of carrier images;
[0021] Step 2.2: embedding random information into the carrier image by using an ideal embedding model and a double-tanh function as an embedding simulator, to obtain a simulated stego image;
[0022] Step 2.3: input the carrier image and the simulated stego image into the discriminator at the same time, calculate the cross-entropy loss according to the output result of the discriminator, and minimize the cross-entropy.
[0023] In the image steganography method based on the generative adversarial network, the double-tanh function is mathematically expressed as:
[0024] m i,j =-0.5×tanh(λ×(p i,j -2×r i,j ))+0.5×tanh(λ×(p i,j -2×(1-r i,j )))
[0025] Wherein, p i,j is the embedding probability corresponding to the (i,j) pixel of the carrier image, r i,j is the value of the (i,j) point of the random matrix uniformly distributed in the range [0,1], m i,j is the simulated embedding result, and λ is a control factor.
[0026] In the image steganography method based on the generative adversarial network, the loss function of the discriminator is as follows:
[0027]
[0028] Wherein, n is the size of the batch, t i is a label indicating the stego image and the carrier image, y i is the output result of the discriminator.
[0029] In the image steganography method based on the generative adversarial network, the step 3 is specifically as follows:
[0030] Step 3.1: construct the loss function of the generator as follows:
[0031] l = 0.6932 - l D + 10 -7 xl C + 120xl S + 0.0003xl F
[0032] wherein, l D is the cross-entropy loss of the discriminator, l C is the capacity loss of the embedded information, l S is the visual similarity loss of the carrier image and the simulated stegano image, l F is the mean square error loss of the high-pass filtering results of the carrier image and the simulated stegano image.
[0033] Step 3.2: Calculate the capacity loss l C of the embedded information by the following formula:
[0034]
[0035] wherein, and are the probabilities of embedding +1, -1 and not embedding respectively, H and W are the width and height of the image respectively, and q is the embedding rate.
[0036] Step 3.3: Calculate the visual similarity loss l S of the carrier image and the simulated stegano image based on MS-SSIM:
[0037]
[0038] wherein, c and s represent the carrier image and the simulated stegano image respectively, L M (x, y) is the luminance contrast function, C j (x, y) is the contrast contrast function, S j (x, y) is the structure contrast function, M is the maximum down-sampling scale, j is the current scale, α M , β j and γ j are used to adjust the weights of each element respectively.
[0039]
[0040]
[0041] wherein, u x and u y represent the pixel mean of the carrier image and the simulated stegano image respectively, σ x and σ y are the variances of the pixels of the carrier image and the simulated stegano image, σxy Covariance, C1, C2 and C3 are constants;
[0042] Step 3.4: Before calculating l F , high-pass filtering is performed on the carrier image and the stego image, that is, a filter matrix is used as a convolution kernel to perform convolution operation on the images; the filter matrix is designed based on 34 high-pass filters of the SRM steganalysis method, and then the filtering result is used to calculate the mean square error as the loss according to the following formula:
[0043]
[0044] Wherein, c i and s i are the filtering results of the carrier image and the simulated stego image, and n is the size of the batch.
[0045] In the image steganography method based on the generative adversarial network of the application, the step 5 is specifically:
[0046] Step 5.1: loading the generator network and the trained weight, reading the original carrier image to be embedded with secret information in order;
[0047] Step 5.2: setting the required steganography embedding rate, inputting the original carrier image into the generator network to obtain the embedding probability, and then converting the embedding probability into the embedding cost by the following formula:
[0048]
[0049] Wherein, p i,j is the embedding cost corresponding to the (i,j) pixel of the carrier image, and p i,j is the embedding probability corresponding to the (i,j) pixel of the carrier image;
[0050] Step 5.3: repeating step 5.2 until the embedding cost of all original carrier images is obtained;
[0051] Step 5.4: embedding secret information, inputting the original carrier image, the embedding rate, the embedding cost and the secret information into the STC to obtain the stego image.
[0052] The image steganography method based on the generative adversarial network of the application has at least the following beneficial effects:
[0053] 1. For the problem of anti-detection of the steganography method, the carrier image and the stego image are input into the discriminator, and the two are filtered through the high-pass filter and the mean square error is calculated. The output results of the two are used as part of the loss function, so that the stego image can confuse the discrimination of the discriminator, and the high-frequency information of the stego image is more similar to the original carrier image, which can effectively resist the detection of deep and traditional steganalysis.
[0054] 2. To solve the problem that the deep steganography method has a greater impact on visual characteristics, the present application is designed based on a probability model, secret information is embedded into the original carrier image through a ternary syndrome trellis encoder STC, a stego image is generated without using a neural network, and the present application does not use deconvolution in network design and does not introduce a checkerboard effect in network output, thereby reducing the impact on the stego image. In the training process, the present application adds MS-SSIM as a visual feature to the loss function of the generator, thereby suppressing the impact of steganography on visual features. Meanwhile, the MS-SSIM loss and the high-pass filtered mean square error balance each other, thereby improving the anti-detection performance of the steganography method. BRIEF DESCRIPTION OF DRAWINGS
[0055] Figure 1 is a flowchart of the image deep steganography method;
[0056] Figure 2 is a general framework of the image deep steganography;
[0057] Figure 3 is a structure diagram of the generator network;
[0058] Figure 4 is a structure diagram of the discriminator network;
[0059] Figure 5a is a carrier image numbered 270 in the verification set;
[0060] Figure 5b is a carrier image numbered 611 in the verification set;
[0061] Figure 5c is a carrier image numbered 7693 in the verification set;
[0062] Figure 5d is Figure 5a is a simulated stego image simulating embedding of random information at an embedding rate of 0.2 bpp;
[0063] Figure 5e is Figure 5b is a simulated stego image simulating embedding of random information at an embedding rate of 0.2 bpp;
[0064] Figure 5f is Figure 5c is a simulated stego image simulating embedding of random information at an embedding rate of 0.2 bpp;
[0065] Figure 5g is Figure 5a is a stego image embedding random information using ternary STC at an embedding rate of 0.2 bpp;
[0066] Figure 5h isFigure 5b Stego image with random information embedded using ternary STC at 0.2 bpp embedding rate;
[0067] Figure 5i For Figure 5c Stego image with random information embedded using ternary STC at 0.2 bpp embedding rate;
[0068] Figure 5j For Figure 5a Simulated stego image with random information embedded at 0.4 bpp embedding rate;
[0069] Figure 5k For Figure 5b Simulated stego image with random information embedded at 0.4 bpp embedding rate;
[0070] Figure 5l For Figure 5c Simulated stego image with random information embedded at 0.4 bpp embedding rate;
[0071] Figure 5m For Figure 5a Stego image with random information embedded using ternary STC at 0.4 bpp embedding rate;
[0072] Figure 5n For Figure 5b Stego image with random information embedded using ternary STC at 0.4 bpp embedding rate;
[0073] Figure 5o For Figure 5c Stego image with random information embedded using ternary STC at 0.4 bpp embedding rate. DETAILED DESCRIPTION
[0074] The present application uses a generator to generate steganographic embedding probability of carrier images, uses a double-tanh function to simulate an ideal embedding model in training, embeds a pseudo-random message sequence into a carrier image to obtain a simulated stego image, and then obtains a discrimination output through a discriminator. The generator network in the present application is based on a U-Net architecture, and through an end-to-end encoder-decoder structure, the original image features are first extracted, and then the embedding probability is generated. The encoder does not use dense connection to ensure the lightweight of the network, and uses a larger convolution kernel to efficiently extract deep features of the original image, while reducing the depth of the generator network while ensuring good accuracy. At the same time, the present application adds a high-pass filter module and a multi-scale structural similarity (MS-SSIM) to the loss function of the generator network, which effectively resists traditional steganalysis attacks while reducing the loss of image visual characteristics. After the network training is completed, the present application converts the embedding probability generated by the generator into embedding cost when generating a stego image, and finally encodes the secret information through a ternary syndrome code (STC) to obtain a stego image.
[0075] The present application is an image depth steganography method based on a generative adversarial network, and its flowchart is as shown in Figure 1 The overall framework of the method is as shown in Figure 2 Specifically, the following steps are included:
[0076] Step 1: using a large convolution kernel and without using complex network structure and deconvolution, a generator network based on U-Net encoder-decoder architecture and a discriminator network for adversarial training are constructed, and the step 1 is specifically:
[0077] Step 1.1: the generator network is constructed based on U-Net architecture, including a plurality of encoder modules and decoder modules connected in sequence, and the structure diagram is as shown in Figure 3 The corresponding specific parameters are shown in Table 1. Groups 1-21 of the network are encoder modules, and groups 22-30 are decoder modules.
[0078] In the encoder module, a multi-layer convolution stack deep network structure is used, and a large convolution kernel is used to extract deeper image information, instead of a small convolution kernel to avoid the problem of too deep network depth. The activation function of the encoder module uses ReLU6 to avoid the value being too large after activation, which affects the stability of the model. In the decoder module, an up-sampling and convolution structure is used, and deconvolution is not used to avoid the checkerboard effect of the generated result.
[0079] Table 1: Specific parameters of the generator network
[0080]
[0081]
[0082] Step 1.2: Construct the discriminator network based on the deep steganalysis network SRNet, and the structure diagram is as shown in Figure 4 Pre-trained weights based on natural images are needed to be preloaded before training.
[0083] Step 2: Input the carrier image into the generator to generate an embedding probability model, simulate ideal embedding through a double-tanh function to obtain a simulated stego image, and use cross-entropy to construct a discriminator loss function to train the discriminator, and the step 2 is specifically:
[0084] Step 2.1: Randomly input the carrier image into the generator network in batches to generate embedding probabilities of a batch of carrier images;
[0085] Step 2.2: Use the ideal embedding model to embed random information into the carrier image through a double-tanh function as an embedding simulator to obtain a simulated stego image;
[0086] The double-tanh function can effectively avoid the gradient disappearance problem in training due to its continuity, and the mathematical expression is:
[0087] m i,j =-0.5×tanh(λ×(p i,j -2×r i,j ))+0.5×tanh(λ×(p i,j -2×(1-r i,j )))
[0088] Wherein, p i,j is the embedding probability of the (i, j) pixel of the carrier image, r i,j is a random matrix (i, j) value with a value range of [0, 1] uniformly distributed, m i,j is the simulated embedding result, and λ is a control factor, and in the present application, λ=60.
[0089] Step 2.3: Input the carrier image and the simulated stego image into the discriminator at the same time, calculate the cross-entropy loss according to the output result of the discriminator whether the image is stego or not, and minimize the cross-entropy.
[0090] The discriminator loss function is as follows:
[0091]
[0092] Wherein, n is the size of the batch, t i is a label representing a stego image and a carrier image, and y i is the output result of the discriminator.
[0093] Step 3: design the loss function of the generator based on the cross-entropy loss of the discriminator, the embedding capacity, the visual similarity of the image, and the high-pass filtering error, and train the generator, specifically as follows:
[0094] Step 3.1: construct the loss function of the generator as follows:
[0095] l = 0.6932 - l D + 10 -7 × l C + 120 × l S + 0.0003 × l F
[0096] wherein l D is the cross-entropy loss of the discriminator, l C is the capacity loss of the embedded information, l S is the visual similarity loss of the carrier image and the simulated stegano image, and l F is the mean square error loss of the high-pass filtering results of the carrier image and the simulated stegano image.
[0097] Step 3.2: calculate the capacity loss l C of the embedded information by the following formula:
[0098]
[0099] wherein p and p are the probabilities of embedding +1, -1 and not embedding, respectively, H and W are the width and height of the image, respectively, and q is the embedding rate.
[0100] Step 3.3: calculate the visual similarity loss l S of the carrier image and the simulated stegano image based on MS-SSIM as follows:
[0101]
[0102] wherein c and s represent the carrier image and the simulated stegano image, respectively, L M (x, y) is the luminance contrast function, C j (x, y) is the contrast contrast function, S j (x, y) is the structure contrast function, M is the maximum down-sampling scale, j is the current scale, and α M , β j , and γ j are used to adjust the weights of the elements, respectively.
[0103]
[0104] wherein u x and u yrespectively represent the mean of the pixels of the cover image and the simulated stego image, σ x and σ y are the variances of the pixels of the cover image and the simulated stego image, σ xy is the covariance, C1, C2 and C3 are constants;
[0105] Step 3.4: Before calculating l F , the cover image and the stego image are high-pass filtered, that is, the filter matrix is used as the convolution kernel to perform convolution operation on the images; the filter matrix is designed based on the 34 high-pass filters of the SRM steganalysis method, and then the obtained filtering results are squared error according to the following formula as loss;
[0106]
[0107] where c i and s i are the filtering results of the cover image and the simulated stego image respectively, and n is the size of the batch.
[0108] Step 4: Repeat steps 2 and 3, and iterate the generator and the discriminator 100000 times until the entire training is completed;
[0109] Step 5: Use the trained generative adversarial network and the STC encoder to generate the stego image, and the step 5 is specifically:
[0110] Step 5.1: Load the generator network and the trained weights, and read the original cover image to be embedded with secret information in order;
[0111] Step 5.2: Set the required steganographic embedding rate, input the original cover image into the generator network to obtain the embedding probability, and then convert the embedding probability into the embedding cost by the following formula:
[0112]
[0113] where ρ i,j is the embedding cost corresponding to the (i, j) pixel of the cover image, and p i,j is the embedding probability corresponding to the (i, j) pixel of the cover image;
[0114] Step 5.3: Repeat step 5.2 until the embedding cost of all original cover images is obtained;
[0115] Step 5.4: Embed the secret information, input the original cover image, the embedding rate, the embedding cost and the secret information into the STC to obtain the stego image.
[0116] An effective steganography method should have sufficient anti-detection and imperceptibility, which is not only invisible to the human eye, but also effectively resists various steganalysis attacks. In order to further evaluate the steganography performance of the present application, the method proposed in the present application is analyzed in detail from the aspects of imperceptibility, anti-traditional steganalysis performance and anti-deep steganalysis performance.
[0117] The platform used for testing in the experiment is: Intel(R) Core(TM) i5-9400F CPU @ 4.10GHz; memory: 64GB; storage: 500GB solid state disk; operating system: CentOS Linux 864-bit; method implementation language: Python language; method implementation framework: Pytorch1.10.
[0118] In the experiment, the BossBase 1.01 dataset image is adjusted to 256x256 pixels, and 8500 images are randomly selected from it as the training set, and the remaining 1500 images are used as the verification set, and the image batch size n of training and verification is set to 16.
[0119] The optimizer selected for the training of the generator and discriminator network is AdamW(0.9, 0.999). First, set the embedding rate to 0.2bpp, and set the learning rate of the generator and discriminator network to additional attenuation as shown in Tables 2 and 3, and generate the stego image of the simulated embedding and STC embedding random information after the training is completed. Then set the embedding rate to 0.4bpp, fine-tune the generator and discriminator network based on the network weight of 0.2bpp embedding rate, and set the learning rate of the two to 0.000002, complete the training and generate the stego image according to the above parameters.
[0120] Table 2 Generator network training learning rate
[0121]
[0122] Table 3 Discriminator network training learning rate
[0123]
[0124] (1) Subjective imperceptibility
[0125] The experimental results of the present application are shown in Figures 5a-5o , wherein, Figures 5a-5c are the carrier images numbered 270, 612 and 7693 in the verification set, respectively; Figures 5d-5f is Figures 5a-5c the simulated stego image of the simulated embedding random information at an embedding rate of 0.2bpp; Figures 5g-5i is Figures 5a-5cStego image embedded with random information using ternary STC at 0.2bpp embedding rate; Figures 5j-5l For Figures 5a-5c Simulated stego image embedded with random information at 0.4bpp embedding rate; Figures 5m-5o For Figures 5a-5c Stego image embedded with random information using ternary STC at 0.4bpp embedding rate.
[0126] It can be seen from the results that the human eye cannot distinguish between the carrier image and the stego image, indicating that the present application has good subjective imperceptibility.
[0127] (2) Objective imperceptibility
[0128] For two similar images, the similarity of the two images can usually be objectively evaluated by measuring the peak signal-to-noise ratio (PSNR) and structural similarity (SSIM) of the two images. PSNR is based on the error between corresponding pixels of the two images, and can objectively evaluate the quality of the image. SSIM calculates the similarity of two images from three aspects of brightness, contrast and image structure, and the SSIM calculation result of two completely identical images is 1.
[0129] To verify the imperceptibility of the present application, the corresponding PSNR and SSIM of all carrier images and stego images in the verification set are calculated by each embedding method, and the average value is taken. As can be seen from Table 4, the PSNR of the carrier and stego images of the present application is the highest, and the SSIM is also very close to 1, which can prove that the present application has good imperceptibility.
[0130] Table 4 PSNR and SSIM of carrier and stego images
[0131]
[0132] (3) Anti-traditional steganalysis performance
[0133] For steganography methods, the performance of resisting traditional steganalysis is its basic performance. Traditional steganalysis usually trains a support vector machine (SVM) to distinguish between carrier and stego images by manually selecting image features. To verify the performance of the present application, taking the SRM steganalysis method as an example, first, the carrier and stego images of the training set are inputted to train the steganalysis method, and then the verification set is inputted to obtain the test results by the following formula.
[0134]
[0135] Wherein, P E is the detection error rate, P FA is the false alarm rate, and P MD is the missed detection rate.
[0136] As can be seen from Table 5, the stego image generated by the present application has the highest detection error rate through traditional steganalysis, which proves that the present application can more effectively resist the attack of traditional steganalysis.
[0137] Table 5 detection error rate of traditional steganalysis method
[0138]
[0139] (4) Anti-traditional steganalysis performance
[0140] With the continuous development of deep learning technology, the performance of deep steganalysis method is gradually enhanced. Unlike traditional steganalysis, deep steganalysis automatically extracts the features of the image through neural network, and at the same time relies on neural network to classify the carrier and stego image. In order to verify the performance of the present application, the carrier and stego image in the training set are also used to train the steganalysis method, and then the detection result of the verification set is calculated through the above detection error rate formula.
[0141] As can be seen from Table 6, the stego image generated by the present application has the highest detection error rate after detection by the deep steganalysis method, which proves that the present application can effectively resist the attack of deep steganalysis.
[0142] Table 6 detection error rate of deep steganalysis method
[0143]
[0144]
[0145] Through the above series of analysis, it is proved that the image deep steganography method proposed in the present application not only ensures the imperceptibility of the stego image, but also enhances the security and anti-detection of the steganography method. Experiments prove that the steganography method in this paper is suitable for hiding secret information in images, and is suitable for secure transmission and storage and other application scenarios, and has practical application value.
[0146] The present application is based on the generative adversarial network, uses a larger convolution kernel in the generator to efficiently extract the deep features of the original image, through the adversarial training with the discriminator and the use of high-pass filter to design the loss function, which can effectively resist the attack of deep and traditional steganalysis, and enhance the anti-detection of the steganography method. In addition, the present application adds multi-scale structural similarity (MS-SSIM) to the loss function, not only suppresses the influence of steganography on visual features, but also balances with other losses, and improves the anti-detection of the steganography method.
[0147] The above only describes the preferred embodiments of the present application, and does not limit the idea of the present application, any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A generative adversarial network-based image steganography method, characterized in that, The application relates to a method for generating stego images based on a generative adversarial network (GAN) and a steganographic coding (STC) encoder. The method comprises the following steps: Step 1: using a large convolution kernel and constructing a generator network based on a U-Net encoder-decoder architecture without using a complex network structure and deconvolution, and constructing a discriminator network for adversarial training; Step 2: inputting a carrier image into the generator to generate an embedding probability model, simulating ideal embedding by using a double-tanh function to obtain a simulated stego image, and using cross-entropy to construct a discriminator loss function to train the discriminator; Step 3: designing a loss function of the generator based on the cross-entropy loss of the discriminator, embedding capacity, image visual similarity and high-pass filtering error, and training the generator; Step 4: repeating steps 2 and 3 while iteratively generating the generator and the discriminator multiple times until the entire training is completed; Step 5: using the trained GAN and the STC encoder to generate a stego image. The step 3 is specifically as follows: l=0.6932-l D +10 -7 ×l C +120×l S +0.0003×l F wherein, l D is the cross-entropy loss of the discriminator, l C is the capacity loss of the embedded information, l S is the visual similarity loss between the carrier image and the simulated carrier image, l F is the mean square error loss of the high-pass filtering results of the carrier image and the simulated carrier image. Step 3.2: Calculate the capacity loss l of the embedded information by the following formula C : where, and are the probabilities of embedding +1, -1 and no embedding respectively, H and W are the width and height of the image respectively, and q is the embedding rate. Step 3.3: Compute the visual similarity loss l between the carrier image and the simulated carrier image based on MS-SSIM S : where c and s represent the carrier image and the simulated carrier image, respectively, L M (x, y) is the luminance contrast function, C j (x, y) is the contrast contrast function, S j (x, y) is the structure contrast function, M is the maximum down-sampling scale, j is the current scale, a M , β j , and γ j are used to adjust the weight of each element, respectively. where u x and u y denote the mean of the pixels of the carrier image and the simulated carrier mask image, respectively, σ x and σ y are the variances of the pixels of the carrier image and the simulated carrier mask image, respectively, σ xy is the covariance, and C1, C2, and C3 are constants; Step 3.4: Before calculating l F Before, the carrier image and the stego image are high-pass filtered, i.e. a filter matrix is used as a convolution kernel to perform a convolution operation with the images; the filter matrix is designed based on 34 high-pass filters of the SRM steganalysis method, and then the obtained filtering results are used to calculate the mean square error as the loss according to the following formula: where c i and s i are the filtering results of the carrier image and the simulated carrier density image, respectively, and n is the size of the batch. 2.The generative adversarial network-based image steganography method of claim 1, wherein, Step 3.1: constructing the loss function of the generator as follows: The step 1 is specifically as follows: Step 1.1: constructing the generator network based on the U-Net architecture, including multiple encoder modules and decoder modules connected in sequence; 3.The steganography method based on generative adversarial network of claim 2, wherein, Step 1.2: constructing the discriminator network based on a deep steganalysis network SRNet. 4.The steganography method based on generative adversarial network of claim 2, wherein, The encoder adopts a multi-layer convolution stack deep network structure, and a large convolution kernel is used to replace a small convolution kernel to extract deeper information of the image; and the activation function of the encoder uses ReLU6.
5. The generative adversarial network-based image steganography method of claim 1, wherein, The decoder uses an up-sampling and convolution structure without using deconvolution to avoid the checkerboard effect of the generated result. The step 2 is specifically as follows: Step 2.1: inputting carrier images in batches into the generator network to generate embedding probabilities of the carrier images in batches; Step 2.2: embedding random information into the carrier image by using a double-tanh function as an embedding simulator to obtain a simulated stego image according to an ideal embedding model; 6. The generative adversarial network-based image steganography method of claim 5, wherein, Step 2.3: inputting the carrier image and the simulated stego image into the discriminator at the same time, calculating the cross-entropy loss of the output result of the discriminator according to whether the image is a stego image, and minimizing the cross-entropy. m i,j = -0.5 * tanh(lambda * (p i,j - 2 * r i,j )) + 0.5 * tanh(lambda * (p i,j - 2 * (1 - r i,j ))) where p i,j is the embedding probability corresponding to the (i, j) pixel of the carrier image, r i,j is the value of the random matrix at the (i, j) point with a uniform distribution in the range [0, 1], m i,j is the simulated embedding result, and λ is a control factor.
7. The generative adversarial network-based image steganography method of claim 5, wherein, The double-tanh function is mathematically expressed as follows: where n is the size of the batch, t i y is the label of the carrier image i is the output of the discriminator.
8. The generative adversarial network-based image steganography method of claim 1, wherein, The discriminator loss function is as follows: The step 5 is specifically as follows: Step 5.1: loading the generator network and the trained weights, and reading original carrier images to be embedded with secret information in sequence; wherein p i,j is the embedding cost corresponding to the (i, j) pixel of the carrier image, p i,j is the embedding probability corresponding to the (i, j) pixel of the carrier image; Step 5.2: setting a required steganographic embedding rate, inputting the original carrier image into the generator network to obtain an embedding probability, and converting the embedding probability into an embedding cost by the following formula: Step 5.3: repeating step 5.2 until the embedding cost of all original carrier images is obtained; Step 5.4: embedding secret information, inputting the original carrier image, the embedding rate, the embedding cost and the secret information into the STC to obtain a stego image.
Citation Information
Patent Citations
Image steganography method and system for automatically learning distortion based on GAN network structure
CN112767226A
Image information hiding method based on semantic weighting
CN114782462A
Image steganography method based on generative adversarial network
CN115086674A