Image watermarking method and system based on decoding guided by self-supervised visual model

By using a self-supervised visual model to guide decoding and leveraging semantic understanding capabilities to replace traditional geometric synchronization, the dependence on positioning masks in existing technologies is resolved, enabling robust decoding under complex distortion conditions and improving the robustness and invisibility of image watermarks.

CN121504703AActive Publication Date: 2026-02-10CHANGSHA YIYUE TECHNOLOGY CO LTD

Patent Information

Application Number
CN202610043745.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-14
Publication Date
2026-02-10
Estimated Expiration
2046-01-14

AI Technical Summary

Technical Problem

Existing anti-printing image watermarking technologies rely too heavily on location masks, resulting in poor decoding robustness when mask prediction is inaccurate, especially decoding failure under complex geometric distortions.

Method used

A self-supervised visual model-guided decoding method is adopted, which utilizes the semantic understanding capability of deep visual models to generate distorted guiding heatmaps and spatial attention maps through self-supervised training, thereby achieving end-to-end robust decoding without correction.

Benefits of technology

Completely eliminating the reliance on positioning masks improves the system's robustness and reliability in real-world printing and shooting scenarios, enabling it to resist complex asynchronous distortions and enhancing the robustness and invisibility of image watermarks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121504703A_ABST
    Figure CN121504703A_ABST
Patent Text Reader

Abstract

The invention discloses an image watermarking method and system based on decoding guided by a self-supervised visual model. The method comprises the following steps: acquiring watermark information m and an original image I of each data sample in a training data set; for each data sample, preprocessing the watermark information m to generate a message tensor M, and performing degradation distortion processing on the original image I to generate a distortion guide heat map DGH, thereby obtaining a preprocessed training data set; and performing self-supervising training on the self-supervising visual model by using the preprocessed training data set to finally obtain the trained self-supervising visual model. The invention aims to solve the problem that the decoding robustness is poor when the mask prediction is inaccurate due to the fact that the existing printing-resistant shooting watermark technology excessively depends on the positioning mask, and the semantic comprehension capability of the depth vision model is utilized to replace the traditional geometric synchronization, so that the end-to-end robust decoding without correction is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of digital information security and image processing, and particularly relates to an image watermarking method and system based on self-supervised visual model guided decoding. BACKGROUND

[0002] With the popularity of smart phones and printing devices, the problem of print content leakage caused by print-shooting is increasingly serious, which poses a significant threat to digital copyright and confidential data security. The characteristics of print-shooting are unpredictable viewing angles, a variety of devices (such as mobile phones and tablet computers), and environmental light interference, which will bring asynchronous geometric distortion (such as perspective, rotation, and scaling) and pixel-level distortion (such as moire, sensor noise, optical blur, and exposure difference) to images. Such distortion is nonlinear, highly complex, and difficult to accurately describe with a simple mathematical model. Therefore, image watermarking technology against print-shooting is particularly important in the field of digital copyright and confidential data security. Existing image watermarking technology against print-shooting includes localization mask technology relying on explicit (such as visible localization boxes) and implicit (such as invisible localization markers), and the core idea of these methods is to solve the synchronization problem caused by asynchronous geometric distortion in the print-shooting scene. These methods usually require a two-stage process: first, estimate a localization mask or key points in the distorted image; then, perform geometric correction (such as perspective transformation) according to the estimated position information to "straighten" the distorted image; finally, decode the watermark information on the corrected image. The existing image watermarking technology against print-shooting has a fundamental vulnerability. Their effectiveness is highly dependent on the accuracy of localization mask estimation. It is extremely difficult to accurately locate the mask or key points under complex print-shooting distortion. Even a slight deviation in mask prediction will be amplified in the subsequent geometric correction process, causing pixel misalignment in the corrected image, and ultimately causing confusion in the decoder input information, leading to decoding failure. Therefore, how to get rid of the dependence on this error-prone and sensitive localization mask and geometric correction step is a key technical problem that needs to be solved in the current image watermarking technology against print-shooting. SUMMARY

[0003] The technical problem to be solved by the present application: in view of the above problems of the prior art, the present application provides an image watermarking method and system based on self-supervised visual model guided decoding, which aims to solve the problem of poor decoding robustness when the mask prediction is not accurate (especially under complex geometric distortion) due to the excessive dependence of existing print-shooting watermarking technology on localization mask, and to replace the traditional geometric synchronization with the semantic understanding ability of deep visual models to achieve end-to-end, correction-free robust decoding.

