Dynamic sparse large capacity robust watermarking method based on CSPNet

CN117237175BActive Publication Date: 2026-09-22NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311231864.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-22
Publication Date
2026-09-22
Estimated Expiration
2043-09-22

AI Technical Summary

Technical Problem

然而,对于动态的医学图像数据,如连续的CT扫描序列或视频图像,传统水印技术容量有限,无法满足大容量数据的需求

Benefits of technology

[0014]本发明设计了基于CSPNet的动态稀疏大容量鲁棒水印方法,该方法能够保证使包含水印的医学图像拥有很高的不可见性的同时,可以在载体图像中嵌入大容量水印,主要贡献有:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117237175B_ABST
    Figure CN117237175B_ABST
Patent Text Reader

Abstract

The application discloses a dynamic sparse large-capacity robust watermarking method based on CSPNet, which comprises the following steps: separating a watermark image into a watermark approximate image and a watermark detail image; inputting the watermark approximate image and a carrier image into an encoder to generate a carrier-carrying image, calculating the loss of the carrier image and the carrier-carrying image, and updating the parameters of the encoder; inputting the carrier-carrying image and the carrier image into a discriminator to determine whether the carrier-carrying image is an image containing a watermark; inputting the carrier-carrying image added with noise into a decoder to obtain a carrier-decoding image and a watermark approximate decoding image; obtaining a watermark decoding image through inverse discrete wavelet transform; calculating a loss function according to the carrier image and the carrier-decoding image and the watermark image and the watermark decoding image, and updating the parameters; the method combines the CSPNet network architecture and the dynamic sparse convolution technology, realizes efficient embedding of a large-capacity watermark in an image, maintains the robustness of the watermark, and thus ensures the copyright protection and data security of the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information hiding, specifically to a dynamic sparse large-capacity robust watermarking method based on CSPNet. Background Technology

[0002] With the widespread application of digital medical images and the popularization of network transmission, the issues of copyright protection and data security for medical images have become increasingly prominent. Unauthorized copying, alteration, and misappropriation of medical images may pose risks to medical data security. Therefore, developing an efficient and robust medical image watermarking technology for tracing the source of images and protecting copyright is of great significance in the field of information hiding.

[0003] In recent years, deep learning technology has made tremendous progress in the field of computer vision, especially in image recognition tasks. CSPNet (Cross Stage Partial Network) is an effective network architecture that improves the learning ability of convolutional neural networks (CNNs) through a cross-stage information flow mechanism. CSPNet performs exceptionally well in image recognition, providing new insights for research in medical image processing and watermarking technologies.

[0004] Traditional digital watermarking techniques can embed identification information into medical images to protect copyright and trace image origins. However, for dynamic medical image data, such as continuous CT scan sequences or video images, traditional watermarking techniques have limited capacity and cannot meet the needs of large-capacity data. Moreover, watermark robustness is a significant challenge; the embedded watermark needs to remain stable during image transmission, compression, and processing to prevent loss or tampering. Therefore, dynamic sparse high-capacity robust watermarking technology for medical images based on CSPNet has emerged as a potential solution to these problems. First, CSPNet's cross-stage information flow mechanism allows network layers at different stages to effectively exchange information, which helps capture complex features in medical images. Second, dynamic sparse convolution technology can reduce computational load during image convolution, improving the efficiency of watermark embedding. By combining these two techniques, high-capacity watermarks can be embedded in medical images to meet the needs of data traceability and copyright authentication.

[0005] In conclusion, the CSPNet-based dynamic sparse high-capacity robust watermarking technology for medical images has significant research value and practical application prospects. By combining the CSPNet network architecture with dynamic sparse convolution techniques, efficient embedding of high-capacity watermarks can be achieved in medical images while maintaining the robustness of the watermarks, thereby ensuring copyright protection and data security of medical images. Summary of the Invention

[0006] The purpose of this invention is to provide a dynamic sparse, large-capacity robust watermarking method based on CSPNet. For the watermarked image, the following steps S1-S6 are performed to construct and train a dynamic sparse, large-capacity robust watermarking model, completing the embedding and extraction of the watermarked image:

[0007] Step S1: Separate the watermark approximation image and the watermark detail image from the original watermark using discrete wavelet transform;

[0008] Step S2: Input the watermark approximation image and the carrier image into the CSPNet-based dynamic sparse convolutional neural network encoder to generate the carrier image, calculate the MSE loss of the carrier image and the carrier image, and update the encoder parameters using the stochastic gradient descent method.

