A multi-size image robust watermarking method and system based on attention mechanism

Through the multi-size image robust watermark method based on attention mechanism, the multi-head attention mechanism and simulated attack links are used to solve the problems of limited watermark embedding capacity and insufficient robustness in the existing technology, and the high embedding capacity and robustness are improved, which is suitable for copyright protection of multi-size color images.

CN115809953BActive Publication Date: 2025-08-08SHANDONG UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211434925.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-16
Publication Date
2025-08-08
Estimated Expiration
2042-11-16

AI Technical Summary

Technical Problem

Most existing image watermarking methods are only applicable to specific image sizes. The watermark embedding capacity is limited, and the robust performance is insufficient, and the calculation complexity is high. It is difficult to improve the embedding capacity and robustness while ensuring unperception.

Method used

A multi-size image robust watermark method is adopted based on attention mechanism. Through the steps of image feature extraction, watermark feature extraction, watermark embedding, simulated attack and watermark extraction, multi-head attention mechanism is used to capture feature information, suppress unimportant channel features, improve inability and embedding capacity, and increase the training ability to resist attacks in the simulated attack link.

Benefits of technology

The embedding capacity of the watermark algorithm is improved to 1/16 of the image size, and the robustness of geometric attacks such as cropping and Cropout is enhanced, the computational complexity is reduced, and the greater robustness and invisibility is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115809953B_ABST
    Figure CN115809953B_ABST
Patent Text Reader

Abstract

The present invention proposes a multi-size image robust watermarking method and system based on an attention mechanism, which relates to the field of digital image watermarking. The method comprises the following steps: preprocessing an input color image and extracting an image feature tensor through an image feature extraction network; performing Arnold scrambling on the watermark information to be embedded by using the watermark feature extraction network to generate a watermark feature tensor of the same size as the image feature tensor; deeply fusing the image feature tensor and the watermark feature tensor through the watermark embedding network to generate a color watermarked image; performing a simulated attack on the color watermarked image by using a simulated attack network to generate an attacked image; and inputting the attacked image into the watermark extraction network to extract the watermark information. The present invention utilizes a multi-head attention mechanism to capture richer feature information, utilizes the attention mechanism to enhance useful channel features, and suppresses unimportant channel features, thereby improving the imperceptibility of the method and the embedding capacity and robustness of the watermarking algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of digital image watermarking, and in particular relates to a multi-size image robust watermarking method and system based on an attention mechanism. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] With the rapid development of digital multimedia technology and the widespread use of image editing software, malicious image tampering and dissemination are becoming increasingly common. Image watermarking technology, as an important branch of active forensics, embeds watermarks in digital images in an invisible form and has been widely used in business, medicine, courts, military and other fields. However, most existing image watermarking methods are only applicable to specific image sizes, and the watermark embedding capacity is limited, generally 1 / 64 of the image size, and the robustness performance still needs to be improved.

[0004] Deep learning has been widely used in the field of image watermarking due to its powerful representation and learning capabilities, and its performance has been greatly improved compared to traditional watermarking methods. However, in order to achieve better performance, deeper networks are generally used, which results in high algorithm complexity and long training time. Existing image watermarking algorithms based on deep neural networks have a small watermark embedding capacity in order to achieve high imperceptibility, and in order to meet actual application requirements, deep convolutional networks are usually required, which leads to a significant increase in computational complexity and may even cause overfitting, gradient anomalies and other phenomena.

[0005] Therefore, how to improve the embedding capacity and robustness of the watermark algorithm while ensuring imperceptibility is one of the problems that needs to be solved at present. Summary of the Invention

[0006] In order to overcome the shortcomings of the above-mentioned prior art, the present invention provides a multi-size image robust watermarking method and system based on the attention mechanism, which includes five steps: image feature extraction, watermark feature extraction, watermark embedding, simulated attack and watermark extraction. The multi-head attention mechanism is used to capture richer feature information, and the attention mechanism is used to enhance useful channel features and suppress unimportant channel features, thereby improving the imperceptibility of the method and the embedding capacity and robustness of the watermark algorithm.