[0004] To solve the above technical problems, the technical scheme adopted by the present application is: An image watermarking method based on self-supervised visual model guided decoding, comprising the following steps: S101, obtaining watermark information m and original image I of each data sample in a training data set; S102, for each data sample, pre-processing the watermark information m to generate a message tensor M, and performing degradation distortion processing on the original image I to generate a distortion guide heat map DGH, thereby obtaining a pre-processed training data set; S103, using the pre-processed training data set to perform self-supervised training on a self-supervised visual model, the self-supervised visual model comprising an encoder, a print and shooting noise layer, a decoder and a pre-trained self-supervised semantic feature extraction network, and the processing for each data sample in the self-supervised training comprises: ①, using the encoder to encode the message tensor M, the distortion guide heat map DGH and the original image I of the data sample to obtain a corresponding watermark image ; ②, using the print and shooting noise layer to perform degradation distortion processing on the watermark image to generate a distorted image ; using the pre-trained self-supervised semantic feature extraction network to extract a spatial attention map from the watermark image ; ③, using the decoder to decode the distorted image to generate decoded watermark information ; ④, according to a preset loss function to optimize and update the model parameters of the self-supervised visual model, the preset loss function comprising the loss between the watermark information m of the training sample and the decoded watermark information ; finally obtaining a trained self-supervised visual model for encoding the corresponding watermark image according to the input message tensor M, distortion guide heat map DGH and original image I in the inference stage.

[0005] Optionally, in step S102, pre-processing the watermark information m to generate the message tensor M comprises: mapping the watermark information m of length L bits to a high-dimensional vector through a fully connected layer and reshaping it into a spatial grid shape of a specified size, and then up-sampling the features obtained after reshaping to the resolution size required by the encoder input as the generated message tensor M.

[0006] Optionally, in step S102, generating the distortion guide heat map DGH from the original image I comprises: S201, performing degradation processing on the original image to generate a distorted image ; S202, obtaining the original image and the distorted image Using horizontal gradient operators respectively With vertical gradient operator Convolution operation is performed to obtain the coordinates of each pixel in the original image I. Horizontal and vertical gradient responses at: ; ; ; ; in, and Original images Pixel coordinates The horizontal and vertical gradient responses at each pixel coordinate The horizontal and vertical gradient responses at the location; and Distorted images Pixel coordinates The horizontal and vertical gradient responses at each pixel coordinate The horizontal and vertical gradient responses at the location; S203, calculate the original image at the pixel level. and distorted images Differences in gradient response between them: ; in, Original image and distorted images pixel coordinates Difference in gradient response at location, The type or configuration of the gradient operator used in the convolution operation to calculate the difference in gradient responses; S204, the original image Divide into several window sets according to the preset window size. and for each window The gradient response differences within each window are statistically analyzed, and the average value of the pixel gradient response differences within each window is calculated: ; in, For the first The average value of pixel gradient response differences within a window. For the first The number of pixels within a window; S205, the average value of the pixel gradient response difference in each window is processed by spatial smoothing and normalization, so as to obtain the distortion guided heatmap DGH composed of the normalized processing results of each window.

[0007] Optionally, in step S205, the function expression of the normalization processing is: ; wherein, is the normalization processing result of the i-th window, is a constant coefficient, is the gradient response difference of the pixel point in the i-th window, is the average value of the gradient response difference in the i-th window, is obtained by spatial smoothing.

[0008] Optionally, the encoder is used to encode the message tensor M, the distortion guided heat map DGH and the original image I of the data sample to obtain the corresponding watermark image , which comprises: S301, splicing the message tensor M, the distortion guided heat map DGH and the original image I in the channel dimension to obtain an input tensor; S302, performing two-dimensional Fourier transform on the input tensor to obtain frequency features; S303, multiplying the frequency features by a gain to enhance high-frequency components, wherein is a weight coefficient, is a smoothing gate function, is a radial frequency, and the radial frequency is the frequency size in the radial direction from the spectrum center in the two-dimensional frequency domain; S304, performing two-dimensional inverse Fourier transform on the frequency features after enhancing the high-frequency components to obtain a frequency-enhanced tensor; S305, calculating the difference between the input tensor and the frequency-enhanced tensor; and obtaining the residual disturbance of the original image I by using a pre-trained U-Net network or a ResNet network; S306, fusing the residual disturbance with the original image I according to the following formula to obtain the watermark image corresponding to the original image I: ; wherein, is the watermark image corresponding to the original image I, is a fusion weight, is a hyperbolic tangent function, is the residual disturbance.

[0009] Optionally, the loss in the preset loss function includes an image loss and a message loss, the message loss includes the loss between the watermark information m of the training sample and the decoded watermark information , and the image loss includes the original image I of the training sample and the watermark image ​​part or all of the pixel loss, structural similarity loss, and semantic loss between them.

