A Robust Image Watermarking Method Using Two-Stage Precoding and Wavelet Network

Through the two-stage precoding and wavelet network method, the problems of small capacity, poor visual quality and inflexible embedding in the prior art are solved, and more efficient watermark information embedding and better visual quality are achieved.

CN114529442BActive Publication Date: 2025-07-01SUN YAT SEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210181710.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-25
Publication Date
2025-07-01
Estimated Expiration
2042-02-25

AI Technical Summary

Technical Problem

The prior art has problems in image watermarks with small information capacity, poor visual quality and inflexible embedding.

Method used

The robust image watermark method of two-stage precoding and wavelet network is adopted to convert the watermark information into a message image through two-stage precoding, and the wavelet integrated neural network is used to generate residual watermarks, combining the mask mechanism to embed watermarks with higher intensity in the image texture-rich area.

Benefits of technology

It improves the information capacity and visual quality of image watermarks, while making the watermark embedding more flexible, and can adjust the embedding intensity and capacity of the watermark according to actual needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114529442B_ABST
    Figure CN114529442B_ABST
Patent Text Reader

Abstract

In view of the limitations of the prior art, the present invention proposes a robust image watermarking method using two-stage precoding and wavelet networks. By closely integrating the two-stage watermark information preprocessing scheme with the masking mechanism, the watermark information can be evenly distributed in the image through redundant coding. At the same time, combined with the masking mechanism, stronger watermarks are embedded in the rich-texture areas of the image and the embedding strength of the watermark in the smooth areas of the image is reduced, ensuring the visual quality of the image. In terms of watermark capacity, on the one hand, the wavelet integrated neural network improves the robustness of the watermark; on the other hand, the embedding mechanism of the two-stage watermark information preprocessing scheme allows manual control of the redundancy of the watermark, thus improving the capacity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of multimedia content security, and specifically, to the application of deep learning technology in this field; more specifically, it relates to a robust image watermarking method using two-stage precoding and wavelet network. Background Art

[0002] In the technology of image watermarking, there is a robust watermarking method against printing and shooting based on deep learning: StegaStamp. This method mainly includes two parts: an encoder and a decoder, and both the encoder and the decoder are composed of convolutional neural networks. Among them, the encoder uses a neural network architecture in the style of U-Net. The input is a 3-channel RGB image with a size of 400×400 and a 100-bit binary information sequence. This information sequence forms a tensor of 50×50×3 through a fully connected layer, and then is upsampled to a tensor of 400×400×3. It is concatenated with the image data tensor to form a tensor of 400×400×6, and then sent into the encoder network. The output is a 3-channel RGB residual image, and the final watermarked image is obtained by adding this residual image to the original image. The decoder first uses a Spatial Transformer Network (STN) to make the decoder have a certain robustness to small perspective changes, and then a convolutional neural network. The final fully connected output layer is connected to sigmoid so that the output is in the range of [0,1], and finally an integer is taken to obtain a binary information sequence. The input of the decoder is the watermark image detected by the detector after the watermarked image has been printed and shot. This image is also a 3-channel RGB image with a size of 400×400. The decoder output is a 100-bit binary information sequence, representing the watermark information extracted from the watermarked image.

[0003] However, the above-mentioned prior art has three relatively prominent disadvantages.

[0004] First of all, the embeddable information capacity is small. On the premise of ensuring good robustness, for a carrier image with a resolution of 400*400, StegaStamp can embed 100 bits. After removing the supervision bits of BCH error correction coding, the effective payload is only 56 bits. In order to resist geometric transformation attacks, StegaStamp generally embeds the watermark in the low-frequency components of the image. However, the overall capacity of the low-frequency information itself is small, and coupled with the redundancy existing in the embedding itself, although the robustness is guaranteed, the capacity space is compressed.

[0005] Secondly, the visual quality is not good. In order to resist geometric transformation attacks, the watermark information is generally embedded in the low-frequency components, so visible shadows are formed in the smooth areas of the watermarked image.

[0006] Finally, the embedding is not flexible. StegaStamp is an end-to-end robust image watermarking solution. In use, there is only one embedding strength and embedding capacity. To use new embedding strengths and embedding capacities, the model must be retrained. This makes its embedding less flexible. Summary of the Invention

