Image robust reversible information hiding method, device and medium based on neural network
By employing a two-stage method based on neural networks, robust watermarks are embedded using CNNs and the original carrier image is restored through a reversible neural network. This solves the problems of insufficient robustness and reversibility in existing technologies, and achieves effective watermark extraction and image restoration under attack conditions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGSU WATERMARK TECH CO LTD
- Filing Date
- 2022-12-15
- Publication Date
- 2026-05-12
AI Technical Summary
Existing robust reversible watermarking algorithms have limitations in terms of robustness and reversibility, and cannot simultaneously recover the original carrier image and correctly extract the watermark when the image is maliciously attacked.
A two-stage approach based on neural networks is adopted. First, a robust watermark sequence is embedded through a convolutional neural network (CNN). Then, auxiliary information is embedded through a reversible neural network to recover the original carrier image. The robust and reversible model is used to resist noise attacks.
It can fully restore the original carrier image and correctly extract the watermark when there is no attack, and can still correctly extract the watermark when attacked, thus achieving a balance between image robustness and reversibility.
Smart Images

Figure CN115829819B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image analysis technology, specifically relating to a robust and reversible image information hiding method based on neural networks. Background Technology
[0002] In fields such as satellite imagery, medical imaging, and miniature imaging, where high fidelity and robustness are crucial, the irreversible loss of robust watermarks and the fragility of reversible watermarks are intolerable. This has led researchers to develop a novel watermarking algorithm: the robust reversible watermarking algorithm. In the absence of attacks, the robust reversible watermarking algorithm can extract the watermark and recover the carrier image at the decoding end. However, when a watermarked image is maliciously attacked, although the watermark can be correctly extracted, the reversibility is compromised, rendering the carrier image unrecoverable.
[0003] The early robust reversible watermarking algorithm proposed by De Vleeschouwer et al. used a histogram rotation technique based on dual mapping transformation. Each selected embedding block was randomly divided into two sets with the same number of pixels. The pixel values were mapped onto two rings, and the center of each ring was connected to the centroids of the two rings to form two vectors. Information was embedded between these vectors using angles (Technical Reference 1). Subsequently, Ni et al. improved upon the robust reversible watermarking algorithm proposed by De Vleeschouwer et al., avoiding salt-and-pepper noise caused by histogram rotation. However, this improvement inevitably introduced overflow / underflow errors (i.e., blocks with pixel values less than 0 or greater than 255) at the decoding end. Therefore, Ni et al. adopted error-correcting coding, but the disadvantage was a significant reduction in the embedding capacity (Technical Reference 2).
[0004] Coltuc et al. proposed a lossless robust watermarking algorithm based on a two-stage watermarking scheme (existing technology reference 3). Wang et al. improved Coltuc's two-stage watermarking framework by dividing the original carrier image into two independent embedding domains in the integer Haar wavelet transform domain. The watermark sequence is embedded in the low-frequency coefficient region, and the difference between the carrier image and the robust watermark image is embedded in the high-frequency coefficient region. However, the robust features utilized by the classic robust reversible watermarking algorithm are related to the pixel position, leading to decoding failure against geometric attacks. Jiren Zhu et al. first applied neural networks to the field of digital image watermarking, but this method could not reversibly recover the original carrier image (technology reference 4). Therefore, existing robust reversible watermarking algorithms all have limitations in terms of robustness. This invention considers using a reversible neural network to complete the recovery of the original carrier image and proposes a neural network-based image robust reversible information hiding method.
[0005] [Existing Technical Documents]
[0006] [Technical Document 1]
[0007] De Vleeschouwer C, Macq B. Circular interpretation of bijective transformations in lossless watermarking for media asset management[J]. Multimedia, IEEE Transactions on, 2003, 5(1): 97-105.
[0008]
Technical Document 2
[0009] Ni Z, Shi Y Q, Ansari N, et al. Robust lossless image data hiding designed for semi-fragile image authentication[J]. Circuits and Systems for Video Technology, IEEE Transactions on, 2008, 18(4): 497-509.
[0010]
Technical Document 3
[0011] Coltuc D, Chassery J M. Distortion-free robust watermarking: a case study[C] / / Electronic Imaging 2007. International Society for Optics and Photonics, 2007: 65051N-65051N-8.
[0012]
Technical Document 4
[0013] Jiren Zhu, Russell Kaplan, Justin Johnson, Li Fei-Fei; Proceedings of the European Conference on Computer Vision (ECCV), 2018, pp. 657-672。 Summary of the Invention
[0014] The purpose of this invention is to embed a watermark into the original carrier image to obtain a robust watermark image, then embed auxiliary information for reconstructing the original carrier image, and finally obtain the watermark image. This method comprises two stages: the first stage uses a convolutional neural network to embed a robust watermark sequence, and the second stage uses a reversible neural network to embed auxiliary information for reconstructing the original carrier image. When no attack has occurred, the original carrier image can be completely recovered, and the watermark sequence can be correctly extracted. Even under attack, the strong robustness of the first stage ensures that the watermark sequence can still be correctly extracted.
[0015] Other features and advantages of embodiments of this disclosure will become apparent from the following detailed description, or may be learned in part by practice of embodiments of this disclosure.
[0016] In a first aspect, the present invention provides a robust and reversible image information hiding method based on a neural network, comprising embedding a watermark and extracting the watermark, wherein embedding the watermark includes the following steps:
[0017] S11: Obtain the feature image by passing the original carrier image through a CNN convolutional block;
[0018] S12: Extend the one-dimensional robust watermark sequence to obtain the extended watermark sequence. To facilitate comprehensive embedding, the feature image obtained in S11 is combined with the extended watermark sequence and the original carrier image. The images are sequentially stacked, and then coded by convolutional blocks with added noise. The acoustic layer is trained using a robust reversible model to resist various noises, thereby correctly extracting robust watermark sequences.
[0019] S13: Subtract the original carrier image from the encoded image, perform Huffman lossless compression to reduce the zero pixel values in the difference image, and embed the difference image into the encoded image by passing the resulting difference image and the encoded image through a forward-mapped invertible neural network model.
[0020] S14: The forward output of the carrier image branch of the forward-mapped reversible neural network model is used as the final embedded watermark image, and the forward output of the difference image branch of the forward-mapped reversible neural network model is defined as a constant matrix that does not contain effective information.
[0021] If the watermark image has not been subjected to any malicious attacks or information tampering, watermark extraction includes the following steps:
[0022] S21: The final embedded watermark image and the constant matrix are processed through an invertible neural network model with reverse mapping;
[0023] S22: Using the reverse mapping of the reversible neural network, the reverse output of the carrier image branch of the reverse-mapped reversible neural network model is set as the restored coded image, the reverse output of the difference image branch of the reverse-mapped reversible neural network model is set as the output information, and the restored coded image and the output information are added to obtain the final restored carrier image.
[0024] S23: The restored encoded image is processed through CNN convolutional blocks and the trained robust reversible model to obtain the restored watermark sequence. .
[0025] In one embodiment, if the watermarked image has been attacked and the information has been tampered with, the step of extracting the watermark further includes:
[0026] S24: Pass the restored coded image through a convolutional neural network, a pooling layer, and a linear layer to obtain the restored watermark sequence again. .
[0027] In one embodiment, in the image robust reversible information hiding method based on neural networks of the present invention, the robust reversible model in step S12 includes:
[0028] encoder , The encoder uses parameters for training. Receive raw carrier image and watermark sequence The original carrier image is CHW in size, and the watermark sequence is a binary string. The watermark sequence length is The encoder outputs a encoded image of size CHW. ;
[0029] Noise layer The noise layer Input encoded image The encoded image is subjected to a noise attack, and a noisy image is output. ;
[0030] decoder , The decoder is used as training parameters. From noisy images Extract watermark sequence ,right and Perform stochastic gradient descent.
[0031] In one embodiment, in the neural network-based image robust reversible information hiding method of the present invention, since the human eye cannot distinguish the encoded image in step S12... Compared with the original carrier image The difference lies in the image distortion loss. Represents the original carrier image With encoded image The similarity between them is used to reduce the size of the difference image, specifically:
[0032]
[0033] in, The original carrier image, For encoding images, L2 norm, or Euclidean distance, is the sum of the squares of the elements of vector x. CHW is the power of CHW, where CHW is the size of the original carrier image.
[0034] In one embodiment, in the image robust reversible information hiding method based on neural networks of the present invention, the watermark sequence extracted by the decoder of the convolutional neural network in step S24 is... With the extended watermark sequence in step S12 The similarity between them is measured by the loss of watermark information distortion. The specific method is as follows:
[0035]
[0036] in, To extend the watermark sequence, To restore the watermark sequence, L2 norm, or Euclidean distance, is the sum of the squares of the elements of vector x. Power of 1 is the length of the watermark sequence.
[0037] In one embodiment, in the neural network-based image robust reversible information hiding method of the present invention, for and The purpose of performing stochastic gradient descent is to reduce the sum of image distortion loss and watermark sequence distortion loss. In step S12, when training with a robust reversible model, the sum of image distortion loss and watermark sequence distortion loss is reduced. Gradient descent is performed in the following manner:
[0038]
[0039] in, Indicates image distortion loss. This indicates the loss due to watermark sequence distortion. This represents the relative weights that control the loss of image distortion. The relative weights are used to control the distortion loss of the watermark sequence.
[0040] In one embodiment, in the image robust reversible information hiding method based on neural networks of the present invention, the reversible neural network model in steps S13 and S22 adopts the same model, which is composed of multiple reversible modules containing neural networks cascaded together. The bidirectional mapping of this model shares all parameters, so that the original carrier image can be recovered regardless of whether the watermark image is attacked, and the watermark sequence can be correctly extracted at the same time.
[0041] The present invention also provides an electronic device and a computer-readable storage medium capable of executing instructions or computer programs that implement a neural network-based image robust reversible information hiding method.
[0042] In a second aspect, the present invention also provides an electronic device comprising: one or more processors; a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement instructions as described in any of the first aspects.
[0043] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method as described in any of the first aspects.
[0044] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0045] The image robust and reversible information hiding method based on neural networks of this invention achieves both robustness and reversibility of watermark embedding by employing neural networks in both the robust embedding stage and the reversible embedding stage, resulting in better practical application performance. This invention can be applied to many fields such as copyright protection and image protection, and has broad application prospects. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments of this disclosure will be briefly introduced below. Obviously, the accompanying drawings described below are only a part of the embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on the content of the embodiments of this disclosure and these drawings without creative effort.
[0047] Figure 1 This is a two-stage overall flowchart of the embedded watermark described in this invention.
[0048] Figure 2 This is a schematic diagram of the convolutional neural network model for the robust watermark embedding stage of the present invention.
[0049] Figure 3 This is a schematic diagram of the reversible neural network model for the reversible watermark embedding stage of the present invention.
[0050] Figure 4 This is a schematic diagram of the convolutional neural network model for the robust watermark extraction step of the present invention.
[0051] Figure 5 This is a schematic diagram of the reversible neural network model for the reversible watermark extraction step of the present invention.
[0052] Figure 6 This is a standard test image.
[0053] Figure 7 The original carrier image and the final watermarked image. Detailed Implementation
[0054] To make the technical problems solved, the technical solutions adopted, and the technical effects achieved by the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the embodiments of this disclosure.
[0055] The technical solutions of the embodiments of this disclosure will be further described below with reference to the accompanying drawings and specific implementation methods.
[0056] The image robust reversible information hiding method based on neural networks in this application includes embedding watermarks and extracting watermarks. When extracting watermarks, different methods can be used to extract watermarks depending on whether the image has been attacked.
[0057] The overall flowchart of the watermark embedding invention is as follows: Figure 1 As shown, the general steps are as follows: first, a robust watermarking algorithm is used to embed the robust watermark sequence into the original carrier image to obtain a robust watermark image; then, the information used to recover the original carrier image is used as auxiliary information and a reversible watermarking algorithm is used to embed it into the robust watermark image to obtain the final embedded watermark image.
[0058] The neural network model for the robust watermark embedding stage of this invention is as follows: Figure 2 As shown, the specific steps are as follows:
[0059] S11: Obtain the feature image by passing the original carrier image through a CNN convolutional block;
[0060] S12: Extend the one-dimensional robust watermark sequence to obtain the extended watermark sequence. To facilitate comprehensive embedding, the feature image obtained in S11 is combined with the extended watermark sequence and the original carrier image. The images are sequentially stacked, and then coded by convolutional blocks with added noise. The acoustic layer is trained using a robust reversible model to resist various types of noise, thereby correctly extracting robust watermark sequences. When encoding images... After passing through the noise layer, the output image has C channels, but its height and width are not necessarily the same as the original carrier image. .
[0061] Utilizing an end-to-end neural network model including the encoder Noise layer decoder , and These are the parameters used for training. Encoder Receive raw carrier image and watermark sequence The original carrier image is CHW in size, and the watermark sequence is a binary string. The watermark sequence length is The encoder outputs a encoded image of size CHW. Noise layer Input encoded image The encoded image is subjected to a noise attack, and a noisy image is output. Decoder From noisy images Extract watermark sequence .
[0062] Because the human eye cannot distinguish the encoded image in step S12. Compared with the original carrier image The difference lies in the image distortion loss. Represents the original carrier image With encoded image The similarity between them is used to reduce the size of the difference image, specifically:
[0063]
[0064] in, The original carrier image, For encoding images, L2 norm, or Euclidean distance, is the sum of the squares of the elements of vector x. CHW is the power of CHW, where CHW is the size of the original carrier image.
[0065] The watermark sequence extracted by the decoder should be the same as the embedded watermark sequence. This refers to the watermark sequence extracted by the decoder of the convolutional neural network in step S24. With the extended watermark sequence in step S12 The similarity between them is measured by the loss of watermark information distortion. The specific method is as follows:
[0066]
[0067] in, To extend the watermark sequence, To restore the watermark sequence, Let L2 norm, or Euclidean distance, be the power of the sum of the squares of the elements of vector x. is the length of the watermark sequence.
[0068] In step S12, during training using a robust reversible model, the sum of image distortion loss and watermark sequence distortion loss is reduced. Gradient descent is performed in the following manner:
[0069]
[0070] in, Indicates image distortion loss. This indicates the loss due to watermark sequence distortion. This represents the relative weights that control the loss of image distortion. The relative weights are used to control the distortion loss of the watermark sequence.
[0071] Regarding the encoding network of the robust reversible model, convolution (Conv), batch normalization (BN), and activation function (ReLU) are first integrated into a Conv-BN-ReLU block. The encoder contains four such blocks, each with a 3x3 convolution kernel, a stride of 1, a padding size of 1, and an output filter of 64 (64 channels). The original carrier image of size CHW is processed by the four Conv-BN-ReLU blocks to generate a transition representation of size 64*H*W. Since the watermark sequence is L*1*1 in size, to embed the watermark sequence at any position in the original carrier image, the dimension of the watermark sequence needs to be consistent with the dimension of the transition representation of the original carrier image. Therefore, the watermark sequence is expanded to L*H*W, ensuring that the entire watermark sequence can be accessed by the convolutional filter. The previously generated transition representation of the original carrier image is then superimposed with the copied watermark sequence and the original carrier image to obtain a joint representation of (64+L+C)*H*W. Finally, it is passed through a Conv-BN-ReLU block and a convolutional layer with a 1*1 kernel, a stride of 1, and C output filters to output a encoded image of size CHW. This refers to the robust watermark transition image mentioned in the second stage. When the encoded image... After passing through the noise layer, the output image has C channels, but its height and width are not necessarily the same as the original carrier image. .
[0072] The neural network model in the watermark embedding step of this invention is as follows: Figure 3 As shown, the specific steps are as follows:
[0073] S13: Subtract the original carrier image from the encoded image, perform Huffman lossless compression to reduce the zero pixel values in the difference image, and embed the difference image into the encoded image by passing the resulting difference image and the encoded image through a forward-mapped invertible neural network model.
[0074] S14: The forward output of the carrier image branch of the forward-mapped reversible neural network model is used as the final embedded watermark image, and the forward output of the difference image branch of the forward-mapped reversible neural network model is defined as a constant matrix that does not contain effective information.
[0075] The forward mapping of the reversible neural network model is composed of multiple cascaded reversible modules, each module containing a carrier image branch. Sum and difference image branches Carrier image branch Sum and difference image branches The number of channels is C, and the input of the nth invertible module for its forward mapping is... The output is The forward mapping formula is as follows:
[0076]
[0077]
[0078] in, , , Let be any function, including convolutional neural networks. During training, the invertible network encodes image branches. The positive output is used as the final watermarked image. The loss function is
[0079]
[0080] in, The original carrier image, For encoding images, L2 norm, or Euclidean distance, is the sum of the squares of the elements of vector x. CHW is the power of CHW, where CHW is the size of the original carrier image.
[0081] Branching the difference image The positive output is defined as a constant matrix that does not contain any valid information.
[0082] The neural network model for the robust watermark extraction step in this invention is as follows: Figure 4 As shown, step S31: The attacked watermark image is passed through a convolutional neural network, a pooling layer, and a linear layer to output a robust watermark sequence.
[0083] Noise image (or encoded image) After passing through 7 Conv-BN-ReLU blocks and 1 convolutional layer with a 3*3 kernel, stride of 1, padding of 1, and L output filters, an L*H*W transition representation is obtained. This representation is then passed through global spatial average pooling with average pooling across all spatial dimensions (H*W) and a final L*L linear layer to extract an L*1*1 watermark sequence. .
[0084] The neural network model in the watermark extraction step of this invention is as follows: Figure 5 As shown, the specific steps are as follows:
[0085] S21: The final embedded watermark image and the constant matrix are processed through an invertible neural network model with reverse mapping;
[0086] S22: Using the reverse mapping of the reversible neural network, the reverse output of the carrier image branch of the reverse-mapped reversible neural network model is set as the restored coded image, the reverse output of the difference image branch of the reverse-mapped reversible neural network model is set as the output information, and the restored coded image and the output information are added to obtain the final restored carrier image.
[0087] Specifically, noisy images (or encoded image) After passing through 7 Conv-BN-ReLU blocks and 1 convolutional layer with a 3*3 kernel, stride of 1, padding of 1, and L output filters, an L*H*W transition representation is obtained. This representation is then passed through global spatial average pooling with average pooling across all spatial dimensions (H*W) and a final L*L linear layer to extract an L*1*1 watermark sequence. .
[0088] The reversible neural network inverse mapping separates features from the coded image and the difference image in the watermark image. For the nth inverse module, the input to the inverse mapping is... The output is The inverse mapping formula is shown below:
[0089]
[0090]
[0091] in, , , Let it be any function, including convolutional neural networks. Encode image branches using an invertible network. The inverse output is used as the recovered coded image, and the difference image branch is used. The inverse output is used as the difference image information of the output.
[0092] The robustness and reversibility of the method of this invention are shown in Tables 1 to 3 below. In the experiments, the method of this invention was compared with the method described in "HiDDeN: Hidding Data With Deep Networks" (Technical Document 4) published by Jiren Zhu et al. HiDDeN is a method for steganography and robust watermark embedding extraction using neural networks. This method has good robustness, but its drawback is that it cannot recover the original carrier image because robust watermarks are not reversible. The method of this invention uses a reversible neural network to achieve the reversibility of the watermark, thereby recovering the original carrier image. Both this method and HiDDeN were tested on the COCO dataset and six standard test images to test the robustness of the two methods and the reversibility of this method. The test images, i.e., the original carrier images, are shown below. Figure 6 As shown. Robustness is represented by the accuracy rate during watermark extraction, and reversibility is objectively represented by the PSNR index to indicate the image quality after watermark embedding. A comparison between the final watermarked image obtained using the method of this invention and the original carrier image is shown below. Figure 7 As shown.
[0093] Experimental results
[0094] As shown in Table 1, the PSNR index of the method of the present invention is higher than that of the HiDDeN method when using six standard test images.
[0095] As shown in Table 2, in terms of the accuracy of watermark extraction after an attack, the method of the present invention has a slightly higher accuracy rate than the HiDDeN method when using crop, cropout, and dropout, but a much higher accuracy rate when using Gaussian and JPEG, reaching a practical level.
[0096] As shown in Table 3, regarding the accuracy of JPEG compression under different quality factors, the method of the present invention achieves an accuracy of over 90% when q50 is above, reaching a practical level.
[0097] Table 1. PSNR (dB) of standard test images
[0098] baboon boat clock lake airplane HiDDeN 38.33 38.05 37.71 36.58 38.04 Method of the present invention 38.71 39.57 39.62 37.53 39.73
[0099] Table 2. Watermark extraction accuracy (%) after attack
[0100]
[0101] Table 3. JPEG compression accuracy (%) under different quality factors
[0102] q 20 30 40 50 60 70 80 90 accuracy 75.34 79.03 89.20 92.49 93.91 95.49 96.74 99.82
[0103] In embodiments of the present invention, an electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). The RAM also stores various programs and data required for the operation of the electronic device. The processing device, the ROM, and the RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus. Embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by the processing device, it performs the functions and effects defined in the methods of the embodiments of the present invention.
[0104] It should be noted that the computer-readable medium described in the embodiments of this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the embodiments of this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the embodiments of this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0105] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0106] The aforementioned computer-readable medium carries one or more programs. When the aforementioned one or more programs are executed by the electronic device, the electronic device causes the following: It obtains a feature image from the original carrier image through a CNN convolutional block; it expands the one-dimensional robust watermark sequence to obtain an extended watermark sequence for easy full embedding; it sequentially superimposes the obtained feature image, the extended watermark sequence, and the original carrier image, then obtains an encoded image through a convolutional block, adds a noise layer, and trains it using a robust reversible model to resist various noises, thereby correctly extracting the robust watermark sequence; it subtracts the original carrier image from the encoded image, performs Huffman lossless compression to reduce zero pixel values in the difference image, and embeds the difference image into the encoded image through a forward-mapped reversible neural network model; and it uses the forward output of the carrier image branch of the forward-mapped reversible neural network model as the final... The watermarked image is embedded, and the forward output of the difference image branch of the forward-mapped reversible neural network model is defined as a constant matrix without effective information. The final embedded watermarked image and the constant matrix are passed through the reverse-mapped reversible neural network model. Using the reverse mapping of the reversible neural network, the reverse output of the carrier image branch of the reverse-mapped reversible neural network model is set as the restored encoded image, and the reverse output of the difference image branch of the reverse-mapped reversible neural network model is set as the output information. The restored encoded image and the output information are added to obtain the final restored carrier image. The restored encoded image is passed through CNN convolutional blocks and the trained robust reversible model to obtain the restored watermark sequence. If the obtained restored watermark sequence is maliciously attacked or the information is tampered with, the restored encoded image is passed through a convolutional neural network, a pooling layer, and a linear layer to obtain the restored watermark sequence again.
[0107] Computer program code for performing the operations of embodiments of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0108] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this disclosure.
Claims
1. A robust and reversible image information hiding method based on neural networks, including watermark embedding and watermark extraction. The embedded watermark includes the following steps: S11: Obtain the feature image by passing the original carrier image through a CNN convolutional block; S12: extending the one-dimensional robust watermark sequence to obtain an extended watermark sequence , facilitating comprehensive embedding, sequentially superimposing the feature image obtained in S11, the extended watermark sequence, and the original carrier image , and obtaining an encoded image by a convolution block The robust reversible model is trained in the sound layer to resist various noises, so as to correctly extract the robust watermark sequence; S13: Subtract the original carrier image from the encoded image, perform Huffman lossless compression to reduce the zero pixel values in the difference image, and embed the difference image into the encoded image by passing the resulting difference image and the encoded image through a forward-mapped invertible neural network model. S14: The forward output of the carrier image branch of the forward-mapped invertible neural network model is used as the final embedded watermark image, and the forward output of the difference image branch of the forward-mapped invertible neural network model is defined as a constant matrix that does not contain effective information. The watermark extraction process includes the following steps: S21: The final embedded watermark image and the constant matrix are processed through an invertible neural network model with reverse mapping; S22: Using the reverse mapping of the reversible neural network, the reverse output of the carrier image branch of the reverse-mapped reversible neural network model is set as the restored coded image, the reverse output of the difference image branch of the reverse-mapped reversible neural network model is set as the output information, and the restored coded image and the output information are added to obtain the final restored carrier image. S23: obtaining a restored watermark sequence by passing the restored coded image through a CNN convolution block and the trained robust invertible model ; S24: the recovered watermark sequence obtained in the step S23 In the case of malicious attacks or information tampering, the recovered encoding image is passed through a convolutional neural network, a pooling layer, and a linear layer to obtain the recovered watermark sequence again .
2. The neural network-based image robust reversible information hiding method according to claim 1, characterized in that: The model in step S12 includes Encoder , For training, the encoder receives an original carrier image and a watermark sequence , the original carrier image has a size of CHW, the watermark sequence is a binary string , the watermark sequence has a length of , and the encoder outputs an encoded image with a size of CHW ; noise layer the noise layer input encoded image noise attack on the encoded image, outputting a noisy image ; Decoder , For training, the decoder extracts a watermark sequence from a noisy image , and and performs stochastic gradient descent.
3. The image robust reversible information hiding method based on neural networks according to claim 2, characterized in that: Because the human eye cannot distinguish the encoded image in step S12. Compared with the original carrier image The difference lies in the image distortion loss. Represents the original carrier image With encoded image The similarity between them is used to reduce the size of the difference image, specifically: wherein, is the original carrier image, is the encoded image, denotes the L2 norm, i.e. the Euclidean distance, of the sum of the squares of the individual elements of the x vector, is the size of the original carrier image.
4. The image robust reversible information hiding method based on neural networks according to claim 2, characterized in that: The watermark sequence extracted from the decoder of the convolutional neural network in the S24 step The similarity between the extended watermark sequence in the S12 step The similarity between the extended watermark sequence in the S12 step The similarity between the extended watermark sequence in the S12 step The similarity between the extended watermark sequence in the S12 step The similarity between the extended watermark sequence in the S12 step The similarity between the extended watermark sequence in the S12 step The similarity between the extended watermark sequence in the S12 step The similarity between the in, To extend the watermark sequence, To restore the watermark sequence, L2 norm, or Euclidean distance, is the sum of the squares of the elements of vector x. Power of 1 is the length of the watermark sequence.
5. The image robust reversible information hiding method based on neural networks according to claim 2, characterized in that: In step S12, during training using a robust reversible model, the sum of image distortion loss and watermark sequence distortion loss is reduced. Gradient descent is performed in the following manner: in, Indicates image distortion loss. This indicates the loss due to watermark sequence distortion. This represents the relative weights that control the loss of image distortion. The relative weights are used to control the distortion loss of the watermark sequence.
6. The image robust reversible information hiding method based on neural networks according to claim 2, characterized in that: The reversible neural network model in steps S13 and S22 uses the same model, which is composed of multiple reversible modules containing neural networks cascaded together. The bidirectional mapping of this model shares all parameters, so the original carrier image can be recovered regardless of whether the watermark image has been attacked, and the watermark sequence can be extracted correctly at the same time.
7. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the instructions of the method as described in any one of claims 1-6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-6.