[0010] Optionally, the degradation distortion processing includes randomly performing part or all of perspective distortion, illumination distortion, moire simulation, motion or Gaussian blur, Gaussian noise, and JPEG compression.

[0011] The application also provides an image watermarking system based on self-supervised visual model guided decoding, comprising a microprocessor and a memory connected to each other, the microprocessor being programmed or configured to execute the image watermarking method based on self-supervised visual model guided decoding.

[0012] The application also provides a computer readable storage medium having a computer program or instructions stored therein, the computer program or instructions being programmed or configured to execute the image watermarking method based on self-supervised visual model guided decoding by a processor.

[0013] The application also provides a computer program product comprising a computer program or instructions, the computer program or instructions being programmed or configured to execute the image watermarking method based on self-supervised visual model guided decoding by a processor.

[0014] Compared with the prior art, the application mainly has the following beneficial effects: to solve the problem that the existing anti-printing and shooting watermarking technology excessively relies on positioning masks, resulting in poor decoding robustness when mask prediction is inaccurate (especially under complex geometric distortion), the application realizes a mask-free anti-printing and shooting robust image watermarking technology, which has the following advantages: 1. Mask-free, strong robustness: the application completely gets rid of the dependence on explicit or implicit positioning masks, fundamentally avoids decoding failure caused by mask prediction error and geometric correction error amplification. The application can directly process images with severe geometric distortion, significantly improving the robustness and reliability of the system in real printing and shooting scenarios.

[0015] 2. Based on semantic guidance to resist complex asynchronous distortion: the application uses a pre-trained self-supervised semantic feature extraction network to extract a spatial attention map from the watermark image as a perspective stable semantic prior to guide decoding, which is a completely new idea. Instead of "geometric alignment", "semantic alignment" replaces the traditional correction method based on geometric coordinates, which can better resist complex asynchronous distortion.

[0016] 3、Encoding optimization performance is better: the application actively improves the robustness and invisibility of the watermark in the encoding stage through the noise perception encoding module (distortion-guided heatmap DGH and frequency enhancement) and semantic consistency constraints, so that the embedded watermark is more resistant "innately", further improving the end-to-end system performance. Through the combination of the above technologies, the semantic understanding ability of the deep visual model can be used to replace the traditional geometric synchronization, and the end-to-end robust decoding without correction can be realized, which can be widely used in image processing in the fields of copyright tracking, leakage tracing and legal evidence, etc. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 The basic flowchart of the embodiment method of the application is shown.

[0018] Figure 2 The network structure diagram of the self-supervised visual model in the embodiment of the application is shown. DETAILED DESCRIPTION

[0019] The core insight of the application is that although the geometric shape of the image changes dramatically after printing and shooting, the core semantic content (such as the main object in the image) is consistent "as seen" by humans or powerful visual models. The application uses a pre-trained self-supervised semantic feature extraction network to extract spatial attention maps (Attention Maps) from the watermark image as a kind of view-stable semantic prior information, which identifies the most important content area in the image. The application uses this prior to guide the decoder to recover the watermark information directly from the original image with geometric distortion without any form of positioning mask or geometric correction. In order to enable personnel in the technical field to better understand the technical solutions of the application, the technical solutions of the application will be further described in detail below in combination with the drawings in the embodiments of the application.

[0020] As shown in Figure 1 The image watermarking method based on self-supervised visual model guided decoding in the embodiment includes the following steps: S101, obtaining watermark information m and original image I of each data sample in the training data set; S102, for each data sample, pre-processing the watermark information m to generate a message tensor M, and performing degradation distortion processing on the original image I to generate a distortion-guided heatmap DGH (Distortion-Guided Heatmap), thereby obtaining a pre-processed training data set; S103, using the pre-processed training data set to perform self-supervised training on the self-supervised visual model; As shown in Figure 2As shown, the self-supervised vision model includes an encoder, a printing and shooting noise layer, a decoder, and a pre-trained self-supervised semantic feature extraction network. The processing for each data sample during self-supervised training includes: ① The message tensor M, the distortion-guided heatmap DGH, and the original image I of the data sample are encoded using an encoder to obtain the corresponding watermark image. ; ② Use printing to capture the noise layer to remove the watermark image Degradation and distortion processing is performed to generate distorted images. ;Utilizing a pre-trained self-supervised semantic feature extraction network to extract watermark images Extracting spatial attention maps ; ③ Use a decoder to convert the distorted image Decode to generate watermark information ; ④ Optimize and update the model parameters of the self-supervised visual model according to a preset loss function, wherein the preset loss function includes the watermark information m of the training samples and the decoded watermark information. The losses between; The final trained self-supervised visual model is used to encode the corresponding watermark image based on the input message tensor M, the distortion-guided heatmap DGH, and the original image I during the inference phase. .