[0007] In view of the limitations of the prior art, the present invention proposes a robust image watermarking method using two-stage precoding and wavelet networks. The technical solution adopted by the present invention is as follows:

[0008] A robust image watermarking method using two-stage precoding and wavelet networks embeds watermark information through the following steps:

[0009] S11, obtain the carrier image and the watermark information; calculate the mask of the carrier image; convert the watermark information into a message image through two-stage precoding;

[0010] S12, input the carrier image and the message image into a preset robust image watermarking network, and generate a preliminary residual watermark through the robust image watermarking network; the robust image watermarking network is obtained by training a basic framework of the robust image watermarking network; the basic framework of the robust image watermarking network includes an encoder and a decoder respectively composed of a wavelet integrated neural network;

[0011] S13, multiply the mask of the carrier image and the preliminary residual watermark to obtain the final residual watermark;

[0012] S14, add the final residual watermark to the carrier image to obtain the image with the embedded watermark.

[0013] Compared with the prior art, the present invention closely combines the two-stage watermark information preprocessing scheme with the mask mechanism, can evenly distribute the watermark information in the image through redundant coding, and at the same time combines the mask mechanism to embed a higher-strength watermark in the rich-texture area of the image and reduce the embedding strength of the watermark in the smooth area of the image, ensuring the visual quality of the image; in terms of watermark capacity, on the one hand, the wavelet integrated neural network improves the robust watermark; on the other hand, the embedding mechanism of the two-stage watermark information preprocessing scheme allows manual control of the redundancy of the watermark, thus improving the capacity.

[0014] As a preferred solution, in the encoder, the following processing procedures are included:

[0015] After the carrier image input into the encoder extracts features through a two-dimensional convolutional layer, it is gradually downsampled through three discrete wavelet transform modules to obtain the high-dimensional features of the carrier image;

[0016] After the message image of the input encoder extracts features through a two-dimensional convolutional layer, it is concatenated with the high-dimensional features of the carrier image; the concatenated result is gradually upsampled through three inverse discrete wavelet transform modules, and after each upsampling, it is concatenated with the feature maps of the same size in the corresponding downsampling process, and finally output through a two-dimensional convolutional layer.

[0017] As a preferred solution, in the decoder, the image input to the decoder passes through a two-dimensional convolutional layer and three discrete wavelet transform modules in sequence and then outputs the decoding result through a two-dimensional convolutional layer.

[0018] As a preferred solution, the total loss function of the basic framework for training the robust image watermark network is expressed by the following formula:

[0019]

