A controllable image steganography method based on conditional generative adversarial network
By using the method of generating an adversarial network based on condition, the noise sample and conditional information training generator generates controllable steganographic images, solving the problem that the GAN generation carrier content cannot be controlled, and effectively controlling the generated image content and realistic images are realized generate.
Patent Information
- Application Number
- CN202011109236.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-16
- Publication Date
- 2024-11-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the GAN-based generative steganography method, the content of the generated carrier cannot be controlled, resulting in the incoming content of the generated dense carrier.
The method of generating adversarial network based on condition is adopted, and the generated adversarial network is trained using noise samples, conditional information and natural images. The generator generates controllable steganographic images and restores the secret information through the extractor.
The generated dense image content is effectively controlled by using condition information, solving the problem that the content of the GAN generation carrier cannot be controlled, and the generated image is realistic and controllable.
Smart Images

Figure CN112435155B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of neural networks, and in particular to a controllable image steganography method based on a conditional generative adversarial network. Background Art
[0002] Steganography is a technology that hides messages in a carrier for transmission in a way that does not attract the attention of attackers. Compared with cryptographic technology, steganography can not only hide the content of the message, but also hide the behavior of transmitting the message. This feature makes it the best means of intelligence feedback in an uncontrolled environment. Therefore, the research on steganography technology plays an important role in intelligence operations under information conditions and is of great significance to protecting information security and national security.
[0003] According to the different ways of constructing the secret carrier, steganography methods are divided into three categories: steganography based on carrier modification, steganography based on carrier selection and steganography based on carrier synthesis. Each of these three methods has its own advantages and disadvantages.
[0004] The steganographic method based on carrier synthesis is that the sender directly constructs a secret carrier based on the message, so that the secret carrier carries the message. The advantage of this type of method is that there is no process of modifying the carrier, the sender and the receiver do not need to share a mapping relationship with a large amount of information, and the content of the synthesized carrier usually does not repeat; the disadvantage is that it is difficult to construct an absolutely natural secret carrier. Before the emergence of GAN, steganographic methods based on carrier synthesis were basically implemented through texture image synthesis. However, since texture images do not have the semantic characteristics of natural images, repeated transmission of texture images is likely to attract the attention of attackers. The emergence of GAN has brought new development opportunities for carrier synthesis methods.
[0005] GAN uses a game strategy to pit the generator against the discriminator, and eventually forms a powerful generator. Ideally, training the optimal generator can make the distribution of the generated samples the same as the real data. In other words, ideally, using GAN to implement carrier synthesis steganography has the possibility of constructing a natural secret carrier. This article also refers to the method of directly constructing a secret carrier using GAN or a similar generator as generative steganography. The name "generation" can more vividly reflect the process of carrier construction. At present, scholars have proposed specific generative steganography methods based on GAN. Judging from the effects of these methods, the main problems they face are: the content of the generated carrier cannot be controlled. GAN is trained in an unsupervised learning method, so that the content of the generated carrier cannot be controlled in advance. Steganography based on GAN naturally cannot control the content of the generated secret carrier. Summary of the invention
[0006] In view of the above-mentioned shortcomings, the present invention provides a controllable image steganography method based on conditional generative adversarial network, which can effectively control the generated secret image content by using conditional information, and provides a solution to the problem that the content of the generated carrier cannot be controlled by generative steganography based on GAN.
[0007] To achieve the above object, the embodiments of the present invention adopt the following technical solutions:
[0008] A controllable image steganography method based on conditional generative adversarial network, the information steganography method comprises the following steps:
[0009] Training a generative adversarial network using noise samples, conditional information, and natural images, wherein the generative adversarial network includes a generator for generating images and a discriminator for discriminating images;
[0010] The extractor is trained using the generated images and the corresponding driving noise generated by the generator;
[0011] The sender converts the secret information into a noise signal, and inputs the noise signal and the selected conditional information into the trained generator to generate a stego-image with controllable content;
[0012] The receiver receives the stego image, inputs the trained extractor, extracts the noise signal of the stego image and restores the noise signal to the secret information.
[0013] According to one aspect of the present invention, the use of noise samples, conditional information and natural images to train a generative adversarial network is specifically as follows: random noise is extracted from the noise samples, and conditional information is selected and input into the generator for training to produce a generated image, and the combination of the generated image and the conditional information and the combination of the natural image and the conditional information are simultaneously input into the discriminator for training to discriminate the generated image, and the performance of the generator is continuously improved through the discriminator so that the generator can generate controllable and realistic generated images.
[0014] According to one aspect of the present invention, the generator input is a noise signal and conditional information. The generator includes 2 fully connected layers and 2 deconvolution layers, both of which use ReLU as an activation function. The output of each layer is connected to the conditional information, and finally a 64×64×1 generated image is output. The deconvolution layer uses a 5×5 convolution kernel and a moving step size of [2,2].
[0015] According to one aspect of the present invention, the discriminator input is a 64×64×1 real image or generated image and conditional information. The discriminator includes 2 convolutional layers and 2 fully connected layers, both of which use ReLU as an activation function. The output of each layer is connected to the conditional information, and finally a one-dimensional vector is output for judging the authenticity of the image. The convolutional layer uses a 5×5 convolution kernel and a moving step size of [2,2].
[0016] According to one aspect of the present invention, the generator and the discriminator are trained using a gradient descent algorithm to minimize the loss function.
[0017] According to one aspect of the present invention, the extractor is trained using the generated image generated by the generator and the corresponding driving noise as follows: after the trained generator outputs the generated image, the generated image is input into the extractor for training so that the noise signal extracted by the extractor from the generated image is consistent with the driving noise of the generated image.
[0018] According to one aspect of the present invention, the extractor input is a generated image and the output is a noise signal. The extractor includes 4 convolutional layers and 1 fully connected layer, all of which use ReLU as the activation function. The convolutional layer uses a 5×5 convolution kernel and the moving step size is [2,2].
[0019] According to one aspect of the present invention, the step of converting secret information into a noise signal specifically includes: expressing the secret information in binary, and converting the secret information into random noise through the following mapping relationship:
[0020] z i =random(s i -1,s i )
[0021] Where si represents the i-th bit of the secret information s, zi represents the i-th dimension of the random noise z, and the function random(x,y) represents generating a random number from the interval (x,y).
[0022] According to one aspect of the present invention, the method of restoring the noise signal to secret information specifically includes: converting the noise of each dimension in the noise signal extracted by the extractor into secret information bits according to a mapping relationship, and connecting and restoring the secret information.
[0023] According to one aspect of the present invention, the controllable image steganography method further comprises the following steps: experimenting on the performance of the generative adversarial network and the extractor.
[0024] Advantages of the implementation of the present invention: The controllable image steganography method based on conditional generative adversarial network described in the present invention comprises the following steps: using noise samples, conditional information and natural images to train the generative adversarial network, the generative adversarial network comprising a generator for generating images and a discriminator for discriminating images; using the generated image generated by the generator and the corresponding driving noise to train the extractor; the sender converts the secret information into a noise signal, and inputs the noise signal and the selected conditional information into the trained generator to generate a stego image with controllable content; the receiver receives the stego image, inputs the trained extractor, extracts the noise signal of the stego image and restores the noise signal to the secret information. The conditional information can be used to effectively control the generated secret image content, which provides a way to solve the problem that the content of the carrier generated by the generative steganography based on GAN cannot be controlled. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0026] Figure 1 A schematic diagram of a controllable image steganography method based on a conditional generative adversarial network according to the present invention;
[0027] Figure 2 This is a diagram of the structure of a generative adversarial network based on conditional information according to the present invention;
[0028] Figure 3 A network structure diagram of a generator in a generative adversarial network based on conditional information according to the present invention;
[0029] Figure 4 A network structure diagram of a discriminator in a generative adversarial network based on conditional information according to the present invention;
[0030] Figure 5 is a training flow chart of the extractor according to the present invention;
[0031] Figure 6 A network structure diagram of the extractor of the present invention;
[0032] Figure 7 This is a flow chart of secret image generation and secret information extraction according to the present invention;
[0033] Figure 8 It is a schematic diagram of the control of the generated image content by the conditional information when embedding different secret information lengths according to the present invention;
[0034] Fig. 9 It is a schematic diagram of the image generation effect of the generator described in the present invention under different numbers of training rounds;
[0035] Fig.10 This is a distortion change diagram of the extractor described in the present invention under different numbers of training rounds. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] like Figures 1 to 10 As shown, a controllable image steganography method based on conditional generative adversarial network, the information steganography method comprises the following steps:
[0038] S1: Training the Generative Adversarial Network using noisy samples, conditional information, and natural images;
[0039] In practical applications, the generative adversarial network includes a generator for generating images and a discriminator for discriminating images, which are represented by G and D respectively.
[0040] In practical applications, the use of noise samples, conditional information and natural images to train the generative adversarial network is specifically as follows: random noise is extracted from the noise samples, and the conditional information is selected and input into the generator for training to produce a generated image, and the combination of the generated image and the conditional information and the combination of the natural image and the conditional information are simultaneously input into the discriminator for training to discriminate the generated image, and the performance of the generator is continuously improved through the discriminator, so that the generator can generate controllable and realistic generated images.
[0041] In practical applications, such as Figure 2 As shown in the figure, the combination of random noise z and conditional information y is used as the representation of the latent space and input to the generator G for training; the combination of natural image x and conditional information y is used as the probability space representation of the real image set, and the combination of generated image G(z) and conditional information y is used as the probability space representation of the generated image set, which are respectively input to the discriminator D for training. After the generator G is trained, the conditional information y can be used to control the generated image in the test phase.
[0042] In practical applications, the loss function when training the generator G is It is expressed by the following formula, where pz represents the distribution of random noise z, Represents the expectation of generating data.
[0043]
[0044] The loss function when training the discriminator D It is expressed by the following formula, where pd represents the distribution of the real data x, Represents the expectation of real data.
[0045]
[0046] From the above two formulas, we can see that It is a conditional probability formula, which can be understood as different cost functions for different conditional information y, corresponding to different generated images.
[0047] In practical applications, such as Figure 3 As shown in the figure, the generator input is a noise signal and conditional information. The generator includes 2 fully connected layers and 2 deconvolution layers, both of which use ReLU as the activation function. The output of each layer is connected to the conditional information, and finally a 64×64×1 generated image is output. The deconvolution layer uses a 5×5 convolution kernel, and the moving step is [2,2]. "+" indicates connection.
[0048] In practical applications, assume that the length of random noise z is 100 dimensions, and the conditional information y is represented by a category label, with a length of 10 dimensions, representing 10 categories, and the generated image G(z) is a single-channel grayscale image. The random noise z and the conditional information y are connected and input into the fully connected layer as a whole. After two fully connected layers and two deconvolution layers, the output of each layer is connected to the conditional information y, and finally a generated image G(z) with a size of 64×64×1 is obtained.
[0049] In practical applications, such as Figure 4 As shown in the figure, the discriminator inputs a 64×64×1 real image or generated image and conditional information. The discriminator includes 2 convolutional layers and 2 fully connected layers, both of which use ReLU as the activation function. The output of each layer is connected to the conditional information, and finally a one-dimensional vector is output to judge whether the image is real or fake. The convolutional layer uses a 5×5 convolution kernel, and the moving step is [2,2]. "+" indicates connection.
[0050] In practical applications, the real image x or generated image G(z) with a size of 64×64×1 is connected with the conditional information y and used as the whole input to the convolution layer. After two convolutional layers and two fully connected layers, the output of each layer is connected with the conditional information y, and finally a one-dimensional vector is obtained for judging true or false.
[0051] In practical applications, the generator and discriminator are trained using a gradient descent algorithm to minimize the loss function.
[0052] In practical applications, after the generative adversarial network is trained, the sender saves the network parameters of the generator and prepares for training the extractor.
[0053] S2: Train the extractor using the generated images and corresponding driving noise generated by the generator;
[0054] In practical applications, the extractor is represented by E.
[0055] In practical applications, the extractor is trained using the generated image generated by the generator and the corresponding driving noise as follows: after the trained generator outputs the generated image, the generated image is input into the extractor for training so that the noise signal extracted by the extractor from the generated image is consistent with the driving noise of the generated image.
[0056] In practical applications, the training process of the extractor E is as follows Figure 5 As shown in the figure, the sender maps the message into random noise, and the random noise z and conditional information y jointly drive the trained generator G to generate images. The noise extractor E is designed using a convolutional neural network, and the generated image of G is used as input to train E, so that the output noise z' of the extractor network is consistent with the driving noise z.
[0057] In practical applications, the loss function L(E) of training the extractor E is expressed as follows, where n represents the dimension of the random noise z
[0058]
[0059] In practical applications, such as Figure 6 As shown in the figure, the extractor input is the generated image and the output is the noise signal. The extractor includes 4 convolutional layers and 1 fully connected layer, all of which use ReLU as the activation function. The convolutional layer uses a 5×5 convolution kernel and the moving step is [2,2]. “+” indicates connection.
[0060] In practical applications, the generated image G(z) is taken as input, and after four convolutional layers and one fully connected layer, the noise z' is output. Through training, the output noise z' of the extractor E is made consistent with the driving noise z.
[0061] In practical applications, when the extractor E is trained to be stable, the sender shares the trained extractor network parameters with the receiver for extracting noise.
[0062] S3: The sender converts the secret information into a noise signal, and inputs the noise signal and the selected conditional information into the trained generator to generate a content-controllable stego-image;
[0063] In practical applications, the secret information is converted into a noise signal specifically as follows: the secret information is represented by binary, and the secret information is converted into random noise by the following mapping relationship:
[0064] z i =random(s i -1,s i )
[0065] Where si represents the i-th bit of the secret information s, zi represents the i-th dimension of the random noise z, and the function random(x,y) represents generating a random number from the interval (x,y).
[0066] In practical applications, the generator G has been trained by the sender. The sender inputs the random noise z mapped by the message s and the selected conditional information y into the generator G to obtain the generated image G(z). The process is expressed by the following formula, where stego represents the secret image
[0067] stego=G(z|y)
[0068] In practical applications, this step generates a secret image controlled by conditional information.
[0069] S4: The receiver receives the stego image, inputs the trained extractor, extracts the noise signal of the stego image and restores the noise signal to the secret information.
[0070] In practical applications, the extractor E has been trained by the sender and the network parameters have been shared with the receiver. After the receiver receives stego, it extracts the random noise z' through the trained E. The process is expressed by the following formula.
[0071] z'=E(stego)
[0072] In practical applications, the method of restoring the noise signal to the secret information specifically includes: converting the noise of each dimension in the noise signal extracted by the extractor into the secret information bit according to the mapping relationship, and connecting and restoring the secret information.
[0073] In practical applications, the receiver converts the noise of each dimension extracted from z' into the message bit s according to the mapping relationship. i ', and connect to restore the message s'.
[0074] In practical applications, such as Figure 7 As shown, the complete process of generating secret images and extracting secret information is demonstrated.
[0075] In practical applications, the controllable image steganography method further includes the following steps: experimenting on the performance of the generative adversarial network and the extractor.
[0076] In practical applications, the conditional information y is represented by handwriting categories, with a total of 10 categories corresponding to handwritten numbers 0 to 9.
[0077] In practical applications, the real image dataset used in the experiment is the MNIST dataset, which consists of handwritten digits from 250 different people. Each handwritten digit is stored as a 28*28 pixel grayscale image. The entire dataset includes 60,000 training handwritten images and corresponding labels, and 10,000 testing handwritten images and corresponding labels. The dataset has been packaged into a compressed file, and Python programming is used to read and save the MNIST dataset.
[0078] In practical applications, the experiment was conducted on the deep learning platform Tensorflowv1.15.0, and the graphics card used was RTX2070Max-Q. The parameters for training CGAN are set as follows: 60,000 training images and corresponding labels and 10,000 test images and corresponding labels in the MNIST dataset are used to train CGAN; random noise z is uniformly sampled from (-1,1); batchsize is set to 100, indicating that 100 samples are selected from the training set for training each iteration; epoch is set to 20, indicating that all samples in the training set are used for 20 rounds of training; the network structure of the generator G and the discriminator D in the generative adversarial network is as follows Figure 3 and Figure 4 As shown, for the loss function and The Adam (AdaptiveMomentEstimation) optimizer is used. The learning rate of the optimizer is set to 0.0002, the exponential decay rate β1 is set to 0.5, and other parameters use the default values. The parameters of the training extractor E are set as follows: the random noise z is uniformly sampled from (-1,1); the batchsize is set to 100, which means that 100 noise samples are sampled each time for training; the training steps is set to 50000, which means that batchsize samples are used for training 50000 times; the network structure of the extractor E is as follows Figure 6 As shown, the Adam optimizer is used for the loss function L(E), the learning rate of the optimizer is set to 0.0002, the exponential decay rate β1 is set to 0.5, and other parameters use the default values.
[0079] In practical applications, the effects of different secret information lengths on image quality are experimentally tested. The number of bits |s| embedded in the secret information s is 100, 120, 150, and 200, respectively. The conditional information y is represented by the handwriting category, with a total of 10 categories, corresponding to the handwritten digits 0 to 9. The message s is converted into random noise z through the formula, and the image is generated by connecting the category information y. The control effect of the 10 categories of conditional information on the generated image content is shown in the following figure. Figure 8 As shown in . The four images are all composed of 10 rows and 10 columns of small images, where the 10 rows correspond to the 10 categories of condition information y, and the 10 columns represent the 10 small images generated by the corresponding condition information. Fig. 9 It can be seen that when embedding different message lengths, the 10 categories of conditional information can effectively control the image content and generate corresponding handwritten numbers; at the same time, under the four message embedding lengths, the generated image quality is similar, indicating that for handwritten images, the embedding length of the secret information has no obvious effect on the image quality.
[0080] In practical applications, the quality of the image generated by this method is tested experimentally when the number of bits of the secret information s |s| is 100, as shown in Fig. 9 As shown in the figure, the effect of generating images under different numbers of training rounds is shown. For the method in this paper, the handwritten digits generated at the end of the first round of training can be fuzzily distinguished, and the handwritten digits generated in the fifth round can be more accurately distinguished. The generation effect in the 10th and 20th rounds is equivalent to that in the fifth round, and the convergence speed is extremely fast.
[0081] In practical applications, when the number of bits of embedded secret information s is 100, the extraction efficiency of the extractor changes with the number of training rounds, as shown in the following example: Fig.10 As shown in the figure, the distortion of the extractor of this method is decreasing; in the first 5000 training steps, the distortion of the extractor of this method decreases very quickly; at the 50000th training step, the distortion value of the extractor of this method decreases slowly. The final extraction accuracy is stable at around 63%.
[0082] In practical applications, the message extraction accuracy at different embedding lengths is experimentally tested when the training steps is 50,000. The experiment shows that when the training steps of the extractor E is 50,000, the message extraction accuracy of the proposed method is relatively stable when |s| is 100 bits, 120 bits, 150 bits and 200 bits respectively.
[0083] Advantages of the implementation of the present invention: The controllable image steganography method based on conditional generative adversarial network described in the present invention comprises the following steps: using noise samples, conditional information and natural images to train the generative adversarial network, the generative adversarial network comprising a generator for generating images and a discriminator for discriminating images; using the generated image generated by the generator and the corresponding driving noise to train the extractor; the sender converts the secret information into a noise signal, and inputs the noise signal and the selected conditional information into the trained generator to generate a stego image with controllable content; the receiver receives the stego image, inputs the trained extractor, extracts the noise signal of the stego image and restores the noise signal to the secret information. The conditional information can be used to effectively control the generated secret image content, which provides a way to solve the problem that the content of the carrier generated by the generative steganography based on GAN cannot be controlled.
[0084] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with the art within the technical scope disclosed in the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A controllable image steganography method based on conditional generative adversarial network, characterized in that: The information steganography method comprises the following steps: Training a generative adversarial network using noise samples, conditional information, and natural images, wherein the generative adversarial network includes a generator for generating images and a discriminator for discriminating images; The extractor is trained using the generated images and the corresponding driving noise generated by the generator; The sender converts the secret information into a noise signal, and inputs the noise signal and the selected conditional information into the trained generator to generate a stego-image with controllable content; The receiver receives the stego image, inputs the trained extractor, extracts the noise signal of the stego image and restores the noise signal to the secret information.
2. The controllable image steganography method based on conditional generative adversarial network according to claim 1 is characterized in that: The method of training a generative adversarial network using noise samples, conditional information and natural images specifically comprises the following steps: extracting random noise from noise samples, selecting conditional information and inputting them together into a generator for training to produce a generated image, inputting a combination of the generated image and the conditional information and a combination of the natural image and the conditional information into a discriminator for training to discriminate the generated image, and continuously improving the performance of the generator through the discriminator so that the generator can generate controllable and realistic generated images.
3. The controllable image steganography method based on conditional generative adversarial network according to claim 2 is characterized in that: The generator input is a noise signal and conditional information. The generator includes 2 fully connected layers and 2 deconvolution layers, both of which use ReLU as the activation function. The output of each layer is connected to the conditional information, and finally a 64×64×1 generated image is output. The deconvolution layer uses a 5×5 convolution kernel and a moving step size of [2,2].
4. The controllable image steganography method based on conditional generative adversarial network according to claim 3 is characterized in that: The discriminator input is a 64×64×1 real image or generated image and conditional information. The discriminator includes 2 convolutional layers and 2 fully connected layers, both of which use ReLU as the activation function. The output of each layer is connected to the conditional information, and finally a one-dimensional vector is output to judge the authenticity of the image. The convolutional layer uses a 5×5 convolution kernel and the moving step size is [2,2].
5. The controllable image steganography method based on conditional generative adversarial network according to claim 4 is characterized in that: The generator and discriminator are trained using a gradient descent algorithm to minimize the loss function.
6. The controllable image steganography method based on conditional generative adversarial network according to claim 1 is characterized in that: The method of training the extractor using the generated image generated by the generator and the corresponding driving noise is specifically as follows: after the trained generator outputs the generated image, the generated image is input into the extractor for training, so that the noise signal extracted by the extractor from the generated image is consistent with the driving noise of the generated image.
7. The controllable image steganography method based on conditional generative adversarial network according to claim 6 is characterized in that: The extractor input is the generated image and the output is the noise signal. The extractor includes 4 convolutional layers and 1 fully connected layer, all of which use ReLU as the activation function. The convolutional layer uses a 5×5 convolution kernel and the moving step size is [2,2].
8. The controllable image steganography method based on conditional generative adversarial network according to claim 1 is characterized in that: The step of converting the secret information into a noise signal specifically includes: expressing the secret information in binary, and converting the secret information into random noise through the following mapping relationship: from i =random(s i -1,s i ) where s i represents the i-th bit of the secret information s, z i Represents the i-th dimension of random noise z, and the function random(x,y) represents generating a random number from the interval (x,y).
9. The controllable image steganography method based on conditional generative adversarial network according to claim 8 is characterized in that: The method of restoring the noise signal to the secret information specifically includes: converting the noise of each dimension in the noise signal extracted by the extractor into the secret information bit according to the mapping relationship, and connecting and restoring the secret information.
10. The controllable image steganography method based on conditional generative adversarial network according to any one of claims 1 to 9, characterized in that: The controllable image steganography method also includes the following steps: experimenting on the performance of the generative adversarial network and the extractor.