[0021] The encoder is used for noise-aware encoding to efficiently and robustly embed watermark information into the original image, giving it an "active defense" against distortion during the embedding stage.

[0022] In step S102 of this embodiment, preprocessing the watermark information m to generate a message tensor M includes: mapping the L-bit watermark information m into a high-dimensional vector through a fully connected layer and reshaping it into a spatial grid shape of a specified size; then upsampling the reshaped features to the resolution required for the encoder input to use as the generated message tensor M. This spatialization process helps the subsequent encoder to align and fuse the message bits with the spatial features of the image (such as texture and edges). Specifically, in this embodiment, the L-bit binary message... The vector is mapped to a high-dimensional vector through a fully connected layer and then reshaped into a spatial grid (size 1). The data is then upsampled to a resolution that matches the encoder input, forming the message tensor M.

[0023] In this embodiment, the original image I undergoes degradation and distortion processing to generate a Distortion-Guided Heatmap (DGH). By simulating pixel-level degradation common in printing and shooting (such as JPEG compression, blurring, and noise) in advance, the Distortion-Guided Heatmap (DGH) is used to identify areas in the image that are highly resistant to these distortions (usually high-frequency edges and textured areas, rather than flat color blocks). The encoder uses the Distortion-Guided Heatmap (DGH) as spatial weighting to adaptively embed more watermark information into these stable areas, thereby improving the robustness of the watermark at the source. Specifically, in step S102 of this embodiment, generating the Distortion-Guided Heatmap (DGH) from the original image I includes: S201, the original image Degradation processing is performed to generate distorted images. ; the original image Degradation processing is performed to generate distorted images. It can be utilized through a differentiable distortion operator. To synthesize its degenerate version, it can be represented as: ; The distortion operator The simulation included some or all of the following: perspective distortion (simulating angle), lighting distortion (simulating ambient light), moiré pattern simulation, motion or Gaussian blur, Gaussian noise, and JPEG compression. Distortion operation configured; S202, for the original image and distorted images Using horizontal gradient operators respectively With vertical gradient operator Convolution operation is performed to obtain the coordinates of each pixel in the original image I. Horizontal and vertical gradient responses at: ; ; ; ; in, and Original images Pixel coordinates The horizontal and vertical gradient responses at each pixel coordinate The horizontal and vertical gradient responses at the location; and Distorted images Pixel coordinates The horizontal and vertical gradient responses at each pixel coordinate The horizontal and vertical gradient responses at the location; S203, calculate the original image at the pixel level. and distorted images Differences in gradient response between them: ; in, Original image and distorted images pixel coordinates Difference in gradient response at location, The type or configuration of the gradient operator used in the convolution operation to calculate gradient response differences; by calculating the original image and distorted images Difference in gradient response between To quantify the robustness of each pixel, intuitively, regions with small gradient response differences (such as strong edges and complex textures) mean that the structural information of the region can still be preserved after distortion, making them ideal locations for embedding watermarks; while regions with large differences (such as flat regions) are more susceptible to noise. S204, the original image Divide into several window sets according to the preset window size. and for each window The gradient response differences within each window are statistically analyzed, and the average value of the pixel gradient response differences within each window is calculated: ; in, For the first The average value of pixel gradient response differences within a window. For the first The number of pixels within a window; S205, the average value of the pixel gradient response difference in each window is processed by spatial smoothing and normalization to obtain the distortion guided heatmap DGH composed of the normalized processing results of each window. Pixels (edges and textures) with high scores in the distortion guided heatmap DGH represent regions that are more stable under distortion.

[0024] In step S205 of this embodiment, the function expression for the normalization process is: ; in, For the first The normalization result of each window. The constant coefficients, For the first Pixels within a window Gradient response differences The average value is obtained by spatial smoothing (such as Gaussian filtering).