[0020] where m1, m2, m3 represent loss weights; Lpips(Cover, C') represents the Lpips visual loss function between the carrier image Cover and the image C' after embedding the watermark; mean square error loss function W, H, C are the width, height, and number of channels of the tensor respectively; Secret represents the watermark information, and S' represents the decoded information.

[0021] As a preferred solution, the image after embedding the watermark is decoded through the following steps:

[0022] S21, calculate the mask of the image after embedding the watermark;

[0023] S22, input the image after embedding the watermark into the robust image watermark network, and obtain the preliminary decoding result through the robust image watermark network;

[0024] S23, multiply the preliminary decoding result with the mask of the image after embedding the watermark as the weight to obtain the weighted decoding result;

[0025] S24, split the weighted decoding result in the horizontal and vertical directions, average the split results and activate them using the step function to obtain the final decoding result.

[0026] As a preferred solution, in the discrete wavelet transform module, the following processing process is included:

[0027] After the input of the discrete wavelet transform module passes through a convolutional layer, it is downsampled through the discrete wavelet transform to convert the result obtained by this convolutional layer into four sub-bands of LL, LH, HL, and HH; the channels of LL, LH, HL, and HH are merged and then sent into a convolutional layer for output.

[0028] As a preferred solution, in the inverse discrete wavelet transform module, the following processing is included:

[0029] After the input of the inverse discrete wavelet transform module passes through a convolution layer, four equally divided sub-bands of LL, LH, HL and HH are obtained through a separation channel; LL, LH, HL and HH are inversely discretely transformed, and the result of the inverse discrete wavelet transform is sent to a convolution layer and then output.

[0030] The present invention also provides the following contents:

[0031] A robust image watermark system using two-stage precoding and wavelet network, comprising a watermark information embedding unit, the watermark information embedding unit comprising a preprocessing subunit, a preliminary residual watermark acquisition subunit, a final residual watermark acquisition subunit and an addition operation subunit; the preprocessing subunit is connected to the preliminary residual watermark acquisition subunit, the final residual watermark acquisition subunit and the addition operation subunit respectively; the preliminary residual watermark acquisition subunit is connected to the final residual watermark acquisition subunit; the final residual watermark acquisition subunit is connected to the addition operation subunit; wherein:

[0032] The preprocessing subunit is used to obtain a carrier image and watermark information; calculate a mask of the carrier image; and convert the watermark information into a message image through two-stage precoding;

[0033] The preliminary residual watermark acquisition subunit is used to input the carrier image and the message image into a preset robust image watermark network, and generate a preliminary residual watermark through the robust image watermark network; the robust image watermark network is obtained by training the robust image watermark network training basic framework; the robust image watermark network training basic framework includes an encoder and a decoder respectively composed of wavelet integrated neural networks;

[0034] The final residual watermark acquisition subunit is used for multiplying the mask of the carrier image and the preliminary residual watermark to obtain a final residual watermark;

[0035] The addition operation subunit is used to add the final residual watermark to the carrier image to obtain the image embedded with the watermark.

[0036] A storage medium stores a computer program, which, when executed by a processor, implements the steps of the aforementioned robust image watermarking method using two-stage precoding and wavelet network.

[0037] A computer device includes a storage medium, a processor, and a computer program stored in the storage medium and executable by the processor. When the computer program is executed by the processor, it implements the steps of the aforementioned robust image watermarking method using two-stage precoding and wavelet network. Description of the Drawings

[0038] Figure 1 It is a schematic flowchart of embedding watermark information by the robust image watermarking method using two-stage precoding and wavelet network provided in Embodiment 1 of the present invention;

[0039] Figure 2 It is a schematic principle diagram of embedding watermark information by the robust image watermarking method using two-stage precoding and wavelet network provided in Embodiment 1 of the present invention;

[0040] Figure 3 It is an operation example of two-stage precoding in Embodiment 1 of the present invention;

[0041] Figure 4 It is a schematic structural diagram of the basic framework for training the robust image watermark network provided in Embodiment 1 of the present invention;

[0042] Figure 5 It is a schematic structural diagram of the discrete wavelet transform module provided in Embodiment 1 of the present invention;

[0043] Figure 6 It is a schematic structural diagram of the inverse discrete wavelet transform module provided in Embodiment 1 of the present invention;

[0044] Figure 7 It is a schematic flowchart of decoding the image with embedded watermark by the robust image watermarking method using two-stage precoding and wavelet network provided in Embodiment 1 of the present invention;

[0045] Figure 8 It is a schematic principle diagram of decoding the image with embedded watermark by the robust image watermarking method using two-stage precoding and wavelet network provided in Embodiment 1 of the present invention;

[0046] Figure 9 It is a schematic diagram of the robust image watermarking system using two-stage precoding and wavelet network provided in Embodiment 2 of the present invention. Detailed Embodiments

[0047] The drawings are only for illustrative purposes and should not be construed as limitations of this patent;

[0048] It should be clear that the described embodiments are only a part of the embodiments of this application, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts belong to the scope protected by the embodiments of this application.

[0049] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the embodiments of the present application. The singular forms "a", "the", and "said" used in the embodiments of the present application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0050] When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims. In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects and do not have to be used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to specific circumstances.

[0051] In addition, in the description of the present application, unless otherwise specified, "a plurality of" means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after. The following further elaborates on the present invention in conjunction with the accompanying drawings and embodiments.

[0052] To solve the limitations of the prior art, this embodiment provides a technical solution. The technical solution of the present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0053] Embodiment 1

[0054] Please refer to Figure 1 and Figure 2 , a robust image watermarking method using two-stage precoding and wavelet network, and the embedding of watermark information is performed through the following steps:

[0055] S11. Obtain the carrier image cover and the watermark information; calculate the mask of the carrier image; convert the watermark information into a message image Secret through two-stage precoding;