[0009] Step S3: Input the cryptic image and the carrier image into the discriminator to determine whether it is a cryptic image. If it is, calculate the SSIM loss of both and update the encoder parameters using stochastic gradient descent. Otherwise, proceed to the next step.

[0010] Step S4: Input the encrypted image into the noise layer, randomly add noise to the encrypted image, and obtain the encrypted image after the attack.

[0011] Step S5: Input the attacked encrypted image into the decoder to obtain the decoded carrier image and the decoded watermark approximation image. The decoded watermark approximation image and the watermark detail image are subjected to inverse discrete wavelet transform to obtain the decoded watermark. The SSIM loss is calculated based on the carrier image and the decoded carrier image, as well as the original watermark and the decoded watermark. The noise layer and decoder parameters are updated using the stochastic gradient descent method.

[0012] Step S6: Determine whether the model has achieved the expected results. If so, retain the model parameter settings for watermark embedding and extraction. Otherwise, return to step S1 to continue training until a well-trained dynamic sparse large-capacity robust watermarking model is obtained and applied to the embedding and extraction of watermarked images.

[0013] Beneficial effects: Compared with the prior art, the advantages of the present invention include:

[0014] This invention designs a dynamic sparse large-capacity robust watermarking method based on CSPNet. This method can ensure high invisibility of the watermarked medical image while embedding a large-capacity watermark in the carrier image. The main contributions are:

[0015] 1. A novel framework for embedding watermarks is proposed, which enables the embedding of large-capacity watermarks in carrier images;

[0016] 2. A dynamic sparse large-kernel neural network architecture based on CSPNet is proposed. CSPNet can integrate gradient changes from beginning to end into the feature map, thereby reducing the number of model parameters and FLOPS. Dynamic sparsity expands the kernel convolution to a size of 51×51, obtaining a larger receptive field and extracting richer features. Attached Figure Description

[0017] Figure 1 This is a flowchart of a dynamic sparse large-capacity robust watermarking method based on CSPNet provided in an embodiment of the present invention;

[0018] Figure 2 This is a flowchart of a watermark encoder provided according to an embodiment of the present invention. Detailed Implementation

[0019] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.

[0020] Reference Figure 1 The CSPNet-based dynamic sparse large-capacity robust watermarking method provided in this embodiment of the invention performs the following steps S1-S6 on the watermark image to construct and train a dynamic sparse large-capacity robust watermarking model, thereby completing the embedding and extraction of the watermark image:

[0021] Step S1: Separate the watermark image from the watermark approximation image and the watermark detail image using discrete wavelet transform;

[0022] The watermark image is distinguished from the watermark approximation image and the watermark detail image by wavelet coefficients. The discrete wavelet transform with Daubechies-2 basis function is used, expressed as follows:

[0023] DWT(W) = W ac W dc

[0024] Where DWT() represents the discrete wavelet transform, W is the watermark image, and W ac For a watermark-like image, W dc This is a watermark detail image.

[0025] Step S2: Input the watermark approximation image and the carrier image into the CSPNet-based dynamic sparse convolutional neural network encoder to generate the carrier image, calculate the MSE loss of the carrier image and the carrier image, and update the encoder parameters using the stochastic gradient descent method.

[0026] Reference Figure 2 The watermark approximates the image W acThe image I is input into a CSPNet-based dynamic sparse convolutional neural network encoder along with the carrier image I. First, feature extraction is performed through convolutional blocks to generate a watermark mask. This watermark mask is then added to the carrier image I to generate a watermark-covered image IW. The mean squared error (MSE) loss between the watermark-covered image IW and the carrier image I is calculated. The encoder parameters are then updated using stochastic gradient descent. This process is expressed as follows:

[0027] MASK = EnCNN(I,W) ac )

[0028] IW = α * MASK + I

[0029] LossI = (I, IW)

[0030] Where EnCNN() represents the CSPNet dynamic sparse convolutional neural network encoder, α represents the embedding weight, and LossI represents the mean square error loss between the carrier image IW and the carrier image I.

[0031] Step S3: Input the cryptic image and the carrier image into the discriminator to determine whether it is a cryptic image. If it is, calculate the SSIM loss of both and update the encoder parameters using stochastic gradient descent. Otherwise, proceed to the next step.

[0032] In step S3, the encrypted image IW and the carrier image I are input into the discriminator. The discriminator consists of an input part, a binary classifier, and an output part. The binary classifier uses the sigmoid function to determine whether the encrypted image IW contains a watermark. When the output of the sigmoid function is greater than 0.5, it is determined to be a watermarked image; otherwise, it is determined to be a watermark-free image.