[0025] In this embodiment, an encoder is used to encode the message tensor M, the distorted guided heatmap DGH, and the original image I of the data sample to obtain the corresponding watermark image. Specifically, this is achieved through a Frequency Enhancement Module (FEM). The FEM leverages the human visual system's (HVS) insensitivity to high-frequency signals (such as fine textures) but its high sensitivity to subtle perturbations in low-frequency signals (such as large color blocks). This module actively directs the energy of the watermark signal to the high-frequency components of the image. This not only makes the watermark less perceptible to the naked eye (improving its invisibility) but also makes it more resilient to blurring (a low-pass filtering effect) common in printing and photography. Specifically, the message tensor M of the data sample, the distortion-guided heatmap DGH, and the original image I are encoded to obtain the corresponding watermark image. include: S301, concatenate the message tensor M, the distortion-guided heatmap DGH, and the original image I along the channel dimension to form the input tensor. , can be represented as: ,in" "This is a splicing operation." Distortionate guide heatmap DGH; S302, input tensor Perform two-dimensional Fourier transform Obtain frequency characteristics ; S303 multiplies the frequency characteristic by the gain To enhance high-frequency components, among which These are the weighting coefficients. For smooth gating functions (such as the Sigmoid function). The radial frequency is the frequency magnitude in the two-dimensional frequency domain, extending from the center of the spectrum outwards along the radial direction. S304 performs a two-dimensional inverse Fourier transform on the frequency characteristics after enhancing the high-frequency components. The frequency-enhanced tensor can be represented as: This allows the watermark energy to be directed to the high-frequency region in a controlled manner, rather than being embedded "flatly" across all frequencies; S305: Calculate the difference between the input tensor and the frequency-enhanced tensor; use the difference to obtain the residual perturbation of the original image I using a pre-trained U-Net network (or ResNet network); the U-Net network extracts features through downsampling paths and fuses multi-scale features through upsampling paths and skip connections to finally generate the residual perturbation; it should be noted that the U-Net network is an existing network model, so its implementation details will not be described in detail here. S306, the residual perturbation is fused with the original image I according to the following formula to obtain the watermark image corresponding to the original image I: ; in, This is the watermark image corresponding to the original image I. To integrate weights, It is the hyperbolic tangent function. This is the residual disturbance.