[0056] S12. Input the carrier image cover and the message image Secret into a preset robust image watermark network to generate a preliminary residual watermark residual through the robust image watermark network. The robust image watermark network is obtained by training a basic framework of the robust image watermark network. The basic framework of the robust image watermark network includes an encoder P_Net and a decoder R_Net respectively composed of a wavelet integrated neural network.

[0057] S13. Multiply the mask mask of the carrier image and the preliminary residual watermark residual to obtain the final residual watermark.

[0058] S14. Add the final residual watermark to the carrier image cover to obtain the watermark-embedded image C'.

[0059] The above steps can be expressed in the form of formulas as follows:

[0060] residual = P_Net(cover, Secret)

[0061] mask = calc_mask(cover)

[0062] C' = cover + mask * residual

[0063] Compared with the prior art, the present invention closely combines the two-stage watermark information preprocessing scheme with the masking mechanism, enabling the watermark information to be evenly distributed in the image through redundant coding. At the same time, combined with the masking mechanism, stronger watermarks are embedded in the rich-texture areas of the image and the embedding strength of the watermark in the smooth areas of the image is reduced, ensuring the visual quality of the image. In terms of watermark capacity, on the one hand, the wavelet integrated neural network improves the robust watermark; on the other hand, the embedding mechanism of the two-stage watermark information preprocessing scheme allows manual control of the redundancy of the watermark, thereby improving the capacity.

[0064] Specifically, in the art, an image watermark method refers to a method for processing an image watermark, which may include the process of embedding watermark information into an image and may also include the process of decoding watermark information from an image.

[0065] Aiming at the disadvantage of inflexible embedding, this embodiment proposes a two-stage precoding scheme. In this scheme, this embodiment converts the binary bit string (watermark information) that should have been directly embedded into a message image with adjustable amplitude, and then embeds this message image into the carrier by the method of hiding an image in an image. Thus, according to the requirements in actual use: by adjusting the amplitude of the message image, the embedding strength of the watermark can be adjusted; by adjusting the redundancy of the message image, the capacity and robustness of the watermark can be adjusted. The scheme provided by this embodiment enables the realization of robust watermark embedding with different capacities and different strengths simply by setting parameters without multiple trainings.

[0066] Two-stage precoding is a preprocessing of the watermark information, which converts the original binary bit string into a message image suitable for embedding. In the first stage, BCH error-correcting code is used for encoding, and the original bit sequence with a length of 168 is expanded to 300 bits. In the second stage, redundancy coding is used.

[0067] Take Figure 3 as an example. First, rearrange the 300-bit information into a 10×10×3 tensor, and then repeat this tensor 5 times in the horizontal and vertical directions to obtain a new tensor with a size of 50×50×3 as Secret. The new tensor contains 25 times the redundancy of the original 300-bit information. In addition, some processing can be performed on the values in the new tensor: replace 0 in the original tensor with -x, and replace 1 in the original tensor with x. In the training stage, x~U(-1,1) can be used as the embedding information; in actual embedding, the value of |x| can be used to control the embedding strength of the watermark. The larger the value of |x|, the higher the watermark strength, the stronger the robustness, and the worse the visual effect. The sign of x represents the embedding value.

[0068] Aiming at the disadvantage of poor visual quality of the image, the embedding mask of the watermark in this embodiment greatly improves the visual quality of the image after embedding the watermark. More specifically, as a preferred embodiment, the local complexity of the image can be used as the watermark mask, and the L0 norm after quantifying the coefficients of the block DCT is used as a measure of the local complexity of the image. Subsequent experiments show that for a 400x400 carrier image and 100-bit embedding, the PSNR (peak signal-to-noise ratio, the higher the better) of StegaStamp is 30.1dB, and the LPIPS (a method for evaluating perceptual naturalness, the lower the better) is 0.1, while the corresponding PSNR of this method is 39.8dB and the LPIPS is 0.05.

[0069] The masking mechanism is a method to improve the visual effect of the image after embedding the watermark. The calculation method of the watermark mask Mask is as follows:

[0070] First, convert the original RGB image C into a grayscale image I, then divide it into 8*8 pixel blocks. After quantization using JPEG compression with Q75, obtain the DCT coefficient matrix T. Take the number of non-zero coefficients ||T||0 of the T matrix and use the tanh activation function to limit d between 0 and 1. Expand d into an 8*8 small block D. Perform the above processing on each 8*8 pixel block to obtain a mask with the same length and width as the original image.