[0033] The structural similarity (SSIM) loss between the watermarked image IW and the carrier image I is calculated, and the encoder parameters are updated using stochastic gradient descent until the discriminator can no longer detect the watermark in the watermarked image IW. This process is expressed as follows:

[0034] LossD = (IW, I)

[0035] Here, LossD represents the structural similarity loss between the dense image IW and the carrier image I.

[0036] Step S4: Input the encrypted image into the noise layer, randomly add noise to the encrypted image, and obtain the encrypted image after the attack.

[0037] The encrypted image IW is input into a noise layer. The noise types in the noise layer include Gaussian noise, cropping, rotation, analog differentiable JPEG compression, and scaling. Each time, a type of noise is randomly selected and added to the encrypted image IW to generate the attacked encrypted image IW′. This process is expressed as the following formula:

[0038] IW′=Random((Gn,Crop,Rotation,Microj,Resize),IW)

[0039] In this context, Random() represents randomly selecting a type of noise to add to the image IW, Gn represents Gaussian noise, Crop represents cropping, Rotation represents rotation, Microj represents analog differentiable JPEG compression, and Resize represents scaling.

[0040] Step S5: Input the attacked encrypted image into the decoder to obtain the decoded carrier image and the decoded watermark approximation image. The decoded watermark approximation image and the watermark detail image are subjected to inverse discrete wavelet transform to obtain the decoded watermark. The SSIM loss is calculated based on the carrier image and the decoded carrier image, as well as the original watermark and the decoded watermark. The noise layer and decoder parameters are updated using the stochastic gradient descent method.

[0041] The compromised encrypted image IW′ is input into the decoder. After processing by the decoder, the decoded carrier image I′ and the decoded watermark approximation image W are obtained. a ′ c The decoded watermark approximate image W a ′ c With watermark detail image W dc The decoded watermark W′ is obtained after inverse discrete wavelet transform. The structural similarity loss between the carrier image I and the decoded carrier image I′, and between the original watermark W and the decoded watermark W′, is calculated respectively. The parameters of the noise layer and the decoder are updated using stochastic gradient descent. This process is expressed as follows:

[0042] De(IW′)=I′+W ac ′

[0043] W′=IDWT(W ac ′+W dc )

[0044] LossC=(I,I′)

[0045] LossW=(W,W′)

[0046] Where De() represents the result after decoder processing, IDWT() represents the inverse discrete wavelet transform, and LossC and LossW represent the structural similarity loss between carrier image I and carrier decoded image I′, and between watermark image W and watermark decoded image W, respectively.

[0047] Step S6: Based on the encoder, discriminator, noise layer, and decoder described in steps S2-S5, construct a dynamic sparse large-capacity robust watermarking model, and repeat steps S1-S5 to train the dynamic sparse large-capacity robust watermarking model. Determine whether the dynamic sparse large-capacity robust watermarking model achieves the expected effect. If so, retain the model parameter settings for watermark embedding and extraction; otherwise, return to step S1 to continue training until a trained dynamic sparse large-capacity robust watermarking model is obtained and applied to watermark image embedding and extraction.

[0048] In step S6, steps S1-S5 are repeated to train the dynamic sparse large-capacity robust watermarking model and determine whether the model achieves the expected results. If the model does not achieve the expected results, steps S1-S5 are repeated. If the expected results are achieved, all model parameters are retained. When applying the dynamic sparse large-capacity robust watermarking model, the watermark is embedded into the carrier image through the encoder to generate an encoded image. The encoded image is published for use. When copyright verification is required, the image to be verified is input into the decoder, and the extracted watermark is output. If the bit error rate between the extracted watermark and the original watermark is less than a preset threshold, then copyright ownership is proven.

[0049] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.

Claims