[0007] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:

[0008] The first aspect of the present invention provides a multi-size image robust watermarking method based on an attention mechanism;

[0009] A multi-size image robust watermarking method based on attention mechanism, including:

[0010] The input color image is preprocessed through the image feature extraction network to extract the image feature tensor;

[0011] Using the watermark feature extraction network, the watermark information to be embedded is subjected to Arnold scrambling to generate a watermark feature tensor of the same size as the image feature tensor;

[0012] Through the watermark embedding network, the image feature tensor and the watermark feature tensor are deeply fused to generate a color watermarked image;

[0013] Using the simulated attack network, simulate the attack on the color watermarked image to generate the attacked image;

[0014] The attacked image is input into the watermark extraction network to extract the watermark information.

[0015] Furthermore, the input color image is preprocessed, including size processing and image convolution;

[0016] The size processing is to process color images of different sizes into standard images of the same size, specifically: first, the color image is adjusted to a specified size, then normalized, and then a standard image of the same size that conforms to a standard normal distribution is generated;

[0017] The image convolution performs convolution on the standard image to generate an image tensor.

[0018] Furthermore, the image feature extraction network is a U-shaped network structure, including convolution blocks, downsampling blocks and upsampling blocks, and combines the shallow features extracted by the downsampling blocks with the deep features extracted by the upsampling blocks through jump connections to learn feature maps at different stages.

[0019] Furthermore, the watermark feature extraction network inputs the scrambled watermark information into the convolutional network and the channel attention module to extract the deep features of the watermark and the feature relationship between channels to generate a watermark feature tensor.

[0020] Furthermore, the watermark is embedded in the network, and the specific steps are:

[0021] Perform preliminary fusion of the image feature tensor and the watermark feature tensor to obtain the watermarked tensor;

[0022] Convolve and upsample and downsample the obtained watermarked tensor to obtain the initial watermarked image;

[0023] The inverse operation of the resizing operation is performed on the initial watermarked image to restore it to its original size, thereby obtaining the final color watermarked image.

[0024] Furthermore, a discriminator is added to the watermark embedding network as an adversarial network of the watermark embedding network to perform supervised training on the watermark embedding network.

[0025] Furthermore, the image feature extraction network, watermark feature extraction network, watermark embedding network, simulated attack network and watermark extraction network are encapsulated into one model for overall end-to-end training and testing;

[0026] The loss function of the training includes watermark embedding loss, watermark extraction loss and discriminator loss.

[0027] The second aspect of the present invention provides a multi-scale image robust watermarking system based on an attention mechanism.

[0028] A multi-size image robust watermarking system based on attention mechanism, including image feature extraction module, watermark feature extraction module, watermark embedding module, simulated attack module and watermark extraction module:

[0029] The image feature extraction module is configured to: perform size processing on the input color image and extract image feature tensors using an image feature extraction network;

[0030] The watermark feature extraction module is configured to: perform Arnold scrambling on the watermark information to be embedded, and use the watermark feature extraction network to generate a watermark feature tensor with the same size as the image feature tensor;

[0031] The watermark embedding module is configured to: deeply fuse the image feature tensor and the watermark feature tensor through the watermark embedding network to generate a color watermarked image;

[0032] The simulated attack module is configured to: use the simulated attack network to simulate the attack on the color watermarked image to generate the attacked image;

[0033] The watermark extraction module is configured to: input the attacked image into the watermark extraction network to extract the watermark information.

[0034] The third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps of a multi-size image robust watermarking method based on an attention mechanism as described in the first aspect of the present invention.

[0035] The fourth aspect of the present invention provides an electronic device, comprising a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps of a multi-size image robust watermarking method based on an attention mechanism as described in the first aspect of the present invention are implemented.

[0036] One or more of the above technical solutions have the following beneficial effects:

[0037] The present invention provides a multi-size image robust watermarking method and system based on an attention mechanism, which includes five steps: image feature extraction, watermark feature extraction, watermark embedding, simulated attack and watermark extraction. The multi-head attention mechanism is used to capture richer feature information, and the attention mechanism is used to enhance useful channel features and suppress unimportant channel features, thereby improving the imperceptibility of the method and the embedding capacity and robustness of the watermark algorithm.

[0038] The present invention performs Arnold scrambling on the input watermark information and encrypts the watermark, thereby improving the robustness against geometric attacks such as cropping and cropout. It also adds a simulated attack link to train the ability to resist attacks and improve the robustness of the algorithm in practical application. It uses the channel and spatial attention modules to sequentially generate attention feature information in the channel and spatial dimensions, multiplying it with the original input to generate an attention feature map, focusing on the important parts of the deep features and suppressing irrelevant noise signals, thereby improving the robustness of the method of the present invention.

[0039] The present invention increases the watermark embedding capacity to 1 / 16 of the image size, which is significantly improved compared to the existing watermark method of 1 / 64.

[0040] Advantages of additional aspects of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0042] Figure 1 This is a flow chart of the method of the first embodiment.

[0043] Figure 2 This is a flowchart of image feature extraction in the first embodiment.

[0044] Figure 3 This is a flowchart of watermark feature extraction in the first embodiment.

[0045] Figure 4 This is a flow chart of watermark embedding in the first embodiment.

[0046] Figure 5 This is a flowchart of simulating an attack network in the first embodiment.

[0047] Figure 6 This is a flowchart of watermark extraction in the first embodiment.

[0048] Figure 7This is a system structure diagram of the second embodiment. DETAILED DESCRIPTION

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

[0050] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention; unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.

[0051] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention; as used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or their combinations.

[0052] Example 1

[0053] This embodiment discloses a multi-size image robust watermarking method based on attention mechanism;

[0054] like Figure 1 As shown in FIG, a multi-size image robust watermarking method based on an attention mechanism includes:

[0055] S101: Preprocess the input color image through the image feature extraction network to extract the image feature tensor, such as Figure 2 As shown, specifically:

[0056] (1) Resize the input color image.

[0057] In practical applications, the size of color images is uncertain, and neural networks require fixed-size inputs. Therefore, input images of various sizes must be processed into standard images of the same size, specifically:

[0058] First, the size of the original color image I of any size M×N×3 is resized to 256×256×3, where M and N refer to the length and width of the image, respectively, and 3 refers to the number of channels of the image; then the pixel values are divided by 255 and normalized to the range [0,1]; in order to improve the convergence speed of the model, the formula (x-mean) / std is used to distribute the pixel values to the range (-1,1) to generate standard normal distribution data with a mean of 0 and a variance of 1, and a standard image I of the same size is obtained. p .

[0059] (2) Perform image convolution on the standard image.

[0060] Perform 3×3 convolution on the resized standard image to generate an image tensor of 256×256×64.

[0061] (3) Input the image tensor into the backbone network of the image feature extraction network to extract the image feature tensor.

[0062] The backbone network of the image feature extraction network is a U-shaped network structure, including the convolution block Swin Transforme, the downsampling block Patch Merging and the upsampling block Patch Expanding. The Patch Expanding block is designed as the inverse operation of the Patch Merging block, and combines the shallow features extracted by the downsampling block with the deep features extracted by the upsampling block through skip connections to learn feature maps at different stages and ensure feature integrity.

[0063] Image feature extraction aims to extract the global features of the image, while taking into account the problem of uncertain image size in practical applications, thereby improving the universality of the method of the present invention.

[0064] S102: Using the watermark feature extraction network, perform Arnold scrambling on the watermark information to be embedded to generate a watermark feature tensor with the same size as the image feature tensor, such as Figure 3 As shown, specifically:

[0065] (1) Perform Arnold scrambling on the original watermark image W to be embedded to generate the scrambled watermark image W s ; Arnold scrambling can not only encrypt the watermark, but also improve the robustness to geometric attacks such as cropping, Cropout, etc.

[0066] (2) The scrambled watermark image W s Perform a 3×3 convolution to generate a 64×64×64 watermark tensor.