[0071] Furthermore, the calculation method of the mask Mask can be understood according to the following form of the calc_mask function:

[0072] The specific calculation process of the calc_mask function is as follows:

[0073] Denote the input RGB image as C and the output mask as M

[0074] 1. First, pass C through the color space to obtain the luminance channel I, that is

[0075] I = 0.299*R + 0.587*G + 0.114*B

[0076] 2. Process I in 8*8 pixel blocks, that is

[0077]

[0078] 3. For each pixel block B ij First, use the discrete cosine transform (DCT) to obtain H ij

[0079] And for H ij Quantize it using the quantization matrix Q with a Q75 quality factor in the JPEG compression algorithm.

[0080] If we denote Then the quantization result T ij Is:

[0081]

[0082] 4. For the quantization result T ij Take the matrix L0 norm and normalize it through the tanh function

[0083]

[0084] 5. For each d ij Perform expansion processing to generate an 8×8 small block D ij

[0085]

[0086] 6. For all D ijPerform splicing to finally generate the mask M

[0087]

[0088] To address the shortcoming of insufficient capacity, this embodiment uses a new framework of wavelet integrated neural network to solve the robust watermarking problem. The wavelet integrated neural network is a convolutional neural network that replaces the downsampling and upsampling layers in the U-net type encoding network with wavelet decomposition (DWT) and inverse wavelet decomposition (IDWT) respectively. By introducing discrete wavelet transform, the wavelet integrated neural network can effectively remove the aliasing noise introduced in the feature map due to direct downsampling in the traditional CNN network, significantly improving the anti-interference performance of the network. Subsequent experimental results show that the wavelet integrated neural network performs quite well in a variety of low-level tasks. And in the traditional methods of image robust watermarking, the embedding method in the wavelet domain has higher embedding capacity and robustness compared to the embedding method in the spatial domain. For example: the embedding capacity of StegaStamp is 100 bits, while the embedding capacity of this method can reach 300 bits +.

[0089] For the basic framework of training the robust image watermark network used in this embodiment, please refer to Figure 4 , which mainly includes two parts: an encoder and a decoder (the dashed boxes in the figure), and both parts are composed of wavelet integrated neural networks.

[0090] In the encoder, the following processing procedures are included:

[0091] After the carrier image input to the encoder extracts features through a two-dimensional convolutional layer, it is gradually downsampled through three discrete wavelet transform modules to obtain the high-dimensional features of the carrier image;

[0092] After the message image input to the encoder extracts features through a two-dimensional convolutional layer, it is spliced with the high-dimensional features of the carrier image; the splicing result is gradually upsampled through three inverse discrete wavelet transform modules. After each upsampling, it is spliced with the feature map of the same size in the corresponding downsampling process, and finally output through a two-dimensional convolutional layer.

[0093] In the decoder, the image input to the decoder sequentially passes through a two-dimensional convolutional layer and three discrete wavelet transform modules, and then outputs the decoding result through a two-dimensional convolutional layer.

[0094] Specifically, in an alternative embodiment, the input of the encoder is an RGB carrier image cover with a size of 400×400×3 and a watermark message Secret with a size of 50×50×3. After the input extracts features through the first convolutional layer, it is gradually downsampled through three DWT_Block discrete wavelet transform modules to obtain high-dimensional features with a size of 50×50×32. At the same time, after passing through a convolutional layer, it is concatenated with the high-dimensional features of the image, and then gradually upsampled through the IDWT_Block inverse discrete wavelet transform module. After each upsampling, it is concatenated with the feature map of the same size in the previous downsampling process. The final output is a watermark image S_e with a size of 400×400×3, and adding cover gives the image C' with the embedded watermark. After C' is disturbed by the simulation transmission channel module transform, it is fed into the decoder R_Net to obtain the decoded message S'.

[0095] For the structure of the DWT_Block discrete wavelet transform module, please refer to Figure 5 , and in the discrete wavelet transform module, the following processing procedures are included:

