A robust image watermarking method and system based on hierarchical attention feature fusion

By using a hierarchical attention feature fusion module and a simulated attack model, the robustness and imperceptibility of image watermarks are improved, solving the problems of adaptability to unknown attacks and size applicability in existing technologies, and realizing copyright protection for multi-size color images.

CN115908095BActive Publication Date: 2026-04-14SHANDONG UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG UNIV
Filing Date
2022-11-28
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing robust image watermarking techniques cannot handle unknown attacks other than training attacks, and suffer from problems such as overfitting, imperceptible degradation, and applicability only to a single image size.

Method used

A hierarchical attention feature fusion module is adopted, which combines image feature enhancement and watermark feature enhancement. The hierarchical attention feature fusion model improves the network's ability to capture hidden and robust embedding points. Simulated attack model and image discrimination model are used to supervise the watermark embedding network, thereby improving the imperceptibility and robustness of image watermarks.

Benefits of technology

It achieves good robustness against various attacks, especially high-intensity salt-and-pepper noise, and is applicable to color images of various sizes. It extracts complete watermark information while ensuring image quality, thereby realizing copyright protection for digital images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115908095B_ABST
    Figure CN115908095B_ABST
Patent Text Reader

Abstract

The present disclosure belongs to the technical field of digital image watermarking, and particularly relates to a robust image watermarking method and system based on hierarchical attention feature fusion, which comprises the following steps: obtaining an original image and a watermark image; obtaining an image feature enhancement tensor and a watermark feature enhancement tensor based on the obtained original image and watermark image and in combination with a hierarchical attention feature fusion model; obtaining a watermark-containing image according to the original image, the image feature enhancement tensor and the watermark feature enhancement tensor; obtaining an attacked image according to the watermark-containing image and a simulation attack model; extracting an image watermark based on the attacked image and the hierarchical attention feature fusion model; and in the process of obtaining the watermark-containing image, supervising a watermark embedding network according to the original image, the watermark-containing image and an image discrimination model, and improving imperceptibility of the watermark-containing image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure belongs to the field of digital image watermarking technology, specifically relating to a robust image watermarking method and system based on hierarchical attention feature fusion. Background Technology

[0002] The statements in this section are merely background information relating to this disclosure and do not necessarily constitute prior art.

[0003] With the rapid development of multimedia technology, digital images are widely disseminated on major online media platforms. In recent years, copyright disputes caused by malicious alteration and misappropriation of images have emerged one after another. Robust image watermarking technology utilizes the spatial redundancy characteristics of images to embed watermarks in an invisible form into the original image, achieving proactive evidence collection.

[0004] Deep learning, with its powerful ability to mine, represent, and learn image information, has been widely used in the field of image watermarking, significantly improving robustness and imperceptibility compared to traditional image watermarking methods. Existing techniques extract deep image features through a combination of CNNs and residual structures, but they do not fully utilize the spatial information of shallow image features and the semantic information of deep images. This fails to effectively improve the network's ability to search for suitable, hidden, and robust pixels for watermark embedding, resulting in an inability to effectively balance robustness, imperceptibility, and capacity. Furthermore, it leads to high network complexity and problems such as gradient vanishing, exploding, and overfitting during training.

[0005] According to the inventors, existing robust image watermarking methods have the following four shortcomings:

[0006] (1) In terms of robustness, it cannot take into account unknown attacks other than training attacks;

[0007] (2) Overfitting occurs when targeting a single attack;

[0008] (3) While improving robustness, imperceptibility is significantly reduced;

[0009] (4) Only applicable to a single image size. Summary of the Invention

[0010] To address the aforementioned issues, this disclosure proposes a robust image watermarking method and system based on hierarchical attention feature fusion. This disclosure utilizes a hierarchical attention feature fusion module to enrich feature representations, enhance the network's ability to capture hidden and robust embedding points, improve the imperceptibility of differences between the watermarked image and the original image, and increase robustness against different types of attacks at varying intensities and the accuracy of watermark recovery.