[0067] (3) Perform transposed convolution on the convolved watermark tensor to increase the height and width of the watermark tensor and generate a tensor of the same size as the image feature tensor output by S101, so as to facilitate the fusion of image features and watermark features during watermark embedding.

[0068] (4) The channel attention module of the watermark feature extraction network is used to extract the feature relationship between channels and generate the watermark feature tensor.

[0069] The channel attention module of the watermark feature extraction network consists of an average pooling layer and a fully connected layer. First, global average pooling is performed on each channel of the input tensor. Then, the fully connected layer is used to generate the channel attention weight, which is multiplied by the input tensor to generate a 256×256×64 channel attention feature tensor, which is the watermark feature tensor.

[0070] Watermark feature extraction aims to extract the deep features of the watermark and improve the robustness of the algorithm to geometric attacks such as cropping and Cropout through Arnold scrambling.

[0071] S103: Through the watermark embedding network, the image feature tensor and the watermark feature tensor are deeply fused to generate a color watermarked image, such as Figure 4 As shown, specifically:

[0072] (1) Perform preliminary fusion of the image feature tensor and the watermark feature tensor to obtain the watermark tensor;

[0073] The image feature tensor generated by S101 and the watermark feature tensor generated by S102 are concatenated, and the features are preliminarily fused through 3×3 convolution to generate a watermark tensor of size 256×256×64.

[0074] (2) Convolution and up- and down-sampling are performed on the obtained watermarked tensor to obtain the initial watermarked image;

[0075] Convolution and up- and down-sampling are performed through the backbone network of the watermark embedding network, specifically:

[0076] The generated watermarked tensor is fed into the backbone network. To better perform feature fusion, a 256×256×64 tensor is generated. The backbone network structure is similar to the U-Net network, but in this embodiment, double convolution is used to increase the number of feature channels. Downsampling (i.e., pooling layer) compresses the input features, and multiple operations generate a tensor with 512 feature channels. It is then upsampled and double convolved to restore it to the original input size. Skip connections are used to combine the shallow features extracted in the downsampling stage with the deep features extracted in the upsampling stage to better learn the feature maps of different stages. Double convolution refers to two consecutive convolution, batch normalization, and ReLU operations.

[0077] Compare the 256×256×64 tensor generated by the backbone network with the image I after S101 size processing p Perform feature splicing and 3×3 convolution to generate an initial watermarked image I of size 256×256×3 wp .

[0078] In the watermark embedding network, a discriminator is added as an adversarial network of the watermark embedding network to supervise the training of the watermark embedding network; the image I after S101 size processing is p And the generated initial watermarked image I wpThe input is fed into the discriminator for differentiation; the discriminator network structure consists of two 3×3 convolutional layers, an adaptive average pooling layer, and a linear layer. Its essence is to act as an adversarial network for the watermark embedding network, supervising the generation of higher quality watermarked images that are minimally different from the cover image.

[0079] (3) Perform the inverse operation of the size processing on the initial watermarked image to restore it to its original size and obtain the final color watermarked image.

[0080] The generated initial watermarked image I wp Perform image processing to restore the watermarked image to the same size as the original image I. This process can be regarded as the inverse operation of the size processing in S101.

[0081] Watermark embedding aims to fuse the features of the watermark and the image, and perform jump connections with the original image to generate a high-quality watermarked image.

[0082] S104: Using the simulated attack network, simulate the attack on the color watermarked image to generate an attacked image.

[0083] Simulate attack networks, such as Figure 5 As shown, four attack methods are included: simulated JPEG compression, real JPEG compression, salt and pepper noise, and cropping attacks, which form distinguishable attack layers and improve the robustness of the algorithm in practical application. Although using real attacks to generate attacked images is more effective, the computational complexity is too high in actual application and its practicality is poor. Therefore, simulated attacks are mostly used. However, JPEG compression attacks are non-differentiable attacks and are difficult to accurately simulate using differentiable methods. Therefore, this embodiment adopts a method of training both simulated and real JPEG compression attacks. In addition, simulated attacks are used for salt and pepper noise attacks and cropping attacks.