[0096] After the input of the discrete wavelet transform module passes through a convolutional layer, it is downsampled through the discrete wavelet transform to convert the result obtained by this convolutional layer into four sub-bands: LL, LH, HL, and HH; the channels of LL, LH, HL, and HH are merged and then fed into a convolutional layer for output.

[0097] For the structure of the IDWT_Block inverse discrete wavelet transform module, please refer to Figure 6 , and in the inverse discrete wavelet transform module, the following processing procedures are included:

[0098] After the input of the inverse discrete wavelet transform module passes through a convolutional layer, it is separated into four equal sub-bands: LL, LH, HL, and HH through channel separation; the inverse discrete wavelet transform is performed on LL, LH, HL, and HH, and the result of the inverse discrete wavelet transform is fed into a convolutional layer for output.

[0099] During the network training process of the robust image watermarking network training basic framework, the mirflickr dataset is used for the input cover, and a virtual message image is generated using a uniform distribution from -1 to 1 for the input watermark message Secret.

[0100] Specifically, the total loss function of the basic framework for training the robust image watermark network consists of three parts. The first two parts are the Lpips visual loss function and the L2 loss function between the cover image and the image C' after embedding the watermark. These two loss functions are used to improve the visual quality of C'. This method uses the method of hiding an image within an image to complete watermark embedding and uses the Mean Square Error (MSE) loss function to constrain the similarity between the embedded watermark information Secret and the decoded information S': This part of the loss function is to meet the decoding accuracy requirements of robust watermarks; in StegaStamp, this part is composed of the sigmoid loss function, which targets the decoding accuracy of bit strings rather than the accurate restoration of images. By using the Mean Square Error loss function, this method can use the same model to embed watermarks of different strengths.

[0101] The total loss function of the basic framework for training the robust image watermark network is expressed by the following formula:

[0102]

[0103] where m1, m2, m3 represent loss weights; Lpips(Cover, C') represents the Lpips visual loss function between the carrier image Cover and the image C` after embedding the watermark; the Mean Square Error loss function W, H, C are the width, height, and number of channels of the tensor respectively; Secret represents the watermark information, and S` represents the decoded information.

[0104] As a preferred embodiment, please refer to Figure 7 and Figure 8 , and decode the image after embedding the watermark through the following steps:

[0105] S21, calculate the mask M' of the image C' after embedding the watermark;

[0106] S22, input the image C' after embedding the watermark into the robust image watermark network, and obtain the preliminary decoding result S' through the robust image watermark network;

[0107] S23, multiply the preliminary decoding result S' with the mask M' of the image after embedding the watermark as the weight to obtain the weighted decoding result S”;

[0108] S24, slice the weighted decoding result S” in the horizontal and vertical directions, average the sliced results, and then activate them using the step function to obtain the final decoding result out.

[0109] Specifically, S” is a tensor of size 50×50×3. S” is sliced in the horizontal and vertical directions at a unit of every 10 pixels, resulting in 25 tensors of 10×10×3. The average of these 25 vectors is calculated and activated using the step function to obtain the final decoded result out. It is expressed by the formula as follows:

[0110] S' = R_Net(C')

[0111] M' = calc_mask(C')

[0112] S” = S'⊙M' ⊙ represents element-wise multiplication of two matrices

[0113] After partitioning S”, we get

[0114] For S ij Calculate the average to get

[0115] Using the step function Activate S to obtain the final decoded result:

[0116] out = f(S)

[0117] The comparison of the effects between this embodiment and the prior art is as follows:

[0118] The following table shows the comparison of the watermark visual effects between this method and StegaStamp (the higher the PSNR and SSIM, the better; the lower the LPIPS, the better). It can be seen that this method has a significant improvement in visual quality compared to StegaStamp.

[0119] Evaluation method This method StegaStamp PSNR (dB) 39.4 30.1 SSIM 0.97 0.91 LPIPS 0.02 0.10

[0120] The following table shows the comparison of the accuracy of this method in real - world scenarios. It can be seen that this method maintains an accuracy similar to StegaStamp under the condition of higher embedding capacity.

[0121] Usage scenario This method (300 bits) StegaStamp (100 bits) Screen capture (Acc: %) 0.976 0.946 Print and scan (Acc: %) 0.981 0.982

[0122] Embodiment 2