[0011] According to some embodiments, the first solution of this disclosure provides a robust image watermarking method based on hierarchical attention feature fusion, which adopts the following technical solution:

[0012] A robust image watermarking method based on hierarchical attention feature fusion includes:

[0013] Obtain the original image and the watermarked image;

[0014] Based on the acquired original image and watermark image, and combined with the hierarchical attention feature fusion model, the image feature enhancement tensor and the watermark feature enhancement tensor are obtained.

[0015] Based on the original image, the image feature enhancement tensor, and the watermark feature enhancement tensor, a watermarked image is obtained;

[0016] Based on the watermarked image and the simulated attack model, the image after the attack is obtained;

[0017] Based on the post-attack image and the hierarchical attention feature fusion model, the image watermark is extracted;

[0018] During the process of obtaining the watermarked image, a supervised watermark embedding network is constructed based on the original image, the watermarked image, and the image discrimination model to improve the imperceptibility of the watermarked image.

[0019] As a further technical limitation, the process of obtaining the image feature enhancement tensor is as follows:

[0020] The acquired raw image is preprocessed to obtain a preprocessed image;

[0021] The preprocessed image is then convolved to obtain the standard input image.

[0022] The obtained standard input image is fed into the hierarchical attention feature fusion model to obtain the image feature enhancement tensor.

[0023] As a further technical limitation, the process of obtaining the watermark feature enhancement tensor is as follows:

[0024] Calculate the watermark matrix of the acquired watermark image;

[0025] The obtained watermark matrix is ​​convolved to obtain the upgraded watermark feature tensor.

[0026] The obtained up-dimensional watermark feature tensor is deconvolved to obtain the redundant diffusion watermark feature tensor.

[0027] The obtained redundant diffusion watermark feature tensor is input into the hierarchical attention feature fusion model to obtain the watermark feature enhancement tensor.

[0028] As a further technical limitation, the process of obtaining the watermarked image is as follows:

[0029] The image feature enhancement tensor and the watermark feature enhancement tensor are concatenated along the channel dimension to obtain an intermediate tensor;

[0030] The obtained intermediate tensor is dimensionality reduced and then input into the hierarchical attention feature fusion model to obtain the feature-enhanced intermediate tensor;

[0031] The feature-enhanced intermediate tensor and the original image are summed at the corresponding pixels of the residual structure to obtain the watermarked image.

[0032] As a further technical limitation, the process of extracting the image watermark is as follows:

[0033] The attacked image is processed by convolution to obtain the global features of the attacked image;

[0034] Based on the global features of the image after the attack and the downsampled hierarchical attention feature fusion model, a first-order hierarchical attention feature fusion watermark tensor is obtained.

[0035] The first-order hierarchical attention feature fusion watermark tensor after convolution is input into the hierarchical attention feature fusion model to obtain the second-order hierarchical attention feature fusion watermark tensor.

[0036] The obtained second-order hierarchical attention feature fusion watermark tensor is convolved to extract the image watermark.

[0037] As a further technical limitation, the image discrimination model includes 4 layers of 3×3 convolution, 1 layer of global average pooling, and 1 layer of fully connected layer. The image discrimination model is continuously trained to improve the ability to distinguish whether an image is a watermarked image, and to supervise the watermark embedding network to improve the imperceptibility of watermarked images.

[0038] As a further technical limitation, the hierarchical attention feature fusion model is a three-level feature model with increasing depth, consisting of a first convolutional layer, a second convolutional layer, and a third convolutional layer: the first convolutional layer is a 1×1 convolution, the second convolutional layer is one 1×1 convolution and one 3×3 convolution, and the third convolutional layer is one 1×1 convolution and two 3×3 convolutions.

[0039] According to some embodiments, the second solution of this disclosure provides a robust image watermarking system based on hierarchical attention feature fusion, which adopts the following technical solution:

[0040] A robust image watermarking system based on hierarchical attention feature fusion includes:

[0041] An image acquisition module is configured to acquire the original image and the watermark image;

[0042] The watermark embedding module is configured to obtain an image feature enhancement tensor and a watermark feature enhancement tensor based on the acquired original image and watermark image, combined with a hierarchical attention feature fusion model; and to obtain a watermarked image based on the original image, the image feature enhancement tensor, and the watermark feature enhancement tensor.

[0043] The simulated attack module is configured to obtain the attacked image based on the watermarked image and the simulated attack model;

[0044] The watermark extraction module is configured to extract image watermarks based on the post-attack image and a hierarchical attention feature fusion model.

[0045] In the watermark embedding module, the watermark embedding network is supervised based on the original image, the watermarked image, and the image discrimination model to improve the imperceptibility of the watermarked image.

[0046] According to some embodiments, a third aspect of this disclosure provides a computer-readable storage medium, employing the following technical solution:

[0047] A computer-readable storage medium having a program stored thereon that, when executed by a processor, implements the steps of the robust image watermarking method based on hierarchical attention feature fusion as described in the first aspect of this disclosure.

[0048] According to some embodiments, the fourth solution of this disclosure provides an electronic device that adopts the following technical solution:

[0049] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the robust image watermarking method based on hierarchical attention feature fusion as described in the first aspect of this disclosure.

[0050] Compared with the prior art, the beneficial effects of this disclosure are as follows:

[0051] This disclosure exhibits good robustness, resisting high-intensity salt-and-pepper noise and demonstrating good robustness against unknown attacks not present in the simulated attack model. It is suitable for copyright protection of digital image products, extracting relatively complete watermark information while ensuring image quality, thereby achieving copyright protection for digital images. Attached Figure Description

[0052] The accompanying drawings, which form part of this disclosure, are used to provide a further understanding of this disclosure. The illustrative embodiments of this disclosure and their descriptions are used to explain this disclosure and do not constitute an undue limitation of this disclosure.

[0053] Figure 1This is a flowchart of the robust image watermarking method based on hierarchical attention feature fusion in Embodiment 1 of this disclosure;

[0054] Figure 2 This is a flowchart of the robust image watermarking method based on hierarchical attention feature fusion in Embodiment 1 of this disclosure;

[0055] Figure 3 This is a structural block diagram of the image feature enhancement model in Embodiment 1 of this disclosure;

[0056] Figure 4 This is a structural block diagram of the hierarchical attention feature fusion model in Embodiment 1 of this disclosure;

[0057] Figure 5 This is a structural block diagram of the watermark feature enhancement model in Embodiment 1 of this disclosure;

[0058] Figure 6 This is a structural block diagram of the watermark embedding model in Embodiment 1 of this disclosure;

[0059] Figure 7 This is a structural block diagram of the simulated attack model in Embodiment 1 of this disclosure;

[0060] Figure 8 This is a structural block diagram of the watermark extraction model in Embodiment 1 of this disclosure;

[0061] Figure 9 This is a structural block diagram of the image identification model in Embodiment 1 of this disclosure;

[0062] Figure 10 This is a structural block diagram of the robust image watermarking system based on hierarchical attention feature fusion in Embodiment 2 of this disclosure. Detailed Implementation

[0063] The present disclosure will be further described below with reference to the accompanying drawings and embodiments.

[0064] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of this disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains.

[0065] Where there is no conflict, the embodiments and features described herein can be combined with each other.

[0066] Example 1

[0067] Embodiment 1 of this disclosure introduces a robust image watermarking method based on hierarchical attention feature fusion.

[0068] like Figure 1 and Figure 2The robust image watermarking method based on hierarchical attention feature fusion, as shown, includes:

[0069] Obtain the original image and the watermarked image;