[0084] The watermarked image generated by S103 is input into the simulated attack network. During the training process, one of the attack methods is randomly selected in each iteration to generate an M×N×3 post-attack image I A .

[0085] Simulated attacks are used in the training phase of the model to improve the robustness of the algorithm.

[0086] S105: Input the attacked image into the watermark extraction network to extract the watermark information, such as Figure 6 As shown, specifically:

[0087] (1) For the image I after attack A Perform size processing to obtain a standard image.

[0088] (2) Perform 3×3 convolution on the standard image to generate an image tensor of 256×256×64.

[0089] (3) The image tensor is input into the backbone network of the watermark extraction network to extract deeper watermark related features in the tensor, where the watermark extraction network has the same backbone network structure as the watermark embedding network in S103.

[0090] (4) Attention feature information in the channel and spatial dimensions is generated in sequence through the channel and spatial attention modules, and is multiplied with the original input to generate an attention feature tensor, focusing on the important parts of the deep features and suppressing irrelevant noise signals, thereby improving the robustness of the method of the present invention.

[0091] (5) The attention feature tensor is passed through a 3×3 convolution layer and a maximum pooling layer to generate a watermark feature tensor of size 64×64×1.

[0092] (6) Perform inverse Arnold scrambling on the obtained watermark feature tensor to obtain the final extracted watermark information W e If the embedded watermark is 4096 bits long, the information after inverse Arnold scrambling needs to be reshaped to generate 1×4096 bits of watermark information.

[0093] Watermark extraction aims to extract the watermark image from the attacked image with high accuracy and realize the copyright authentication of digital images.

[0094] It also includes encapsulating the image feature extraction network, watermark feature extraction network, watermark embedding network, simulated attack network and watermark extraction network into an overall model for end-to-end training and testing;

[0095] The loss function of the training includes watermark embedding loss, watermark extraction loss and discriminator loss.

[0096] 50,000 images of different categories of arbitrary sizes in the ImageNet dataset are used as training datasets to train the encapsulated overall model; the training loss function L includes the watermark embedding loss L I , watermark extraction loss L E and the discriminator loss L D The watermark embedding loss is mainly the loss of the cover image caused by the watermark embedding process, which is expressed by the structural similarity function:

[0097]

[0098] Among them, I is the original image, I W is the generated watermarked image, μ I is the average value of I, σ I is the standard deviation of I, For I W The average value of For I W The standard deviation of for (I,I W ), c1 and c2 are two metric constants, which are set to 1×10 -4 and 9×10 -4 .

[0099] The watermark extraction loss is mainly the loss of the extracted watermark information. This embodiment embeds a binary watermark, so the binary cross entropy loss (BCELoss) is used:

[0100]

[0101] Among them, Ω is the image domain, y i is the real watermark pixel value, Predict the watermark pixel value of this point for the network;

[0102] The discriminator is used to distinguish the original cover image from the watermarked image, and the discriminator loss is expressed as:

[0103] L D =log(D(θ D ,I))+log(1-D(θ D ,I(θ I ,I,W)))

[0104] Where D is the discriminator, I is the watermark embedding network, θ D are the parameters of the discriminator network, θ I Parameters of the watermark embedding network.

[0105] The total loss function L is:

[0106] L=λ I L I +λ E L E +λ D L D

[0107] Among them, λ I ,λ E and λ D are the weight factors of watermark embedding loss, watermark extraction loss and discriminator loss respectively.

[0108] Other training parameters are shown in Table 1. The trained parameters of the network are saved.

[0109] Table 1 Settings of training parameters for the five modules

[0110]

[0111]

[0112] At this point, all network models involved in this embodiment have been constructed and trained, and the training results of the models, i.e., weight files, have been saved.

[0113] When testing the performance of this method, all simulated attacks in the attack layer are replaced with real attacks. Figure 1 The process shown uses the trained weight parameters to obtain the watermarked image, the post-attack image generated after the real attack, and the watermark information extracted after the attack.