1. A dynamic sparse large-capacity robust watermarking method based on CSPNet, characterized in that, For the watermarked image, perform the following steps S1-S6 to construct and train a dynamic, sparse, high-capacity robust watermarking model to complete the embedding and extraction of the watermarked image: Step S1: Separate the watermark approximation image and the watermark detail image from the original watermark using discrete wavelet transform; Step S2: Input the watermark approximation image and the carrier image into the CSPNet-based dynamic sparse convolutional neural network encoder to generate the carrier image, calculate the MSE loss of the carrier image and the carrier image, and update the encoder parameters using the stochastic gradient descent method. In step S2, the watermark approximation image is... Together with the carrier image I, the image is input into a CSPNet-based dynamic sparse convolutional neural network encoder. First, features are extracted through convolutional blocks to generate a watermark mask. Watermark mask The encrypted image IW is generated by adding the encrypted image IW to the carrier image I. The MSE loss between the encrypted image IW and the carrier image I is calculated. The encoder parameters are updated using stochastic gradient descent. This process is expressed as follows: ; ; ; in, This represents the CSPNet dynamic sparse convolutional neural network encoder. Represents embedding weights. This represents the mean square error loss between the encrypted image IW and the carrier image I; Step S3: Input the cryptic image and the carrier image into the discriminator to determine whether it is a cryptic image. If it is, calculate the SSIM loss of both and update the encoder parameters using stochastic gradient descent. Otherwise, proceed to the next step. In step S3, the encrypted image IW and the carrier image I are input into the discriminator. The discriminator consists of an input part, a binary classifier, and an output part. The binary classifier uses the sigmoid function to determine whether the encrypted image IW contains a watermark. When the output of the sigmoid function is greater than 0.5, it is determined to be a watermarked image; otherwise, it is determined to be a watermark-free image. The SSIM loss of the carrier image IW and the watermark image I is calculated, and the encoder parameters are updated using the stochastic gradient descent method until the discriminator can no longer detect the watermark in the carrier image IW. This process is expressed as follows: ; Where LossD represents the structural similarity loss between the carrier image IW and the underlying image I; Step S4: Input the encrypted image into the noise layer, randomly add noise to the encrypted image, and obtain the encrypted image after the attack. Step S5: Input the attacked encrypted image into the decoder to obtain the decoded carrier image and the decoded watermark approximation image. The decoded watermark approximation image and the watermark detail image are subjected to inverse discrete wavelet transform to obtain the decoded watermark. The SSIM loss is calculated based on the carrier image and the decoded carrier image, as well as the original watermark and the decoded watermark. The noise layer and decoder parameters are updated using the stochastic gradient descent method. Step S6: Determine whether the model has achieved the expected results. If so, retain the model parameter settings for watermark embedding and extraction. Otherwise, return to step S1 to continue training until a well-trained dynamic sparse large-capacity robust watermarking model is obtained and applied to the embedding and extraction of watermarked images.

2. The dynamic sparse large-capacity robust watermarking method based on CSPNet according to claim 1, characterized in that, In step S1, the original watermark is separated into an approximate watermark image and a detailed watermark image through discrete wavelet transform, as expressed in the following formula: ; in, This indicates that the image has undergone discrete wavelet transform, and W represents the watermark image. For watermark-like images, This is a watermark detail image.

3. The dynamic sparse large-capacity robust watermarking method based on CSPNet according to claim 1, characterized in that, In step S4, the encrypted image IW is input into the noise layer. The noise types in the noise layer include Gaussian noise, cropping, rotation, analog differentiable JPEG compression, and scaling. Each time, a type of noise is randomly selected and added to the encrypted image IW to generate the compromised encrypted image. The process can be expressed as follows: ; in, This indicates that a type of noise is randomly selected and added to the image IW. Indicates Gaussian noise. Indicates cutting. This indicates analog differentiable JPEG compression. This indicates scaling.

4. The dynamic sparse large-capacity robust watermarking method based on CSPNet according to claim 1, characterized in that, In step S5, the encrypted image after the attack will be... The input is processed by the decoder to obtain the decoded carrier image. Similar image to the decoded watermark Decode the watermark approximate image With watermark detail image The decoded watermark is obtained after inverse discrete wavelet transform. Calculate the carrier image I and the decoded carrier image respectively. And the original watermark W and the decoded watermark The SSIM loss between the two layers is used to update the parameters of the noise layer and the decoder using stochastic gradient descent. This process is expressed as follows: ; ; ; ; in, This indicates that it has been processed by the decoder. Represents the inverse discrete wavelet transform. , Representing carrier image I and decoded carrier image respectively And the original watermark W and the decoded watermark The structural similarity loss between them.

5. The dynamic sparse large-capacity robust watermarking method based on CSPNet according to claim 1, characterized in that, In step S6, steps S1-S5 are repeated to train the dynamic sparse large-capacity robust watermarking model and determine whether the model achieves the expected results. If the model does not achieve the expected results, steps S1-S5 are repeated. If the expected results are achieved, all model parameters are retained. When applying the dynamic sparse large-capacity robust watermarking model, the watermark is embedded into the carrier image through the encoder to generate an encoded image. The encoded image is published for use. When copyright verification is required, the image to be verified is input into the decoder, and the extracted watermark is output. If the bit error rate between the extracted watermark and the original watermark is less than a preset threshold, then copyright ownership is proven.