[0070] Based on the acquired original image and watermark image, and combined with the hierarchical attention feature fusion model, the image feature enhancement tensor and the watermark feature enhancement tensor are obtained.

[0071] Based on the original image, the image feature enhancement tensor, and the watermark feature enhancement tensor, a watermarked image is obtained;

[0072] Based on the watermarked image and the simulated attack model, the image after the attack is obtained;

[0073] Based on the post-attack image and the hierarchical attention feature fusion model, the image watermark is extracted;

[0074] During the process of obtaining the watermarked image, a supervised watermark embedding network is constructed based on the original image, the watermarked image, and the image discrimination model to improve the imperceptibility of the watermarked image.

[0075] The specific steps of the robust image watermarking method based on hierarchical attention feature fusion provided in this embodiment are as follows:

[0076] Step S01: Construct as follows Figure 3 The image feature enhancement model shown takes an M×N×3 color image of arbitrary size as input (denoted as the original image I) and outputs an H×W×3 image feature enhancement tensor I. aug M and N are the length and width of the original image, respectively, and H and W are the length and width of the image feature enhancement tensor, respectively.

[0077] The specific process of step S01 is as follows:

[0078] Step S101: Preprocess I to obtain preprocessed image I pre The steps are as follows: Scale the original image to H'×W' pixels, where H' and W' are calculated using formulas (1) and (2) respectively. Perform random block cropping on the scaled image with block boundary size H×W. Then convert the cropping result into tensor data. Finally, normalize the tensor to a standard normal distribution with a mean of 0 and a variance of 1 to obtain the preprocessed image I. pre .

[0079]

[0080]

[0081] Step S102: For I prePerform a 3×3 convolution with 64 kernels to generate a standard input image I of size H×W×64. s-in This enables the channel to be upgraded.

[0082] Step S103: Place I s-in Input to Figure 4 The hierarchical attention feature fusion module M shown a-f Obtain the image feature enhancement tensor I aug .

[0083] M a-f The detailed structure is as follows: First, the input feature tensor F is transformed into three levels of features with increasing depth through one convolutional layer (1×1 convolution), two convolutional layers (one 1×1 convolution and one 3×3 convolution), and three convolutional layers (one 1×1 convolution and two 3×3 convolutions): F1, F2, and F3. The shallow feature F1 contains rich spatial features of the input image; therefore, a shallow spatial attention feature F is obtained through a spatial attention mechanism. 1-sp This study initially enhances the network's ability to search for hidden and robust embedding points in the image spatial domain. The deep feature F3 possesses higher-order semantic information and stronger feature representation power than the input features. Therefore, the deep channel attention feature F is obtained through a channel attention mechanism. 3-ch This study initially enhances the ability of network search to identify hidden and robust embedding points in the deep semantic feature representation space. (The last part, "F," appears to be incomplete and lacks context. It's unclear what "F" means.) 1-sp F2 and F 3-ch The first-order attention feature fusion tensor F is obtained by concatenating along the channel dimension. f , for F f A one-stage attention feature fusion tensor F with the same number of channels as the input features is obtained through 1×1 convolution. f-d , for F f-d Implement a joint attention mechanism for space and channel, and sum the result with the F residual to obtain M. a-f Output feature enhancement tensor F aug This enhances the network's ability to search for hidden and robust embedding points in semantic information representation spaces of different depths and with different attention directions.

[0084] Step S02: Construct a watermark feature enhancement model as follows Figure 5 As shown, the input watermark W is the enhanced H×W×256 watermark feature enhancement tensor W. aug .

[0085] The specific process of step S02 is as follows:

[0086] Step S201: Watermark matrix generation. Flatten W into an L-bit binary watermark sequence M, and then convert M into a watermark matrix W. A The watermark matrix W is calculated using formula (3). A Size HA :

[0087]