[0026] In this embodiment, a print shooting noise layer is used to mask the watermark image. A series of random and differentiable transformations are applied to simulate real-world printing distortion, generating distorted images. The printed imaging noise layer acts as a bridge between the encoder and decoder, randomly applying a series of complex distortion operations, including: Perspective Distortion: Simulates different shooting angles; Illumination Variation: Simulates uneven brightness between ambient light and printed materials; Moiré pattern simulation: Simulating the interference between printed materials and camera sensor meshes; Motion or Gaussian blur: simulates camera shake or defocus; Gaussian noise: analog sensor noise; JPEG compression: Analog image storage; These actions bridge the gap between simulation training and the real physical world (i.e., the "sim-to-real" gap), forcing the encoder to generate more robust watermarks and training the decoder to extract information from heavily distorted images. During training, the intensity of these distortions is controlled by a scheduling function with each training step (t). (in The "curricular learning" strategy, which gradually increases the length of the model (which is set to a preset value), helps stabilize the training process. The model first learns to fight against minor distortions and then gradually transitions to fighting against more severe compound distortions.

[0027] The self-supervised semantic feature extraction network and the decoder together constitute the decoding module (DINOv2-GuidedDecoding Module), used to extract semantic features from distorted images. Recover the decoded watermark information This module is the core of the method in this embodiment, responsible for extracting watermarks "mask-independently" from distorted images obtained through printing. To obtain viewpoint-stable semantic priors, this embodiment utilizes a pre-trained and frozen (not participating in training) self-supervised semantic feature extraction network to extract features (spatial attention maps) from the distorted images. The self-supervised semantic feature extraction network learns through self-distillation and other methods, generating attention maps with strong viewpoint consistency. Even with drastic changes in shooting angle and lighting, its highly attentional regions (usually the semantic subjects of the image) remain stable. This embodiment completely abandons the traditional "localization-correction-decoding" paradigm. Instead, it uses the attention map generated by the self-supervised semantic feature extraction network (as a semantic prior) and the original distorted image as input to the decoder (e.g., concatenating them along the channel dimension). The decoder is guided (e.g., through attention mechanisms or direct feature fusion) to focus on semantically stable regions (i.e., spatial attention maps). The high-resolution regions in the image are used to decode the watermark information. The implicit assumption is that the watermark signal embedded in these semantic entities by the encoder is most likely to be preserved and recognized after distortion. The self-supervised semantic feature extraction network can adopt the desired network model as needed; for example, as an optional implementation, the DINOv2 model is used in this embodiment to extract the spatial attention map. Used as deep features. Distorted images The input is fed into a pre-trained, parameter-frozen DINOv2 model. The DINOv2 model learns its attention mechanism to focus on the truly semantically meaningful parts of the image through self-supervised learning (such as self-distillation). Its final self-attention map is extracted and processed into a single-channel spatial attention map. This spatial attention map This represents the semantically most salient and stable region in the image, unaffected by severe geometric distortion. This embodiment does not perform any geometric correction based on the four-corner coordinates. Instead, it compares the attention map A generated by DINOv2 with the distorted image. Concatenate along the channel dimension to form a four-channel tensor. This 4-channel tensor serves as the input to the decoder. It simultaneously provides the decoder with information about "what the image looks like" ( ) and "Where should we focus our attention?" (spatial attention map) The information is as follows. In this embodiment, the decoder D is a layered CNN network (e.g., composed of multiple ResBlock+CBAM modules stacked together). This network processes the input tensor fused with semantic prior IOR, progressively downsampling and extracting features. Attention modules such as CBAM can use the A channel of the input to dynamically adjust the spatial weights of subsequent feature maps. Finally, through a global average pooling layer, a fully connected layer (DenseLayer), and a sigmoid activation function, the L-bit recovery message probability is output. By using attention map A as input, the decoder network learns during training to utilize this "semantic guide" and automatically pay more attention to regions that retain more information after distortion (especially geometric distortion) (i.e., regions that the DINOv2 model considers important), thereby achieving robust decoding.

[0028] To ensure semantic consistency during the encoding process, this embodiment employs a loss function to guarantee that watermark embedding does not compromise the semantic consistency of the original image. This prevents the encoder from generating visual artifacts that could interfere with the understanding of the self-supervised semantic feature extraction network (DINOv2 model) in order to embed information. Specifically, the loss function in this embodiment includes image loss and message loss, which can be expressed as: ; in, To obtain the total loss, To balance the weights, For the loss of information, Image loss.

[0029] In this embodiment, the message loss includes the watermark information m of the training samples and the decoded watermark information. The loss between; as an optional implementation, in this embodiment, the watermark information m and the decoded watermark information The specific loss between them is the binary cross-entropy (BCE) loss. : ; in, For the sample size, For the watermark information m of sample i, Decoding watermark information for sample i .

[0030] To ensure invisibility, the image loss in this embodiment includes the original image I of the training samples and its watermark image. The pixel loss, structural similarity loss, and semantic loss between them are: ; ; ; in, It is a pixel-level L2 loss used to ensure that the absolute difference in pixel values ​​is small. For structural similarity loss, Structural similarity is used to ensure that the brightness, contrast, and structure of images are perceptually similar. For semantic loss, For cosine similarity, This is a self-supervised semantic feature extraction network. The computation is performed using a self-supervised semantic feature extraction network. Extract the original image I and its watermark image. Features and The cosine similarity between the watermarks ensures that the watermark does not alter the deep semantics of the image, which is crucial for the decoder to utilize self-supervised semantic feature extraction network guidance. Training employs a phased scheduling: the early stages (e.g., 0-5k steps) primarily optimize the message loss. First, ensure the network learns encoding and decoding; then, gradually introduce balancing weights in the mid-term (e.g., 5k-20k steps). A weaker noise layer balances invisibility; in later stages (>20k steps), the strength of the noise layer is gradually increased, forcing the network to learn robustness.

[0031] To verify the effectiveness of the image watermarking method based on self-supervised visual model-guided decoding in this embodiment, extensive experiments were conducted. The experiments primarily evaluated the method from two dimensions: invisibility (visual quality) and robustness (resistance to attacks), and verified the performance of each core module (semantic loss). The contributions of the distortion-guided heatmap (DGH) and the frequency enhancement module (FEM) are shown in Tables 1 to 7. The FEM is the functional module of step S303 above.

[0032] Table 1: Comparison of visual quality under different module configurations (ablation experiment)

[0033] Table 1 presents the results of the ablation experiments, comparing the results in removing semantic guidance. The visual quality of the image changes when the Distortion Guided Heatmap (DGH) or Frequency Enhancement Module (FEM) is removed. Data shows that the complete configuration in this embodiment achieves the best visual effect, with a peak signal-to-noise ratio (PSNR) of 38.8 dB and a structural similarity loss (SSIM) of 0.985. Removing the Distortion Guided Heatmap (DGH) has the greatest impact on visual quality, causing the PSNR to drop to 30.2 dB, demonstrating the importance of the collaborative work of each module in maintaining high image quality.

[0034] Table 2: Whether to use semantic loss removal Robustness comparison at different shooting distances

[0035] Table 2 analyzes semantic loss. The impact of different shooting distances (20cm to 60cm) on decoding accuracy. Results show that using semantic loss... It can significantly improve robustness, maintaining accuracy above 99.2% across all distances; without semantic loss. The accuracy fluctuated between 91.7% and 95.1%, indicating the effectiveness of semantic priors in resisting changes in distance.

[0036] Table 3: Whether semantic loss was used Robustness comparison under different shooting angles

[0037] Table 3 tests the anti-interference capability of the semantic guidance module at different shooting angles from 0° to 40°. The data highlights the key role of this module in dealing with perspective distortion: when shooting at a large angle of 40°, the accuracy rate drops sharply to 77.1% without using the module, while the accuracy rate remains at a high level of 97.6% after using it.

[0038] Table 4: Robustness comparison of DGH at different shooting distances with and without distortion-guided thermal imaging at different shooting distances

[0039] Table 4 compares the decoding performance of DGH with and without distortion guide at different shooting distances. The results show that the system is more stable after introducing distortion guide DGH, and the accuracy at all distances is improved to over 99.2%, which is better than the lowest performance of 95.1% without distortion guide DGH. This verifies that DGH can enhance the robustness of watermarks in both close-range and long-range shooting.

[0040] Table 5: Robustness comparison of different shooting angles with and without DGH

[0041] Table 5 evaluates the contribution of Distortion Guided Heatmap (DGH) in dealing with shooting angle variations from 0° to 40°. Experiments show that Distortion Guided Heatmap (DGH) helps maintain information integrity when the angle is tilted. The accuracy rate of the scheme using Distortion Guided Heatmap (DGH) at 40° is 97.6%, which is higher than the 96.8% without it, demonstrating its auxiliary defensive role under complex geometric distortions.

[0042] Table 6: Robustness comparison of FEM with and without frequency enhancement module at different shooting distances

[0043] Table 6 shows the robustness gain of the frequency enhancement module (FEM) at different shooting distances. The data shows that the FEM improves the system's performance at all distances, maintaining an accuracy of over 99%. Removing the FEM reduces the accuracy (down to a minimum of 97.7%), indicating that enhancing the high-frequency signal helps resist signal attenuation caused by shooting.

[0044] Table 7: Robustness comparison of FEM with and without frequency enhancement module at different shooting angles

[0045] Table 7 focuses on the performance of the frequency enhancement module (FEM) at different shooting angles. The results show that the frequency enhancement module is crucial for resisting large-angle perspective distortion. At a shooting angle of 40°, the accuracy drops to 87.7% without the frequency enhancement module, while the accuracy significantly recovers to 97.6% after using the frequency enhancement module.

[0046] Furthermore, this embodiment also provides an image watermarking system based on self-supervised visual model-guided decoding, including a microprocessor and a memory interconnected, wherein the microprocessor is programmed or configured to execute the image watermarking method based on self-supervised visual model-guided decoding. This embodiment also provides a computer-readable storage medium storing a computer program or instructions programmed or configured to execute the image watermarking method based on self-supervised visual model-guided decoding via a processor. This embodiment also provides a computer program product including a computer program or instructions programmed or configured to execute the image watermarking method based on self-supervised visual model-guided decoding via a processor.

[0047] Those skilled in the art will understand that the technical solutions provided by this invention may take the form of a method, system, or computer program product. Therefore, this invention may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this invention may take the form of a computer program product embodied on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, produce an implementation of the flowchart... Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0048] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principle of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. An image watermarking method based on self-supervised visual model-guided decoding, characterized in that, Includes the following steps: S101, obtain the watermark information m and the original image I of each data sample in the training dataset; S102, for each data sample, the watermark information m is preprocessed to generate a message tensor M, and the original image I is degraded and distorted to generate a distorted guided heatmap DGH, thus obtaining the preprocessed training dataset. S103, the self-supervised visual model is trained using the preprocessed training dataset. The self-supervised visual model includes an encoder, a printing noise layer, a decoder, and a pre-trained self-supervised semantic feature extraction network. The processing for each data sample in the self-supervised training includes: ① Encoding the message tensor M, the distortion guide heatmap DGH, and the original image I of the data sample using the encoder to obtain the corresponding watermark image. ② Use printing to capture the noise layer of the watermark image Degradation and distortion processing is performed to generate distorted images. ;Utilizing a pre-trained self-supervised semantic feature extraction network to extract watermark images Extracting spatial attention maps ③ Use a decoder to convert the distorted image Decode to generate watermark information ④ Optimize and update the model parameters of the self-supervised visual model according to a preset loss function, wherein the preset loss function includes the watermark information m of the training samples and the decoded watermark information. The loss between them is calculated; finally, a self-supervised visual model is obtained after training, which is used in the inference stage to encode the corresponding watermark image based on the input message tensor M, the distortion-guided heatmap DGH, and the original image I. .

