Image hiding method and device based on reversible neural network
Through the image hiding method based on reversible neural network, the LMFI network model framework is constructed and the QR code image is embedded as watermark information, which solves the problem of insufficient image watermark quality and security in the prior art, and realizes high-quality and low-parameter image watermarks, which are suitable for digital image copyright protection.
Patent Information
- Application Number
- CN202411718476.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-28
AI Technical Summary
The prior art is difficult to achieve high quality and low parameter quantities simultaneously in image watermarks, resulting in reduced image quality and insufficient security, and it is difficult to apply to the field of digital image copyright protection that has high requirements for image quality.
Using an image hiding method based on reversible neural network, the LMFI network model framework is constructed, and the preprocessed training image is used for training, and a QR code image with the same size as the digital image is generated, and it is embedded in the digital image as watermark information to achieve information hiding and recovery.
It realizes the hiding of a large amount of information while maintaining a low parameter quantity and high image quality, which can be well applied to digital image copyright protection and other fields. The generated hidden images are of high quality and low network framework parameters, saving time and hardware costs.
Smart Images

Figure CN119228622B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of general image data processing, and in particular relates to an image hiding method and device based on a reversible neural network. Background Art
[0002] Digital image watermarking is an important image hiding application used to protect image copyright and information security. Embedding a watermark in a digital image can effectively prevent the image from being copied, modified, and distributed without authorization. At the same time, watermarking technology also plays an important role in authentication and data integrity detection.
[0003] Common image watermarking methods include least significant bit (LSB) replacement and transform domain-based methods. Although these methods are simple to implement, the quality of the generated images is usually low, making them difficult to apply to the field of digital image copyright, which has high requirements for the quality of generated images. The least significant bit replacement method is one of the most commonly used image hiding techniques. Its basic idea is to replace the least significant bit (LSB) in each pixel of the image to hide information. The advantages of this method are simple implementation and fast speed, but since the pixel value of the image is directly modified, it is easy to cause image quality degradation; especially in the case of a large amount of data, the visual effect of the image will be significantly deteriorated, and the hidden information is easy to be detected and removed, and the security is low. Transform domain-based methods, such as DCT and DWT, embed information in the frequency domain of the image. Although they have better concealment than methods that directly modify pixel values, they require complex mathematical transformations, have high computational complexity, and will also cause image quality degradation when a large amount of information is embedded.
[0004] In addition, although the existing image hiding methods using deep learning can generate high-quality Stego images (images containing hidden information after steganography), their parameters are generally large, they occupy a large amount of video memory, have high hardware requirements, and are insufficient in practical application. In view of this, how to generate secure and high-quality watermarked digital images to protect their copyright is an important issue that needs to be solved urgently. Summary of the invention
[0005] In view of the above deficiencies in the prior art, the purpose of the present invention is to provide an image hiding method and device based on a reversible neural network, which can hide a large amount of information while maintaining a low parameter amount and high image quality, and can be well applied to the field of digital image copyright protection.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is an image hiding method based on a reversible neural network, comprising the following steps:
[0007] S1. Based on a public data set, obtain training images and preprocess the training images;
[0008] S2, obtain the digital image to be watermarked, and use the qrcode library and Pillow library to generate a QR code image with the same size as the digital image;
[0009] S3, constructing the LMFI network model framework, which includes several parameter-sharing reversible interaction blocks Inv-Block;
[0010] S4, using the preprocessed training images to train the LMFI network model framework;
[0011] S5. Using the trained LMFI network model framework, a digital image to be watermarked (such as a digital artwork image, an image generated by a large model, etc.) is processed, that is, the QR code image is embedded into the digital image as watermark information to generate an image containing a hidden watermark;
[0012] S6. When it is necessary to extract the watermark from the hidden watermarked image, the trained LMFI network model framework is used to extract the watermark to obtain the restored watermark image.
[0013] As a preferred solution of the present invention, in S1, the preprocessing process is to randomly crop the training image to a size of 224×224, and perform random horizontal and vertical rotations to increase data diversity.
[0014] As a preferred solution of the present invention, in S2, the qrcode library is a Python library for generating a two-dimensional code, and the Pillow library is an image processing library (which can perform image processing on the generated two-dimensional code image, mainly for resizing). The specific process of using the qrcode library and the Pillow library to generate a two-dimensional code image of the same size as the digital image is as follows:
[0015] S21. Import the qrcode library and the Pillow library into the Python code, and define the data content contained in the QR code, where the data content includes one or more of a URL link, a text string, contact information, WIFI configuration, geographic location coordinates, a phone number, SMS content, and custom data;
[0016] S22, creating a qrcode object and setting parameters to control the generation properties of the QR code, the parameters including version, error correction level, box size, and border size;
[0017] S23. Add the defined data content to the qrcode object to generate a QR code image, and use the Pillow library to adjust the size of the generated QR code image (i.e., to generate a QR code image of the same size as the digital image), and then save the QR code image as a file.
[0018] As a preferred solution of the present invention, in the S3, the LMFI network model framework includes five parameter-shared reversible interaction blocks, each of which contains three interactions. Information is processed through a multi-scale fusion block, a residual dense block, an exp function, and a sigmoid function during the three interactions.
[0019] As a preferred embodiment of the present invention, in S1, the public data sets include DIV2K and COCO. In S4, during training, the data set used in the training process is the training set in DIV2K, and a test set is set, which includes the test sets in DIV2K, COCO, and ImageNet, as well as the digital images introduced in S2 and the generated QR code images.
[0020] As a preferred embodiment of the present invention, in S4, the training process includes the following steps:
[0021] S41, alternately select images from the training set, one of which is used as the cover image cover (referred to as the cover image, and the others are similar), and the other is used as the secret image secret, where the secret image is the hidden image;
[0022] S42. In the forward hiding process, the cover image and the secret image are first taken as the initial input. After being processed by five reversible interaction blocks, the hidden image stego (the image containing the hidden watermark) and the lost information L are obtained. Among them, in the reversible interaction block, the information interaction process between the cover image and the secret image is expressed as:
[0023] ;
[0024] ;
[0025] In the formula, , are the feature representations of the cover image after being processed by the kth and k+1th reversible interaction blocks respectively; , are the feature representations of the secret image after being processed by the kth and k+1th reversible interaction blocks, respectively, k=1, 2, 3, 4; represents the sigmoid function; cat represents the connection operation; D1 and D2 represent the residual dense block and the multi-scale fusion block respectively; ⊙ represents the dot multiplication operation in the matrix; exp represents the exponential function; Represents a 3×3 convolution; 1 represents a vector or matrix of all 1s, which is used as a bias term in the connection operation;
[0026] S43. In the reverse revealing process, the information flow is opposite to that in the forward hiding process, that is, the information is input from the last reversible interactive block and output from the first reversible interactive block. With the stego image and the auxiliary variable w extracted from the same Gaussian distribution as the lost information L as input, after processing through five reversible interactive blocks, the restored image secret-rev (restored watermark image) can be obtained. The formula in the reverse revealing process is expressed as:
[0027] ;
[0028] ;
[0029] In the formula, , denote the auxiliary variables used in the kth and k+1th reversible interaction blocks respectively; , They are the feature representations of the stego images after being processed by the kth and k+1th reversible interaction blocks, respectively.
[0030] As a preferred solution of the present invention, in S4, the loss function used in the training process includes hidden loss and recovery loss, and the formula of hidden loss is:
[0031] ;
[0032] In the formula, Represents the total hidden loss; N represents the number of training samples, and i represents the i-th training sample; Represents the cover image corresponding to the i-th training sample; represents the stego image corresponding to the i-th training sample; It is the mean absolute error loss function MAE, which is used to measure and the degree of difference between
[0033] The formula for recovering the loss is:
[0034] ;
[0035] In the formula, represents the total recovery loss; represents the calculation of the expected value of a random variable z, where z is derived from the probability distribution function obtained by sampling;
[0036] The total loss during training is the linear sum of hiding loss and recovery loss, expressed as:
[0037] ;
[0038] In the formula, , are the weights of hiding loss and recovery loss respectively.
[0039] As a preferred solution of the present invention, in S4, during the training process, the training batch size is 4, and the initial learning rate is 1×10 −3.9 After 5 rounds of training, the learning rate is reduced to 1×10 −4.4 , after that, the learning rate is halved every 260 iterations, the total number of iterations is 2000, and the Adam optimizer is used to set other hyperparameters in the training process; , The initial values of are set to 5.0 and 3.0 respectively.
[0040] As a preferred solution of the present invention, the residual dense block has a five-layer structure, the multi-scale fusion block is composed of two 3×3 convolutions and an upsampling block, and the three interactions contained in each reversible interactive block are specifically as follows: there are three interactive branches between the cover image and the secret image, in the first interactive branch, the information of the secret image is processed by the residual dense block and the multi-scale fusion block, connected in the channel dimension, and then processed by a 3×3 convolution block and then added to the information of the cover image; in the second interactive branch, the information of the cover image is processed by a residual dense block and a sigmoid function and an exp function, and then multiplied with the information of the secret image; in the third interactive branch, the information input to the reversible interactive block is processed by the residual dense block and the multi-scale fusion block, connected in the channel dimension, and then processed by a 3×3 convolution block and then added to the information of the secret image.
[0041] In S5 and S6, the process of processing the digital image to be watermarked using the trained LMFI network model framework can refer to the above training process, and finally output the stego image; the watermark is extracted using the trained LMFI network model framework in the same way, and finally the secret-rev image is output.
[0042] An image hiding device based on a reversible neural network, comprising:
[0043] a memory having a computer processing program stored thereon;
[0044] The processor is used to execute the computer processing program in the memory to implement the above-mentioned image hiding method based on reversible neural network.
[0045] The beneficial effects of the present invention are:
[0046] The present invention can hide a large amount of information while maintaining a low parameter amount and a high image quality. After the information is hidden in the image, the naked eye will not be able to detect the image change, and can be well applied to the fields of digital image copyright protection.
[0047] The present invention adopts an end-to-end neural network framework, which does not require a lot of manual assistance and saves labor costs. It only needs to input the digital image to be embedded with a watermark and the watermark image into the trained LMFI network model framework to generate a high-quality image embedded with a watermark, which plays a role in protecting the copyright of the image. When copyright verification is required, it only needs to input the image embedded with a watermark and the auxiliary information generated in the process of embedding the watermark into the network, so that the watermark can be restored to confirm the copyright of the digital image.
[0048] The hidden image generated by the present invention has high quality, far exceeding the hidden image generated by ordinary hiding methods such as LSB steganography. At the same time, the network framework has a low number of parameters. After one training, the model can be directly read for image hiding. The hiding and recovery speeds are fast, and the video memory is small, which can greatly save time and hardware costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 It is a schematic diagram of the process of the present invention;
[0050] Figure 2 It is a principle architecture diagram of a reversible interaction block in a forward hiding process in an embodiment of the present invention;
[0051] Figure 3 It is a schematic diagram of the principle structure of the reversible interaction block in the reverse disclosure process in an embodiment of the present invention;
[0052] Figure 4 It is a schematic diagram of the LMFI network model framework in an embodiment of the present invention. DETAILED DESCRIPTION
[0053] The embodiments of the present invention are further described below in conjunction with the accompanying drawings:
[0054] Example 1: Figure 1 As shown, an image hiding method based on a reversible neural network includes the following steps:
[0055] S1. Based on a public data set, obtain training images and preprocess the training images;
[0056] S2, obtain the digital image to be watermarked, and use the qrcode library and Pillow library to generate a QR code image with the same size as the digital image;
[0057] S3, constructing the LMFI network model framework, which includes several parameter-sharing reversible interaction blocks Inv-Block;
[0058] S4, using the preprocessed training images to train the LMFI network model framework;
[0059] S5, using the trained LMFI network model framework to process the digital image to be watermarked, that is, embedding the QR code image into the digital image as watermark information to generate an image containing a hidden watermark;
[0060] S6. When it is necessary to extract the watermark from the hidden watermarked image, the trained LMFI network model framework is used to extract the watermark to obtain the restored watermark image.
[0061] In S1, the preprocessing process is to randomly crop the training images to a size of 224×224 and perform random horizontal and vertical rotations to increase the diversity of the data.
[0062] In S2, the qrcode library is a Python library for generating QR codes, and the Pillow library is an image processing library. The specific process of using the qrcode library and the Pillow library to generate a QR code image of the same size as a digital image is as follows:
[0063] S21. Import the qrcode library and the Pillow library into the Python code, and define the data content contained in the QR code, where the data content includes one or more of a URL link, a text string, contact information, WIFI configuration, geographic location coordinates, a phone number, SMS content, and custom data;
[0064] S22, creating a qrcode object and setting parameters to control the generation properties of the QR code, the parameters including version, error correction level, box size, and border size;
[0065] S23. Add the defined data content to the qrcode object to generate a QR code image, adjust the size of the generated QR code image using the Pillow library, and then save the QR code image as a file.
[0066] In S3, the LMFI network model framework includes five parameter-sharing reversible interaction blocks, each of which contains three interactions. Information is processed through multi-scale fusion blocks, residual dense blocks, exp functions, and sigmoid functions during the three interactions.
[0067] The reversible interaction block is a building block in the reversible neural network (INN) that allows the network to perform opposite operations between forward propagation and back propagation. The design of this module enables the network to not only perform forward calculations, but also accurately restore the input data through back propagation, which is the key to achieving network reversibility. The multi-scale fusion block is a module used to integrate features of different scales in a deep learning model. It can capture local and global information in images or data to improve the performance of the model. The Residual Dense Block is a neural network structure that combines the characteristics of the residual network (ResNet) and the densely connected network (DenseNet). It aims to combine the advantages of the two networks to improve the performance and training efficiency of the model.
[0068] In S1, the public data sets used are DIV2K and COCO. In S4, during training, the data set used in the training process is the training set in DIV2K, and a test set is set. The test set includes the test sets in DIV2K, COCO, and ImageNet, as well as the digital images introduced in S2 and the generated QR code images.
[0069] The DIV2K dataset is a high-resolution image dataset, mainly used for image super-resolution (SR) research, and contains more than 800 high-resolution images, which are used to generate low-resolution training and test data. The COCO (Common Objects in Context) dataset is a large-scale object detection, segmentation, and description dataset, containing more than 300,000 images, each of which contains complex everyday scenes. ImageNet is a large image database designed for visual object recognition software research, with more than 14 million annotated images covering more than 20,000 categories.
[0070] In S4, the training process includes the following steps:
[0071] S41, alternately select images from the training set, one of which is used as the cover image cover, and the other is used as the secret image secret, where the secret image is the hidden image;
[0072] S42. In the forward hiding process, the cover image and the secret image are first taken as the initial input. After being processed by five reversible interaction blocks, the hidden image stego and the lost information L are obtained. Among them, in the reversible interaction block, the information interaction process between the cover image and the secret image is expressed as:
[0073] ;
[0074] ;
[0075] In the formula, , are the feature representations of the cover image after being processed by the kth and k+1th reversible interaction blocks respectively; , are the feature representations of the secret image after being processed by the kth and k+1th reversible interaction blocks, respectively, k=1, 2, 3, 4; represents the sigmoid function; cat represents the connection operation; D1 and D2 represent the residual dense block and the multi-scale fusion block respectively; ⊙ represents the dot multiplication operation in the matrix; exp represents the exponential function; Represents a 3×3 convolution; 1 represents a vector or matrix of all 1s, which is used as a bias term in the connection operation;
[0076] S43. In the reverse revealing process, the information flow is opposite to that in the forward hiding process, that is, the information is input from the last reversible interactive block and output from the first reversible interactive block. With the stego image and the auxiliary variable w extracted from the same Gaussian distribution as the lost information L as input, after being processed by five reversible interactive blocks, the restored image secret-rev can be obtained. The formula in the reverse revealing process is expressed as:
[0077] ;
[0078] ;
[0079] In the formula, , denote the auxiliary variables used in the kth and k+1th reversible interaction blocks respectively; , They are the feature representations of the stego images after being processed by the kth and k+1th reversible interaction blocks, respectively.
[0080] In the forward hiding process, the purpose of the LMFI network model framework is to ensure that the generated stego image is as consistent as possible with the cover image, and in the reverse revealing process, the purpose is to ensure that the recovered secret-rev image is as consistent as possible with the original secret image. Therefore, the total loss function consists of two parts, namely, the hiding loss and the recovery loss. The hiding loss is used to ensure that the stego image and the cover image are as consistent as possible, and the recovery loss is used to ensure that the secret image and the secret-rev image are as consistent as possible. Since the LMFI network model framework is a model based on a reversible neural network, reconstruction loss is required to ensure the integrity and reversibility of the network. The goal of the reconstruction loss is to minimize the reconstruction error between the network output and input so that the network can accurately restore the input data. Common reconstruction losses include the mean square error loss function (MSE), the mean absolute error loss function (MAE), and the cross-entropy loss function (Cross-Entropy Loss). In the embodiment, the mean absolute error loss function (MAE) is used because it is more robust and has a consistent range.
[0081] In S4, the loss functions used in the training process include hidden loss and recovery loss. The formula for hidden loss is:
[0082] ;
[0083] In the formula, Represents the total hidden loss; N represents the number of training samples, and i represents the i-th training sample; Represents the cover image corresponding to the i-th training sample; represents the stego image corresponding to the i-th training sample; It is the mean absolute error loss function MAE, which is used to measure and the degree of difference between
[0084] The formula for recovering the loss is:
[0085] ;
[0086] In the formula, represents the total recovery loss; represents the calculation of the expected value of a random variable z, where z is derived from the probability distribution function obtained by sampling;
[0087] The total loss during training is the linear sum of hiding loss and restoration loss, expressed as:
[0088] ;
[0089] In the formula, , are the weights of hiding loss and recovery loss respectively.
[0090] In this embodiment, the function of the test set is to use the test set to test the trained LMFI network model framework and output the stego image and the secret-rev image.
[0091] In S4, during the training process, the batch size of the training is 4 and the initial learning rate is 1×10 −3.9 After 5 rounds of training, the learning rate is reduced to 1×10 −4.4 , after that, the learning rate is halved every 260 iterations, the total number of iterations is 2000, and the Adam optimizer is used to set other hyperparameters in the training process; , The initial values of are set to 5.0 and 3.0 respectively. In this embodiment, the training process is performed on an NVIDIA GeForce RTX 3080 GPU with a video memory of 10G.
[0092] The residual dense block has a five-layer structure. The multi-scale fusion block consists of two 3×3 convolutions and an upsampling block. The three interactions contained in each reversible interaction block are as follows: there are three interaction branches between the cover image and the secret image. In the first interaction branch, the information of the secret image is processed by the residual dense block and the multi-scale fusion block, connected in the channel dimension, and then processed by a 3×3 convolution block and added to the information of the cover image; in the second interaction branch, the information of the cover image is multiplied with the information of the secret image after being processed by a residual dense block and the sigmoid function and the exp function; in the third interaction branch, the information input to the reversible interaction block is processed by the residual dense block and the multi-scale fusion block, connected in the channel dimension, and then processed by a 3×3 convolution block and added to the information of the secret image.
[0093] A specific principle architecture of the reversible interaction block in the forward hidden process is as follows Figure 2 As shown in the figure, the process from input to output is shown, where C represents the connection of tensors in the channel dimension, A represents addition, M represents element-by-element multiplication, Exp and Sig represent the exp function and the sigmoid function respectively. A specific schematic diagram of the principle architecture of the reversible interaction block in the reverse disclosure process is shown in Figure 3 As shown, the process from input to output is shown, where S represents subtraction and D represents element-by-element division.
[0094] A specific LMFI network model framework is as follows: Figure 4 As shown in the figure, in the forward hiding process, the cover image and the secret image are first used as the input of the network. The input image will be processed by five consecutive reversible interaction blocks (forward), and the output of the fifth reversible interaction block is the required hidden image (stego image) and some lost information (L). In the reverse revealing process, the lost information (L) will be processed by a Gaussian noise sampling module to obtain auxiliary information (auxiliary variable w). Then, the hidden image and the auxiliary information will be used as the input of the reverse revealing process. After being processed by five reversible interaction blocks (reverse), the recovered secret image (secret-rev image) and the recovered cover image can be obtained. Figure 4 It is shown that the five reversible interaction blocks (forward) and the five reversible interaction blocks (reverse) have the same parameters. In practice, five reversible interaction blocks can be used to perform corresponding operations and interactions according to the differences in forward and reverse directions.
[0095] Embodiment 2: An image hiding device based on a reversible neural network, comprising:
[0096] a memory having a computer processing program stored thereon;
[0097] The processor is used to execute the computer processing program in the memory to implement the image hiding method based on a reversible neural network described in Example 1.
Claims
1. An image hiding method based on a reversible neural network, characterized in that The following steps are involved: S1. Based on a public data set, obtain training images and preprocess the training images; S2, obtain the digital image to be watermarked, and use the qrcode library and Pillow library to generate a QR code image with the same size as the digital image; S3, constructing the LMFI network model framework, which includes several parameter-sharing reversible interaction blocks Inv-Block; S4, using the preprocessed training images to train the LMFI network model framework; S5, using the trained LMFI network model framework to process the digital image to be watermarked, that is, embedding the QR code image into the digital image as watermark information to generate an image containing a hidden watermark; S6. When it is necessary to extract the watermark from the hidden watermarked image, the trained LMFI network model framework is used to extract the watermark to obtain the restored watermarked image. In the above-mentioned S3, the LMFI network model framework includes five parameter-sharing reversible interaction blocks, each of which contains three interactions. Information is processed through a multi-scale fusion block, a residual dense block, an exp function, and a sigmoid function during the three interactions. In the above-mentioned S4, the training process includes the following steps: S41, alternately select images from the training set, one of which is used as the cover image cover, and the other is used as the secret image secret, where the secret image is the hidden image; S42. In the forward hiding process, the cover image and the secret image are first taken as the initial input. After being processed by five reversible interaction blocks, the hidden image stego and the lost information L are obtained. Among them, in the reversible interaction block, the information interaction process between the cover image and the secret image is expressed as: ; ; In the formula, , are the feature representations of the cover image after being processed by the kth and k+1th reversible interaction blocks respectively; , are the feature representations of the secret image after being processed by the kth and k+1th reversible interaction blocks, respectively, k=1, 2, 3, 4; represents the sigmoid function; cat represents the connection operation; D1 and D2 represent the residual dense block and the multi-scale fusion block respectively; ⊙ represents the dot multiplication operation in the matrix; exp represents the exponential function; Represents a 3×3 convolution; 1 represents a vector or matrix of all 1s, which is used as a bias term in the connection operation; S43. In the reverse revealing process, the information flow is opposite to that in the forward hiding process, that is, the information is input from the last reversible interactive block and output from the first reversible interactive block. With the stego image and the auxiliary variable w extracted from the same Gaussian distribution as the lost information L as input, after being processed by five reversible interactive blocks, the restored image secret-rev can be obtained. The formula in the reverse revealing process is expressed as: ; ; In the formula, , denote the auxiliary variables used in the kth and k+1th reversible interaction blocks respectively; , They are the feature representations of the stego images after being processed by the kth and k+1th reversible interaction blocks, respectively.
2. The image hiding method based on a reversible neural network according to claim 1, characterized in that: In the above-mentioned S1, the preprocessing process is to randomly crop the training image to a size of 224×224, and perform random horizontal and vertical rotations to increase the diversity of the data.
3. The image hiding method based on a reversible neural network according to claim 1, characterized in that: In S2, the qrcode library is a Python library for generating a QR code, and the Pillow library is an image processing library. The specific process of using the qrcode library and the Pillow library to generate a QR code image with the same size as a digital image is as follows: S21. Import the qrcode library and the Pillow library into the Python code, and define the data content contained in the QR code, where the data content includes one or more of a URL link, a text string, contact information, WIFI configuration, geographic location coordinates, a phone number, SMS content, and custom data; S22, creating a qrcode object and setting parameters to control the generation properties of the QR code, the parameters including version, error correction level, box size, and border size; S23. Add the defined data content to the qrcode object to generate a QR code image, adjust the size of the generated QR code image using the Pillow library, and then save the QR code image as a file.
4. The image hiding method based on a reversible neural network according to claim 1, characterized in that: In S1, the public data sets used are DIV2K and COCO. In S4, during training, the data set used in the training process is the training set in DIV2K, and a test set is set. The test set includes the test sets in DIV2K, COCO, and ImageNet, as well as the digital images introduced in S2 and the generated QR code images.
5. The image hiding method based on a reversible neural network according to claim 1, characterized in that: In S4, the loss function used in the training process includes hidden loss and recovery loss. The formula of hidden loss is: ; In the formula, represents the total hidden loss; N represents the number of training samples, and i represents the i-th training sample; Represents the cover image corresponding to the i-th training sample; represents the stego image corresponding to the i-th training sample; It is the mean absolute error loss function MAE, which is used to measure and the degree of difference between The formula for recovering the loss is: ; In the formula, represents the total recovery loss; represents the calculation of the expected value of a random variable z, where z is derived from the probability distribution function obtained by sampling; The total loss during training is the linear sum of hiding loss and recovery loss, expressed as: ; In the formula, , are the weights of hiding loss and recovery loss respectively.
6. The image hiding method based on a reversible neural network according to claim 5, characterized in that: In S4, during the training process, the batch size of the training is 4 and the initial learning rate is 1×10 −3.9 After 5 rounds of training, the learning rate is reduced to 1×10 −4.4 , after that, the learning rate is halved every 260 iterations, the total number of iterations is 2000, and the Adam optimizer is used to set other hyperparameters in the training process; , The initial values of are set to 5.0 and 3.0 respectively.
7. The image hiding method based on a reversible neural network according to claim 1, characterized in that: The residual dense block has a five-layer structure. The multi-scale fusion block consists of two 3×3 convolutions and an upsampling block. The three interactions contained in each reversible interaction block are as follows: there are three interaction branches between the cover image and the secret image. In the first interaction branch, the information of the secret image is processed by the residual dense block and the multi-scale fusion block, connected in the channel dimension, and then processed by a 3×3 convolution block before being added to the information of the cover image; in the second interaction branch, the information of the cover image is multiplied by the information of the secret image after being processed by a residual dense block and the sigmoid function and the exp function; In the third interaction branch, the information of the input reversible interaction block is processed by the residual dense block and the multi-scale fusion block, connected in the channel dimension, and then processed by a 3×3 convolution block before being added to the information of the secret image.
8. An image hiding device based on a reversible neural network, characterized in that: include: a memory having a computer processing program stored thereon; A processor is used to execute a computer processing program in a memory to implement an image hiding method based on a reversible neural network as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Point cloud up-sampling method based on reversible neural network
CN117173329A
Image hiding method, system and device based on DWT and progressive feature extraction and fusion and medium
CN118433322A