[0088] Step S202: Place W A First, the upgraded watermark feature tensor W is obtained through 3×3 convolution. up The number N of the deconvolution double upsampling blocks is calculated using formula (4). s , for W up Perform N s The redundant diffusion watermark feature tensor W is obtained by deconvolution upsampling with a kernel size of 2 and a stride of 2. r-d This improves the robustness of the subsequent extraction network against geometric attacks such as rotation, cropping, and scaling.

[0089]

[0090] Step S203: Place W r-d Input to hierarchical attention feature fusion module M a-f Obtain the watermark feature enhancement tensor W aug W aug with I aug Having the same size and incorporating semantic information of different depths and attention directions, they facilitate the subsequent embedding of watermarks into hidden and robust pixels in the original image.

[0091] Step S03: Construct the watermark embedding model as follows Figure 6 As shown, the input image feature enhancement tensor I aug Watermark Feature Enhancement Tensor W aug And the original image I, output watermarked image I W .

[0092] The process of step S03 is as follows:

[0093] Step S301: Place W aug with I aug The intermediate tensor I is obtained by concatenating along the channel dimension. m ;

[0094] Step S302: Place I m Channel dimensionality reduction is achieved through a single 3×3 convolution layer, and then the data is input into the hierarchical attention feature fusion module M. a-f Obtain the feature-enhanced intermediate tensor I m-aug Then I m-aug The watermarked image I is obtained by summing the corresponding pixels of the original image I with the residual structure. W .

[0095] Step S04: Construct a simulated attack model, such as Figure 7As shown, input watermarked image I W Output image I after attack atk The system incorporates five attack methods: salt-and-pepper noise, simulated JPEG compression, real JPEG compression, Gaussian noise, and cropping attacks, forming a differentiable and backpropagating gradient update stochastic attack layer. For JPEG compression attacks, the DCT coefficient quantization process is non-differentiable; directly introducing it into the network would cause neuron death and prevent backpropagation. Therefore, an approximation is used to make it differentiable, thus enabling backpropagation gradient updates. However, simply introducing an approximation of JPEG can lead to poor simulation results, resulting in poor model training performance.

[0096] This embodiment combines the advantages of Adam optimizer in using first-order moment estimation and second-order moment estimation to calculate the update step size, avoiding the problem that the gradient cannot be updated when polling to the real non-differentiable JPEG compression during backpropagation updates. This training method simultaneously ensures the simulation effect of JPEG compression and the training effect of the model.

[0097] Step S05: Build a watermark extraction model, such as... Figure 8 As shown, image I after input attack atk Output watermark extraction W E .

[0098] The process of step S05 is as follows:

[0099] Step S501: Place I atk The global features I of the attacked image (H×W×64) are obtained through a 3×3 convolution with 64 kernels. atk-o .

[0100] Step S502: Place I atk-o Through N s The hierarchical attention feature fusion module with downsampling (3×3 convolution with stride of 2) yields the first-order hierarchical attention feature fusion watermark tensor W1.

[0101] Step S503: Pass W1 sequentially through a 3×3 convolution with 3 convolutions and a hierarchical attention feature fusion module to obtain the second-order hierarchical attention feature fusion watermark tensor W2.

[0102] Step S504: Convolve W2 using a 3×3 convolution with a kernel of 1 to obtain the extracted watermark W. E .

[0103] Step S06: Build image identification model D to further improve the watermarked image I W The imperceptibility, such as Figure 9 As shown, D consists of 4 layers of 3×3 convolutions, 1 layer of global average pooling, and 1 fully connected layer. Its input is the watermarked image I. WThe probability P that the input to the original image is the predicted input is the original image, and the output is the original image.

[0104] Step S07: Encapsulate the completed six sub-network structures into a single network for end-to-end training and testing.

[0105] Step S08: Network Training; Using 10,000 images of arbitrary sizes and different categories from the ImageNet-1K dataset as the training dataset, train the overall network encapsulated in Step S07. The training loss function L includes image loss Li. I Watermark extraction loss L W Image discriminator loss L D L I The difference in sensory quality between the watermarked image and the original image is measured by the mean squared error loss and structural similarity loss of the watermarked image and the original image. Formula (8) is a functional representation of the image loss:

[0106]

[0107]

[0108] L I =β·MSE(I,I W )+SSIM(I,I W (8)

[0109] Where, μ I σ is the average value of the original image I. I Let I be the standard deviation. For watermarked image I W The average value, For I W standard deviation for (I,I W Covariance, where c1 and c2 are two measurement constants, set to 1×10 in this example. -4 and 9.5×10 -4 β is the mean squared error loss weighting factor, which is set to 0.75 in this example.

[0110] The watermark extraction loss is the mean squared error (MSE) of the extracted watermark compared to the original watermark. Formula (9) is a functional representation of the watermark extraction loss:

[0111] L W =MSE(W E ,W)=[W E (i)-W(i)] 2 (9)

[0112] Among them, W E(i) represents the extracted watermark pixel value of the i-th position, and W(i) represents the original watermark pixel value of the i-th position.

[0113] The image discriminator is used to distinguish between the original image and the watermarked image. Formula (10) is the image discrimination loss function:

[0114]

[0115] Where D is the image discriminator and E is the watermark embedding model. These are the parameters for the image discriminator and the watermark embedding model, respectively.

[0116] Formula (11) is the total loss function L:

[0117] L = α I L I +α W L W +α D L D (11)

[0118] Where, α I α W and α D These are the weighting factors for image loss, watermark extraction loss, and image discriminator loss, respectively.

[0119] Other training parameters are shown in Table 1.

[0120] Table 1. Network training parameter settings

[0121]

[0122] In this embodiment, all network models are constructed and trained, and the weight file is saved in step S08.

[0123] Step S09: When testing the performance of this method, the attack in the simulated attack network is replaced with the corresponding test attack, following the complete process shown in step 2. Using the weight parameters trained in step S08, the watermarked image, the image generated after the actual attack, and the watermark information extracted after the attack are obtained. To test the generalization ability of the method against attacks, new attack methods are added based on the existing attack methods during the training phase, such as Gaussian filtering, Cropout attack, and Dropout attack. Among them, the Cropout attack randomly selects a certain proportion of blocks in the watermarked image and replaces them with corresponding blocks in the original cover image; the Dropout attack randomly selects a certain proportion of pixel values ​​in the watermarked image and replaces them with corresponding pixel values ​​in the cover image.

[0124] The method in this embodiment is compared with classic algorithms based on deep neural networks. To ensure the validity of the comparison, the experimental data for all three algorithms were obtained by embedding 256-bit binary watermark information in a 256×256 color image. For the ReDMark method, which is only applicable to grayscale images, the color image is decomposed into YCbCr components, and the watermark information is embedded in Y. Since the robustness and imperceptibility of the method are mutually restrictive, Table 2 shows the bit error rate of watermark extraction for the three methods under the premise that the imperceptibility of the generated watermarked image is the same (i.e., the same PSNR). As can be seen from the data in Table 2, this embodiment has a low bit error rate in watermark extraction under various attacks, such as salt-and-pepper noise, Gaussian filtering, JPEG compression, Gaussian noise, Dropout attack, and cropping attack, and has better robustness. However, the method has poor robustness against high-intensity Cropout attack, which is a limitation of this embodiment.

[0125] Table 2 Comparison of Bit Error Rates of Three Methods Under Different Attacks

[0126]

[0127] This embodiment proposes a robust watermarking algorithm suitable for multi-size color images based on a hierarchical attention feature fusion module. This method has better robustness than existing deep learning-based methods, can resist high-intensity salt-and-pepper noise, has good model generalization ability and a wider range of applications, and can extract relatively complete watermark information while ensuring image quality, thereby realizing copyright protection of digital images.

[0128] Example 2

[0129] Embodiment 2 of this disclosure introduces a robust image watermarking system based on hierarchical attention feature fusion.

[0130] like Figure 10 The robust image watermarking system based on hierarchical attention feature fusion, as shown, includes:

[0131] An image acquisition module is configured to acquire the original image and the watermark image;

[0132] The watermark embedding module is configured to obtain an image feature enhancement tensor and a watermark feature enhancement tensor based on the acquired original image and watermark image, combined with a hierarchical attention feature fusion model; and to obtain a watermarked image based on the original image, the image feature enhancement tensor, and the watermark feature enhancement tensor.

[0133] The image discrimination module is configured to obtain the probability of embedding a watermark in the image input to the module based on the original image, the watermarked image, and the image discriminator. The watermark embedding network is supervised according to the image discrimination loss to improve the imperceptibility of the watermarked image.

[0134] The simulated attack module is configured to obtain the attacked image based on the watermarked image and the simulated attack model;

[0135] The watermark extraction module is configured to extract image watermarks based on the post-attack image and a hierarchical attention feature fusion model.

[0136] In the watermark embedding module, the watermark embedding network is supervised based on the original image, the watermarked image, and the image discrimination model to improve the imperceptibility of the watermarked image.

[0137] The detailed steps are the same as those of the robust image watermarking method based on hierarchical attention feature fusion provided in Example 1, and will not be repeated here.

[0138] Example 3

[0139] Embodiment 3 of this disclosure provides a computer-readable storage medium.

[0140] A computer-readable storage medium having a program stored thereon that, when executed by a processor, implements the steps of the robust image watermarking method based on hierarchical attention feature fusion as described in Embodiment 1 of this disclosure.

[0141] The detailed steps are the same as those of the robust image watermarking method based on hierarchical attention feature fusion provided in Example 1, and will not be repeated here.

[0142] Example 4

[0143] Embodiment 4 of this disclosure provides an electronic device.

[0144] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the robust image watermarking method based on hierarchical attention feature fusion as described in Embodiment 1 of this disclosure.

[0145] The detailed steps are the same as those of the robust image watermarking method based on hierarchical attention feature fusion provided in Example 1, and will not be repeated here.

[0146] While the specific embodiments of this disclosure have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of this disclosure. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of this disclosure are still within the scope of protection of this disclosure.

Claims

1. A robust image watermarking method based on hierarchical attention feature fusion, characterized in that, include: Obtain the original image and the watermarked image; Based on the acquired original image and watermark image, and combined with the hierarchical attention feature fusion model, the image feature enhancement tensor and the watermark feature enhancement tensor are obtained. Based on the original image, the image feature enhancement tensor, and the watermark feature enhancement tensor, a watermarked image is obtained; Based on the watermarked image and the simulated attack model, the image after the attack is obtained; Based on the post-attack image and the hierarchical attention feature fusion model, the image watermark is extracted; In the process of obtaining the watermarked image, a supervised watermark embedding network is constructed based on the original image, the watermarked image, and the image discrimination model to improve the imperceptibility of the watermarked image. The process of obtaining the watermarked image is as follows: The image feature enhancement tensor and the watermark feature enhancement tensor are concatenated along the channel dimension to obtain an intermediate tensor; The obtained intermediate tensor is dimensionality reduced and then input into the hierarchical attention feature fusion model to obtain the feature-enhanced intermediate tensor; The feature enhancement intermediate tensor and the original image are summed at the corresponding pixels of the residual structure to obtain the watermarked image; The process of extracting the image watermark is as follows: The attacked image is processed by convolution to obtain the global features of the attacked image; Based on the global features of the image after the attack and the downsampled hierarchical attention feature fusion model, a first-order hierarchical attention feature fusion watermark tensor is obtained. The first-order hierarchical attention feature fusion watermark tensor after convolution is input into the hierarchical attention feature fusion model to obtain the second-order hierarchical attention feature fusion watermark tensor. The obtained second-order hierarchical attention feature fusion watermark tensor is convolved to extract the image watermark.

2. The robust image watermarking method based on hierarchical attention feature fusion as described in claim 1, characterized in that, The process of obtaining the image feature enhancement tensor is as follows: The acquired raw image is preprocessed to obtain a preprocessed image; The preprocessed image is then convolved to obtain the standard input image. The obtained standard input image is fed into the hierarchical attention feature fusion model to obtain the image feature enhancement tensor.

3. The robust image watermarking method based on hierarchical attention feature fusion as described in claim 1, characterized in that, The process of obtaining the watermark feature enhancement tensor is as follows: Calculate the watermark matrix of the acquired watermark image; The obtained watermark matrix is ​​convolved to obtain the upgraded watermark feature tensor. The obtained up-dimensional watermark feature tensor is deconvolved to obtain the redundant diffusion watermark feature tensor. The obtained redundant diffusion watermark feature tensor is input into the hierarchical attention feature fusion model to obtain the watermark feature enhancement tensor.

4. The robust image watermarking method based on hierarchical attention feature fusion as described in claim 1, characterized in that, The image discrimination model consists of four 3×3 convolutional layers, one global average pooling layer, and one fully connected layer. The model is continuously trained to improve its ability to identify whether an image is watermarked. The supervised watermark embedding network enhances the imperceptibility of watermarked images.

5. A robust image watermarking method based on hierarchical attention feature fusion as described in claim 1, characterized in that, The hierarchical attention feature fusion model is a three-level feature model with increasing depth, consisting of a first convolutional layer, a second convolutional layer, and a third convolutional layer: the first convolutional layer is a 1×1 convolution, the second convolutional layer is one 1×1 convolution and one 3×3 convolution, and the third convolutional layer is one 1×1 convolution and two 3×3 convolutions.

6. A robust image watermarking system based on hierarchical attention feature fusion, characterized in that, include: An image acquisition module is configured to acquire the original image and the watermark image; The watermark embedding module is configured to obtain an image feature enhancement tensor and a watermark feature enhancement tensor based on the acquired original image and watermark image, combined with a hierarchical attention feature fusion model; and to obtain a watermarked image based on the original image, the image feature enhancement tensor, and the watermark feature enhancement tensor. The simulated attack module is configured to obtain the attacked image based on the watermarked image and the simulated attack model; The watermark extraction module is configured to extract image watermarks based on the post-attack image and a hierarchical attention feature fusion model. In the watermark embedding module, the watermark embedding network is supervised based on the original image, the watermarked image, and the image discrimination model to improve the imperceptibility of the watermarked image. The process of obtaining the watermarked image is as follows: The image feature enhancement tensor and the watermark feature enhancement tensor are concatenated along the channel dimension to obtain an intermediate tensor; The obtained intermediate tensor is dimensionality reduced and then input into the hierarchical attention feature fusion model to obtain the feature-enhanced intermediate tensor; The feature enhancement intermediate tensor and the original image are summed at the corresponding pixels of the residual structure to obtain the watermarked image; The process of extracting the image watermark is as follows: The attacked image is processed by convolution to obtain the global features of the attacked image; Based on the global features of the image after the attack and the downsampled hierarchical attention feature fusion model, a first-order hierarchical attention feature fusion watermark tensor is obtained. The first-order hierarchical attention feature fusion watermark tensor after convolution is input into the hierarchical attention feature fusion model to obtain the second-order hierarchical attention feature fusion watermark tensor. The obtained second-order hierarchical attention feature fusion watermark tensor is convolved to extract the image watermark.

7. A computer-readable storage medium having a program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the robust image watermarking method based on hierarchical attention feature fusion as described in any one of claims 1-5.

8. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the robust image watermarking method based on hierarchical attention feature fusion as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Digital media protection text steganography method based on variational automatic encoder

    CN113987129A

  • Visual perception-based robust image watermark embedding method, watermark embedding network construction method and system, and storage medium

    CN114359009A