[0114] In order to test the generalization ability of the method against attacks, new attack methods are added on the basis of the existing attack methods in the training phase, such as Gaussian filtering, Gaussian noise, scaling attack, Cropout attack, and Dropout attack; among them, the Cropout attack replaces a certain proportion of blocks in the watermarked image with the corresponding blocks of the original cover image; the Dropout attack randomly selects a certain proportion of pixels from the watermarked image and replaces their pixel values with the corresponding pixel values of the cover image.

[0115] The method proposed in this embodiment has good robustness, can embed a large capacity, and can use color images of any size as cover images, making it suitable for copyright protection of digital image products. To demonstrate its practicality, 5,000 test images from the COCO dataset were used as a test set to verify its robustness against various attacks.

[0116] The method of this embodiment is compared with the classic algorithms ReDMark and MBRS based on deep neural networks; ReDMark is a framework for residual diffusion watermarking based on deep networks, and MBRS is enhancing robustness of DNN-based watermarking by mini-batch of real and simulated JPEG compression.

[0117] Since the ReDMark method is applicable to grayscale images, in order to compare the effectiveness of the results, this embodiment converts color images into YCbCr components and embeds watermark information in the Y component when performing performance testing on the ReDMark algorithm. When testing the MBRS algorithm, since the MBRS method can only embed up to 256 bits of watermark information, the watermark embedding capacity is 1 / 256 of the image size. Therefore, when testing the MBRS algorithm, the embedding capacity is changed to 4096 bits of watermark information.

[0118] Since the robustness and imperceptibility of the method are mutually constrained, Table 2 shows the bit error rate of watermark extraction of the three methods under the premise that the imperceptibility of the generated watermarked images is the same (i.e., the PSNR is the same);

[0119] Table 2 Comparison of bit error rates of three methods under various attacks

[0120]

[0121] As can be seen from the data in Table 2, the method proposed in this embodiment has a low bit error rate for watermark extraction under various attacks, such as JPEG compression, Gaussian filtering, Gaussian noise, scaling attack, and cropping attack, and has better robustness.

[0122] Based on the attention mechanism and deep learning, this embodiment proposes a large-capacity robust watermarking algorithm suitable for multi-sized color images; this method has better robustness and larger embedding capacity than existing deep learning-based methods, and has a wider range of applications; using this method, relatively complete watermark information can be extracted while ensuring image quality, thereby achieving copyright protection for digital images.

[0123] Example 2

[0124] This embodiment discloses a multi-size image robust watermarking system based on attention mechanism;

[0125] like Figure 7 As shown in the figure, a multi-size image robust watermarking system based on the attention mechanism includes an image feature extraction module, a watermark feature extraction module, a watermark embedding module, a simulated attack module and a watermark extraction module:

[0126] The image feature extraction module is configured to: perform size processing on the input color image and extract image feature tensors using an image feature extraction network;

[0127] The watermark feature extraction module is configured to: perform Arnold scrambling on the watermark information to be embedded, and use the watermark feature extraction network to generate a watermark feature tensor with the same size as the image feature tensor;

[0128] The watermark embedding module is configured to: deeply fuse the image feature tensor and the watermark feature tensor through the watermark embedding network to generate a color watermarked image;

[0129] The simulated attack module is configured to: use the simulated attack network to simulate the attack on the color watermarked image to generate the attacked image;

[0130] The watermark extraction module is configured to: input the attacked image into the watermark extraction network to extract the watermark information.

[0131] Example 3

[0132] The purpose of this embodiment is to provide a computer-readable storage medium.

[0133] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a multi-size image robust watermarking method based on an attention mechanism as described in the first embodiment of the present disclosure.

[0134] Example 4

[0135] The purpose of this embodiment is to provide an electronic device.

[0136] 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, the steps of a multi-size image robust watermarking method based on an attention mechanism as described in the first embodiment of the present disclosure are implemented.