[0123] A robust image watermarking system using two - stage precoding and wavelet network, please refer to Figure 9, including a watermark information embedding unit 1, where the watermark information embedding unit 1 includes a preprocessing subunit 11, a preliminary residual watermark obtaining subunit 12, a final residual watermark obtaining subunit 13, and an addition operation subunit 14; the preprocessing subunit 11 is respectively connected to the preliminary residual watermark obtaining subunit 12, the final residual watermark obtaining subunit 13, and the addition operation subunit 14; the preliminary residual watermark obtaining subunit 12 is connected to the final residual watermark obtaining subunit 13; the final residual watermark obtaining subunit 13 is connected to the addition operation subunit 14; where:

[0124] The preprocessing subunit 11 is used to obtain a carrier image and watermark information; calculate a mask of the carrier image; and convert the watermark information into a message image through two-stage precoding;

[0125] The preliminary residual watermark obtaining subunit 12 is used to input the carrier image and the message image into a preset robust image watermark network, and generate a preliminary residual watermark through the robust image watermark network; the robust image watermark network is obtained by training a robust image watermark network training basic framework; the robust image watermark network training basic framework includes an encoder and a decoder respectively composed of wavelet integrated neural networks;

[0126] The final residual watermark obtaining subunit 13 is used to multiply the mask of the carrier image and the preliminary residual watermark to obtain a final residual watermark;

[0127] The addition operation subunit 14 is used to add the final residual watermark and the carrier image to obtain an image embedded with a watermark.

[0128] As a preferred embodiment, it further includes an image decoding unit 2; the image decoding unit 2 includes a mask calculation subunit 21, a preliminary decoding subunit 22, a weighted decoding subunit 23, and a final decoding subunit 24; the mask calculation subunit 21 and the preliminary decoding subunit 22 are respectively connected to the weighted decoding subunit 23; the weighted decoding subunit 23 is connected to the final decoding subunit 24; where:

[0129] The mask calculation subunit 21 is used to calculate a mask of the image embedded with a watermark;

[0130] The preliminary decoding subunit 22 is used to input the image embedded with a watermark into the robust image watermark network, and obtain a preliminary decoding result through the robust image watermark network;

[0131] The weighted decoding subunit 23 is used to multiply the preliminary decoding result with the mask of the image embedded with a watermark as a weight to obtain a weighted decoding result;

[0132] The final decoding subunit 24 is used to divide the weighted decoding result in the horizontal and vertical directions, average the divided results, and then activate them using a step function to obtain the final decoding result.

[0133] Embodiment 3

[0134] A storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the robust image watermarking method using two-stage precoding and a wavelet network in Embodiment 1 are implemented.

[0135] Embodiment 4

[0136] A computer device includes a storage medium, a processor, and a computer program stored in the storage medium and executable by the processor. When the computer program is executed by the processor, the steps of the robust image watermarking method using two-stage precoding and a wavelet network in Embodiment 1 are implemented.

[0137] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, rather than limitations on the implementation manners of the present invention. For those of ordinary skill in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all implementation manners here. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the claims of the present invention.

Claims

1. A robust image watermarking method using two-stage precoding and wavelet network, characterized in that, The embedding of watermark information is carried out through the following steps: S11. Obtain the carrier image and the watermark information; calculate the mask of the carrier image; convert the watermark information into a message image through two-stage precoding; S12. Input the carrier image and the message image into a preset robust image watermark network, and generate a preliminary residual watermark through the robust image watermark network; the robust image watermark network is obtained by training a basic framework of the robust image watermark network; the basic framework of the robust image watermark network includes an encoder and a decoder respectively composed of a wavelet integrated neural network; S13. Multiply the mask of the carrier image and the preliminary residual watermark to obtain the final residual watermark; S14. Add the final residual watermark to the carrier image to obtain the image embedded with the watermark; In the encoder, the following processing procedures are included: The carrier image input into the encoder is subjected to feature extraction through a two-dimensional convolutional layer, and then gradually downsampled through three discrete wavelet transform modules to obtain the high-dimensional features of the carrier image; The message image input into the encoder is subjected to feature extraction through a two-dimensional convolutional layer and then spliced with the high-dimensional features of the carrier image; The splicing result is gradually upsampled through three inverse discrete wavelet transform modules. After each upsampling, it is spliced with the feature map of the same size in the corresponding downsampling process, and finally output through a two-dimensional convolutional layer; In the decoder, the image input into the decoder passes through a two-dimensional convolutional layer and three discrete wavelet transform modules in sequence, and then outputs the decoding result through a two-dimensional convolutional layer.