2. The image watermarking method based on self-supervised visual model-guided decoding according to claim 1, characterized in that, In step S102, the preprocessing of the watermark information m to generate the message tensor M includes: mapping the watermark information m of length L bits to a high-dimensional vector through a fully connected layer and reshaping it into a spatial grid shape of a specified size, and then upsampling the reshaped features to the resolution size required by the encoder input as the generated message tensor M.

3. The image watermarking method based on self-supervised visual model-guided decoding according to claim 1, characterized in that, In step S102, generating a distorted guided heatmap DGH from the original image I includes: S201, the original image Degradation processing is performed to generate distorted images. ; S202, for the original image and distorted images Using horizontal gradient operators respectively With vertical gradient operator Convolution operation is performed to obtain the coordinates of each pixel in the original image I. Horizontal and vertical gradient responses at: ; ; ; ; in, and Original images Pixel coordinates The horizontal and vertical gradient responses at each pixel coordinate The horizontal and vertical gradient responses at the location; and Distorted images Pixel coordinates The horizontal and vertical gradient responses at each pixel coordinate The horizontal and vertical gradient responses at the location; S203, calculate the original image at the pixel level. and distorted images Differences in gradient response between them: ; in, Original image and distorted images pixel coordinates Difference in gradient response at location, The type or configuration of the gradient operator used in the convolution operation to calculate the difference in gradient responses; S204, the original image Divide into several window sets according to the preset window size. and for each window The gradient response differences within each window are statistically analyzed, and the average value of the pixel gradient response differences within each window is calculated: ; in, For the first The average value of pixel gradient response differences within a window. For the first The number of pixels within a window; S205, the average value of the pixel gradient response difference in each window is processed by spatial smoothing and normalization, so as to obtain the distortion guided heatmap DGH composed of the normalized processing results of each window.