[0137] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A multi-scale image robust watermarking method based on attention mechanism, characterized by: include: The input color image is preprocessed through the image feature extraction network to extract the image feature tensor; Using the watermark feature extraction network, the watermark information to be embedded is subjected to Arnold scrambling to generate a watermark feature tensor of the same size as the image feature tensor; Through the watermark embedding network, the image feature tensor and the watermark feature tensor are deeply fused to generate a color watermarked image; Using the simulated attack network, simulate the attack on the color watermarked image to generate the attacked image; Input the attacked image into the watermark extraction network to extract the watermark information; The image feature extraction network is a U-shaped network structure, including convolution blocks, downsampling blocks and upsampling blocks, and combines the shallow features extracted by the downsampling blocks with the deep features extracted by the upsampling blocks through jump connections to learn feature maps at different stages; The watermark feature extraction network includes inputting the scrambled watermark information into a convolutional network and a channel attention module, extracting the deep features of the watermark and the feature relationship between channels, and generating a watermark feature tensor.

2. A multi-size image robust watermarking method based on attention mechanism as claimed in claim 1, characterized in that: The input color image is preprocessed, including size processing and image convolution; The size processing is to process color images of different sizes into standard images of the same size, specifically: first, the color image is adjusted to a specified size, then normalized, and then a standard image of the same size that conforms to a standard normal distribution is generated; The image convolution performs convolution on the standard image to generate an image tensor.

3. The multi-scale image robust watermarking method based on the attention mechanism according to claim 1, characterized in that: The watermark is embedded in the network, and the specific steps are: Perform preliminary fusion of the image feature tensor and the watermark feature tensor to obtain the watermarked tensor; Convolve and upsample and downsample the obtained watermarked tensor to obtain the initial watermarked image; The inverse operation of the resizing operation is performed on the initial watermarked image to restore it to its original size, thereby obtaining the final color watermarked image.

4. The multi-scale image robust watermarking method based on the attention mechanism according to claim 1, characterized in that: In the watermark embedding network, a discriminator is added as an adversarial network to supervise the training of the watermark embedding network.

5. A multi-size image robust watermarking method based on attention mechanism as claimed in claim 4, characterized in that: Encapsulating the image feature extraction network, watermark feature extraction network, watermark embedding network, simulated attack network, and watermark extraction network into one model for overall end-to-end training and testing; The loss functions for training include watermark embedding loss, watermark extraction loss and discriminator loss.

6. A multi-scale image robust watermarking system based on attention mechanism, characterized by: Including image feature extraction module, watermark feature extraction module, watermark embedding module, simulated attack module and watermark extraction module: The image feature extraction module is configured to: preprocess the input color image through the image feature extraction network to extract the image feature tensor; The watermark feature extraction module is configured to: utilize the watermark feature extraction network to perform Arnold scrambling on the watermark information to be embedded, and generate a watermark feature tensor of the same size as the image feature tensor; The watermark embedding module is configured to: deeply fuse the image feature tensor and the watermark feature tensor through the watermark embedding network to generate a color watermarked image; The simulated attack module is configured to: use the simulated attack network to simulate the attack on the color watermarked image to generate the attacked image; The watermark extraction module is configured to: input the attacked image into the watermark extraction network to extract the watermark information; The image feature extraction network is a U-shaped network structure, including convolution blocks, downsampling blocks and upsampling blocks, and combines the shallow features extracted by the downsampling blocks with the deep features extracted by the upsampling blocks through jump connections to learn feature maps at different stages; The watermark feature extraction network includes inputting the scrambled watermark information into a convolutional network and a channel attention module, extracting the deep features of the watermark and the feature relationship between channels, and generating a watermark feature tensor.

7. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the steps of the multi-size image robust watermarking method based on the attention mechanism are implemented as described in any one of claims 1 to 5.

8. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the multi-size image robust watermarking method based on the attention mechanism are implemented as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Watermark removing method and device based on convolution feature fusion, equipment and medium

    CN113935882A

  • Self-coding color image robust watermark processing method based on visual perception

    CN114841846A