2. The robust image watermarking method using two-stage precoding and wavelet network according to claim 1, characterized in that, The total loss function of the basic framework of the robust image watermark network is expressed by the following formula: ; Among them, represents the loss weight; represents the Lpips visual loss function between the carrier image Cover and the image C` after embedding the watermark; mean squared error loss function , are the width, height, and number of channels of the tensor respectively; Secret represents the watermark information, and S` represents the decoded information.

3. The robust image watermarking method using two-stage precoding and wavelet network according to claim 1, characterized in that, The decoding of the image embedded with the watermark is carried out through the following steps: S21. Calculate the mask of the image embedded with the watermark; S22. Input the image embedded with the watermark into the robust image watermark network, and obtain a preliminary decoding result through the robust image watermark network; S23. Multiply the mask of the image embedded with the watermark as the weight with the preliminary decoding result to obtain a weighted decoding result; S24. Cut the weighted decoding result in the horizontal and vertical directions, average the cut results, and then activate them using a step function to obtain the final decoding result.

4. The robust image watermarking method using two-stage precoding and wavelet network according to claim 1, characterized in that, In the discrete wavelet transform module, the following processing procedures are included: After the input of the discrete wavelet transform module passes through a convolutional layer, it is downsampled through discrete wavelet transform to convert the result obtained by this convolutional layer into four sub-bands of LL, LH, HL, and HH; the channels of LL, LH, HL, and HH are merged and then sent into a convolutional layer for output.

5. The robust image watermarking method using two-stage precoding and wavelet network according to claim 1, characterized in that In the inverse discrete wavelet transform module, the following processing procedures are included: After the input of the inverse discrete wavelet transform module passes through a convolutional layer, it is separated into four equal sub-bands of LL, LH, HL, and HH through channel separation; inverse discrete wavelet transform is performed on LL, LH, HL, and HH, and the result of the inverse discrete wavelet transform is sent into a convolutional layer for output.

6. A robust image watermarking system using two-stage precoding and wavelet network, characterized in that, For performing the robust image watermarking method according to any one of claims 1 to 5, it includes a watermark information embedding unit (1), and the watermark information embedding unit (1) includes a preprocessing subunit (11), a preliminary residual watermark obtaining subunit (12), a final residual watermark obtaining subunit (13), and an addition operation subunit (14); the preprocessing subunit (11) is respectively connected to the preliminary residual watermark obtaining subunit (12), the final residual watermark obtaining subunit (13), and the addition operation subunit (14); the preliminary residual watermark obtaining subunit (12) is connected to the final residual watermark obtaining subunit (13); the final residual watermark obtaining subunit (13) is connected to the addition operation subunit (14); wherein: The preprocessing subunit (11) is used to obtain a carrier image and watermark information; calculate a mask of the carrier image; and convert the watermark information into a message image through two-stage precoding; The preliminary residual watermark obtaining subunit (12) is used to input the carrier image and the message image into a preset robust image watermark network, and generate a preliminary residual watermark through the robust image watermark network; the robust image watermark network is obtained by training a robust image watermark network training basic framework; the robust image watermark network training basic framework includes an encoder and a decoder respectively composed of a wavelet integrated neural network; The final residual watermark obtaining subunit (13) is used to multiply the mask of the carrier image and the preliminary residual watermark to obtain a final residual watermark; The addition operation subunit (14) is used to add the final residual watermark to the carrier image to obtain an image after embedding the watermark.

7. A 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 robust image watermarking method using two-stage precoding and a wavelet network according to any one of claims 1 to 5.

8. A computer device, characterized in that: It includes a storage medium, a processor, and a computer program stored in the storage medium and executable by the processor. When the computer program is executed by the processor, it implements the steps of the robust image watermarking method using two-stage precoding and a wavelet network according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Fast robust watermarking method and system for color image and application of fast robust watermarking method

    CN113538200A

  • Device and method for analysing images

    EP1679898A1