4. The image watermarking method based on self-supervised visual model-guided decoding according to claim 3, characterized in that, In step S205, the function expression for the normalization process is: ; in, For the first The normalization result of each window. The constant coefficients, For the first Pixels within a window Gradient response differences The average value is obtained by spatial smoothing.

5. The image watermarking method based on self-supervised visual model-guided decoding according to claim 1, characterized in that, The encoder is used to encode the message tensor M, the distorted guided heatmap DGH, and the original image I of the data sample to obtain the corresponding watermark image. include: S301, concatenate the message tensor M, the distortion-guided heatmap DGH and the original image I in the channel dimension into an input tensor; S302, perform a two-dimensional Fourier transform on the input tensor to obtain the frequency features; S303 multiplies the frequency characteristic by the gain To enhance high-frequency components, among which These are the weighting coefficients. For smooth gated functions, The radial frequency is the frequency magnitude in the two-dimensional frequency domain, extending from the center of the spectrum outwards along the radial direction. S304, perform a two-dimensional inverse Fourier transform on the frequency characteristics after enhancing the high-frequency components to obtain the frequency-enhanced tensor. S305, calculate the difference between the input tensor and the frequency-enhanced tensor; use the difference to obtain the residual perturbation of the original image I using a pre-trained U-Net or ResNet network; S306, the residual perturbation is fused with the original image I according to the following formula to obtain the watermark image corresponding to the original image I: ; in, This is the watermark image corresponding to the original image I. To integrate weights, It is the hyperbolic tangent function. This is the residual disturbance.

6. The image watermarking method based on self-supervised visual model-guided decoding according to claim 1, characterized in that, The preset loss function includes image loss and message loss, whereby the message loss includes the watermark information m of the training samples and the decoded watermark information. The loss between the training samples; the image loss includes the original image I and its watermark image. The pixel loss, structural similarity loss, and semantic loss are partially or fully included.

7. The image watermarking method based on self-supervised visual model-guided decoding according to claim 6, characterized in that, The degradation distortion processing includes randomly performing some or all of the following: perspective distortion, lighting distortion, moiré simulation, motion or Gaussian blur, Gaussian noise, and JPEG compression.

8. An image watermarking system based on self-supervised visual model-guided decoding, comprising a microprocessor and a memory interconnected, characterized in that, The microprocessor is programmed or configured to execute the image watermarking method based on self-supervised visual model guided decoding as described in any one of claims 1 to 7.

9. A computer-readable storage medium storing a computer program or instructions, characterized in that, The computer program or instructions are programmed or configured to execute, via a processor, the image watermarking method based on self-supervised visual model guided decoding as described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program or instructions, characterized in that, The computer program or instructions are programmed or configured to execute, via a processor, the image watermarking method based on self-supervised visual model guided decoding as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Watermark imperceptible embedding and recovering method based on deep learning network structure

    CN120543356A

  • Data processing method and device based on cross-domain feature alignment, equipment and medium

    CN120543992A

  • Diffusion model robust watermarking method based on affine coupling flow accurate coding

    CN120746810A

  • Source tracking and forgery detection method and system based on face semantic mask

    CN120783196A

  • Electronic watermark device and method

    JP2018182471A

Cited By

  • Cross-medium physical image watermarking method and system based on micro-physical simulation

    CN121746153A