Zero watermark generation and detection method for medical images based on feature fusion

By constructing a convolutional neural network with a channel number of 512 for feature fusion and using the ResNet18 detector, the problems of information loss and detection failure of medical image zero watermark under complex attacks are solved, and high-quality zero watermark generation and detection are achieved.

CN116091287BActive Publication Date: 2025-09-05XIDIAN UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202211542155.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-02
Publication Date
2025-09-05
Estimated Expiration
2042-12-02

AI Technical Summary

Technical Problem

Existing medical image zero-watermarking technology is prone to losing feature information when facing complex attacks, resulting in poor quality of the generated zero-watermark and detection failure. The XOR operation is prone to misalignment and has low fault tolerance.

Method used

A convolutional neural network with 512 channels is constructed for feature fusion to generate medical image style features and watermark image content features. The classic residual network ResNet18 is used as a detector for parallel information processing to ensure that information is not misaligned.

Benefits of technology

The zero-watermark image's ability to resist attacks and detection success rate are improved, the characteristic information of the medical image is fully retained, information loss is reduced, and the detection accuracy is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116091287B_ABST
    Figure CN116091287B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for generating and detecting zero watermarks for medical images based on feature fusion. The specific steps of the zero watermark generation method of the invention include: constructing a convolutional neural network with 512 channels, generating two training sets of the network, training the convolutional neural network, and obtaining a zero watermark image. The specific steps of the zero watermark detection method include: generating a detection training set, training a detector, and detecting watermark information. The present invention solves the problem that the existing technology cannot fully retain the position information features of medical images, there is feature loss, and the watermark information cannot be correctly detected when generating zero watermark images. The present invention allows for more comprehensive extraction of medical image features, reduces the probability of zero watermark information loss, has the advantages of strong attack resistance and clear watermark detection capabilities of generated zero watermarks, and can be applied to copyright protection of medical images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image signal processing and, more specifically, to a method for generating and detecting medical image zero-watermarks based on feature fusion in the field of medical image information security. This method fuses the features of a medical image and a watermarked image to generate a zero-watermarked image. In the event of a copyright dispute, a trained detector can be used to detect the watermark information in the zero-watermarked image, verifying the copyright ownership of the medical image and thus protecting the copyright of the medical image without loss of quality. Background Art

[0002] Medical image zero-watermarking technology generates a medical image zero-watermark by extracting features from medical images, without embedding watermarks within the image. When the copyright of a medical image needs to be verified, the identity of the copyright holder can be verified by detecting the watermark information within the zero-watermark, thereby losslessly protecting the image. However, in real-world scenarios, complex and diverse attacks, such as rotation and cropping attacks, can significantly alter or eliminate image features, leading to loss of image feature information. This degrades the quality of the generated zero-watermark, reduces its attack resistance, and renders the watermark information undetectable. Furthermore, the XOR method used in zero-watermark generation and detection is also vulnerable to attack and has a low fault tolerance, which can easily lead to failure in zero-watermark generation and detection.

[0003] Qilu University of Technology disclosed a method for generating and detecting zero watermarks for medical images in its patent application “Color Medical Image Zero Watermark Construction Method, System and Detection Method and System” (Application Number: CN201910583272.1, Application Publication Number: CN110570342A). The method first calculates the QPHFM moment of the medical image, constructs a feature vector using a low-order QPHFM moment, scrambles the watermark image using a cosine map, and performs an XOR operation on the binarized feature vector and the scrambled watermark image to obtain a zero watermark image. In the detection stage, the medical image is XORed with the corresponding zero watermark image to obtain the watermark information. The QPHFM moment used in this method is a quaternion polar harmonic orthogonal moment with excellent rotation invariance and scaling invariance, so that the generated zero watermark can resist rotation attacks and scaling attacks well. However, this method still has the following shortcomings: since this method uses XOR operation in both zero watermark generation and detection, the binary XOR operation is prone to misalignment when used, resulting in loss of zero watermark information, resulting in failure to generate zero watermark images and inability to detect watermark information in zero watermarks.

[0004] Yueh-Peng Chen et al. proposed a medical image zero watermarking method based on the deep network model WMNet in their published paper "WMNet: A Lossless Watermarking Technique Using Deep Learning for Medical Image Authentication" (Electronics, 2021, 10(8):932). This method uses frequency domain transform DWT transform and DCT transform to extract medical image features, obtains the medical image feature matrix, and associates the medical image feature matrix with the watermark matrix to generate zero watermarks. Before zero watermark detection, the zero watermarks in the training data set are divided into two categories, and WMNet is used to learn and detect the watermark information contained in the zero watermark image, thereby assisting the copyright verification process. In this method, even if the extracted watermark information is incomplete, the copyright information contained in the watermark information can still be objectively and accurately interpreted through the learning of WMNet. However, this method still has some shortcomings: the DWT transform and DCT transform used do not pay attention to the location information of the features, the medical image features obtained by the transformation cannot fully retain the location information of the image, and there is loss of feature information, resulting in poor quality of the generated zero watermark, reduced ability to resist attacks, and failure to detect watermark information. Summary of the Invention

[0005] The purpose of the present invention is to address the shortcomings of the above-mentioned existing technologies and provide a medical image zero watermark generation and detection method based on feature fusion, aiming to solve the problems existing in medical image zero watermarks, such as loss of zero watermark information, loss of image feature position information, inability of the generated zero watermark to resist attacks, and failure to detect watermark information.

[0006] The idea for achieving the purpose of the present invention is as follows: In the zero-watermark generation method, the present invention constructs a convolutional neural network with 512 channels, uses the trained convolutional neural network to obtain the 512-channel style features of the medical image, and fuses the style features with the content features of the watermark image. The style features retain the shape, color, and position information of the medical image, and fully retain the image feature information, thereby avoiding the possibility of image feature position information loss in the prior art and improving the ability of the zero-watermark image to resist attacks. In the zero-watermark detection method, the present invention trains the classic residual network ResNet18 as a detector, directly cascades the medical image and the zero-watermark image into the detector, and inputs the image information in parallel. The residual network fully learns the zero-watermark information, ensuring that the information is not misaligned and the zero-watermark information is intact and not lost, thereby improving the success rate of the final detection of the watermark information in the zero-watermark.

[0007] The specific steps of the zero watermark generation method of the present invention are as follows:

[0008] Step 1: Build a convolutional neural network with 512 channels:

[0009] Step 1.1, build a convolutional neural network with 16 convolutional layers. Its structure is as follows: first convolutional layer, second convolutional layer, first pooling layer, third convolutional layer, fourth convolutional layer, second pooling layer, fifth convolutional layer, sixth convolutional layer, seventh convolutional layer, eighth convolutional layer, third pooling layer, ninth convolutional layer, tenth convolutional layer, eleventh convolutional layer, twelfth convolutional layer, fourth pooling layer, thirteenth convolutional layer, fourteenth convolutional layer, fifteenth convolutional layer, sixteenth convolutional layer, fifth pooling layer, activation function layer;

[0010] Step 1.2: Set the convolutional neural network parameters. Set the number of channels of the first to second convolutional layers to 64, the number of channels of the third to fourth convolutional layers to 128, the number of channels of the fifth to eighth convolutional layers to 256, and the number of channels of the ninth to sixteenth convolutional layers to 512. Set the size of the convolution kernel to 3×3, the convolution step to 1, and the convolution kernel padding to 1. Use the maximum pooling method for the first to fifth pooling layers, set the size of the pooling area kernel to 2×2, and the step to 2. Use the Softmax function to implement the activation function layer.

[0011] Step 2: Generate two training sets for the network:

[0012] Step 2.1: P medical images and R watermark images are combined into a sample set, where P ≥ 10, R ≥ 4, and the length, width, and number of channels of each image are 256 × 256 × 3;

[0013] Step 2.2: Perform six attack methods on each medical image in the sample set to obtain all the attacked medical images.

[0014] Step 2.3: The medical images in the sample set and all the attacked medical images are combined into a training set;

[0015] Step 2.4, the watermark images in the sample set are combined into a watermark image training set;

[0016] Step 3: Train the convolutional neural network:

[0017] Step 3.1: Take an unselected medical image from the medical image training set and input it into the convolutional neural network. Calculate the style features of the current medical image, that is, the sum of the inner products of the activation responses of the medical image in the first convolutional layer, the third convolutional layer, the fifth convolutional layer, the ninth convolutional layer, and the thirteenth convolutional layer.

[0018] Step 3.2: Take an unselected watermark image from the watermark image training set and input it into the convolutional neural network to calculate the content features of the current watermark image, that is, the sum of the activation responses of the watermark image in the fourteenth convolutional layer;

[0019] Step 3.3: Concatenate the selected medical image and the watermark image to generate a cascade image, which is then fed into a convolutional neural network. During each iterative training, the network updates the style and content features of the cascade image. The mean square error loss between the updated style features and the style features obtained from the selected medical image is used as the style feature loss function. The mean square error loss between the updated content features and the content features obtained from the selected watermark image is used as the content feature loss function. The convolutional neural network parameters are updated using the Adam algorithm until both loss functions converge, completing the feature fusion of the medical image style features and the watermark image content features.

[0020] Step 3.4: Repeat steps 3.1 to 3.3 until all images in the medical image training set and the watermark image training set are traversed to obtain a trained convolutional neural network.

[0021] Step 4: Generate zero-watermark image:

[0022] Step 4.1: Use the cv.resize function to adjust the size of the medical image to be generated with zero watermark and the corresponding watermark image, and adjust the length, width, and channel size of the two images to 256×256×3;

[0023] Step 4.2, concatenating the resized medical image and the watermark image to generate a cascade image;

[0024] In step 4.3, the cascade image is input into the trained neural network, and the zero-watermark image is output as a fusion of the style features of the medical image and the content features of the watermark image.

[0025] The specific steps of the method for detecting zero watermark in a feature-fused medical image of the present invention are as follows:

[0026] Step 1: Generate a detection training set:

[0027] Step 1.1: Select at least 1000 medical images to form a sample set. Use the feature fusion-based medical image zero-watermark generation method to use the OASIS logo image as the watermark image and generate a corresponding zero-watermark image for each medical image in the sample set.

[0028] Step 1.2, concatenate each medical image in the sample set with the zero-watermark image corresponding to the medical image, and form the detection training set with all the concatenated images;

[0029] Step 2, train the detector:

[0030] Step 2.1, use the classic residual network ResNet18 as the detector;

[0031] Step 2.2: Input the detection training set into the detector and train the detector. Use the Adam algorithm to iteratively update the network parameters until the network loss function converges. Output the medical image style features in the zero-watermarked image to obtain the trained detector.

[0032] Step 3: Detect watermark information:

[0033] The medical image and the corresponding zero-watermark image are cascaded to obtain a cascade image, and the cascade image is input into a trained detector to output the watermark information corresponding to the medical image.

[0034] Compared with the prior art, the present invention has the following advantages:

[0035] First, since the zero watermark generation method of the present invention builds a training convolutional neural network with a feature channel number of 512, the style features composed of 512 different features are obtained, and the medical image style features are fused with the watermark image content features, which overcomes the shortcomings of the existing technology that cannot fully retain the feature position information of the medical image and there is a large amount of feature information loss. The present invention can extract the feature information of the medical image more comprehensively and fully, reduce the possibility of losing the feature position information of the medical image, ensure the quality of the generated zero watermark image, and thus improve the ability of the generated zero watermark image to resist attacks.

[0036] Second, since the zero watermark detection method of the present invention uses a trained ResNet18 network as a detector to detect the watermark information in the zero watermark, performs parallel operations on the medical image information, and utilizes the residual network to fully learn the information in the zero watermark, it overcomes the information dislocation and zero watermark information loss defects caused by the prior art, reduces the possibility of zero watermark information loss, and enables the present invention to improve the success rate of the final zero watermark generation and the success rate of detecting the watermark information in the zero watermark. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 Flowchart of the zero watermark generation method of the present invention;

[0038] Figure 2 A structural diagram of the convolutional neural network constructed for the present invention;

[0039] Figure 3 A flowchart of training a convolutional neural network according to the present invention;

[0040] Figure 4 Flowchart of the zero watermark detection method of the present invention. DETAILED DESCRIPTION

[0041] The present invention will be described in detail below with reference to the accompanying drawings and embodiments.

[0042] Reference Figure 1 , the specific steps of the embodiment of the zero watermark generation method of the present invention are further described in detail.

[0043] Step 1: Build a convolutional neural network with 512 channels.

[0044] Reference Figure 2 , the structure of a convolutional neural network with 512 channels constructed by the present invention is further described in detail.

[0045] Build a convolutional neural network with sixteen convolutional layers. Its structure is as follows: first convolutional layer, second convolutional layer, first pooling layer, third convolutional layer, fourth convolutional layer, second pooling layer, fifth convolutional layer, sixth convolutional layer, seventh convolutional layer, eighth convolutional layer, third pooling layer, ninth convolutional layer, tenth convolutional layer, eleventh convolutional layer, twelfth convolutional layer, fourth pooling layer, thirteenth convolutional layer, fourteenth convolutional layer, fifteenth convolutional layer, sixteenth convolutional layer, fifth pooling layer, activation function layer.

[0046] The convolutional neural network parameters are set, and the number of channels of the first to second convolutional layers is set to 64, the number of channels of the third to fourth convolutional layers is set to 128, the number of channels of the fifth to eighth convolutional layers is set to 256, and the number of channels of the ninth to sixteenth convolutional layers is set to 512. The size of the convolution kernel is set to 3×3, the convolution step is set to 1, and the convolution kernel padding is set to 1. Using a convolutional layer with a channel number of 512, 512 different image features of the network input image can be obtained, fully retaining the feature information including image position, color, shape and contour, so that the zero-watermark image generated later has better quality and resists image attacks.

[0047] The first to fifth pooling layers all use the maximum pooling method, the size of the pooling area kernel is set to 2×2, and the step size is set to 2.

[0048] The activation function layer is implemented using the Softmax function.

[0049] Step 2: Generate two training sets for the network.

[0050] In the first step, P medical images and R watermark images are combined into a sample set, where P ≥ 10, R ≥ 4, and the length, width, and number of channels of each image are 256 × 256 × 3.

[0051] In the second step, each medical image in the sample set is subjected to six attack methods to obtain all the medical images after the attack.

[0052] The six specific attack methods are as follows: the first attack method is to perform a rotation attack on each medical image in the sample set with a rotation degree of 1° to 144°, and obtain at least 100 images of the image after the rotation attack; the second attack method is to perform a cropping attack on each medical image with a cropping area of ​​0.01% to 40% of the image, and obtain at least 100 images of the image after the cropping attack; the third attack method is to perform a compression attack on each medical image with a compression factor of 0.01% to 40%, and obtain at least 100 compressed images of the image. The fourth attack method is to perform a noise attack with a noise coefficient of 0.01% to 40% on each medical image, and obtain at least 100 noise-attacked images of the image; the fifth attack method is to perform a scale scaling attack with a scaling degree of 0.01% to 40% on each medical image, and obtain at least 100 scale-attacked images of the image; the sixth attack method is to perform a filtering attack with a filtering range of 0.01% to 40% on each medical image, and obtain at least 100 filtered-attack images of the image.

[0053] Medical images formed after a large number of attacks can help the network learn the characteristic information of the destroyed images during the subsequent network training process. In this way, the trained convolutional neural network can minimize the impact of attacks on the destruction of image characteristic information, making the generated zero-watermark images resistant to attacks.

[0054] In the third step, the medical images in the sample set and all the medical images after the attack are combined into a training set.

[0055] The fourth step is to combine the watermark images in the sample set into a watermark image training set.

[0056] Step 3: Train the convolutional neural network.

[0057] Reference Figure 3 , further describing the process of training the convolutional neural network of the present invention.

[0058] In the first step, an unselected medical image is taken from the medical image training set and input into the convolutional neural network to calculate the style features of the current medical image, that is, the sum of the inner products of the activation responses of the medical image in the first convolutional layer, the third convolutional layer, the fifth convolutional layer, the ninth convolutional layer, and the thirteenth convolutional layer.

[0059] In the second step, an unselected watermark image is taken from the watermark image training set and input into the convolutional neural network to calculate the content features of the current watermark image, that is, the sum of the activation responses of the watermark image in the fourteenth convolutional layer.

[0060] In the third step, the medical image used in the first step and the watermark image used in the second step are concatenated to generate a cascaded image. This image is then fed into a convolutional neural network. During each iteration of training, the network updates the style and content features of the cascaded image. The style feature loss function is calculated using the updated style features and the style features of the medical image obtained in the first step. The content feature loss function is calculated using the updated content features and the content features of the watermark image obtained in the second step. The convolutional neural network parameters are updated using the Adam algorithm until both loss functions converge, completing the fusion of the style features of the medical image and the content features of the watermark image.

[0061] The specific style feature loss function is:

[0062]

[0063] Where a and x represent the medical image selected in the current iteration and the corresponding zero-watermark image generated by the network, respectively. LS represents the style loss value between images a and x. l represents the style loss value between images a and x calculated by the lth convolutional layer in the network. L represents all convolutional layers used to calculate the style loss in the current iteration. w l N represents the weight of the style loss of a and x in the lth convolutional layer of the network to the style loss of all convolutional layers on L, l Indicates the number of channels of the lth convolutional layer, M l Indicates the number of outputs of each channel in the lth convolutional layer, G l and A l They represent the style features of image a at the lth convolutional layer and the style features of image x at the lth convolutional layer respectively.

[0064] The specific content feature loss function is:

[0065]

[0066] Where t represents the watermark image selected in the current iteration, LC represents the content loss value between images t and x, and F and P represent the content features of image t and image x, respectively.

[0067] The stochastic gradient descent algorithm Adam is used to update the weights. By taking advantage of its adaptive learning rate adjustment feature, a different learning rate is used for each weight update, breaking the constraint of updating all parameters with the same learning rate. At the same time, it also reduces the weight update oscillation, improves the convergence effect, and thus fully enables feature fusion.

[0068] Step 4: Repeat steps 1 to 3 until all images in the medical image training set and the watermark image training set are traversed to obtain a trained convolutional neural network.

[0069] Step 4: Generate a zero-watermark image.

[0070] Call the cv.resize function to adjust the size of the medical image to be generated with zero watermark and the corresponding watermark image, and adjust the length, width, and channel sizes of the two images to 256×256×3.

[0071] The resized medical image and the watermark image are cascaded to generate a cascade image, which is input into the neural network trained in step 3, and the zero-watermark image after feature fusion is output. This method of inputting the image into the neural network to obtain the zero watermark avoids dislocation in the zero watermark generation process, ensures the integrity of the final generated zero watermark information, and improves the success rate of generating zero watermarks.

[0072] Reference Figure 4 , the specific steps of the embodiment of the zero watermark detection method of the present invention are further described in detail.

[0073] Step 1: Generate a detection training set.

[0074] At least 1,000 medical images were selected as the sample set. A medical image zero-watermark generation method based on feature fusion was used to generate a corresponding zero-watermark image using the OASIS logo image as the watermark image and each medical image in the sample set.

[0075] Each medical image in the sample set is concatenated with the zero-watermark image corresponding to the medical image, and all the concatenated images constitute the detection training set.

[0076] Step 2: Train the detector.

[0077] The classic residual network ResNet18 is used as the detector. ResNet18 is a classic deep learning network that uses a residual block structure to solve the gradient explosion problem during network training. It can better learn the watermark information in the zero watermark, so that the trained detector can output clear watermark information.

[0078] The detection training set is input into the detector, the detector is trained, and the network parameters are updated using the Adam algorithm until the network loss function converges. The output subtracts the medical image style features in the zero-watermark image to obtain the trained detector.

[0079] The loss function of the network is:

[0080]

[0081] Where N represents and p i ′The number of pixels in the two images, represents the i-th pixel value of the OASIS logo as the watermark image, p′ j Represents the j-th pixel value in the watermark information detected by the cascaded image input detector.

[0082] Step 3: Detect watermark information.

[0083] The medical image and the corresponding zero-watermarked image are concatenated to generate a cascaded image, which is then fed into a trained detector to output the watermark information corresponding to the medical image. This watermark information can provide evidence for verifying the copyright of the corresponding medical image.

[0084] The effects of the present invention are further described below in conjunction with simulation experiments.

[0085] 1. Simulation experiment conditions.

[0086] The hardware platform of the simulation experiment of the present invention is as follows: the processor is a quad-core Intel(R) Celeron(R) CPU with a main frequency of 2.10 GHz and a memory of 16 GB.

[0087] The software platforms for the simulation experiment of the present invention are: Ubuntu operating system, python 3.6, and Pytorch 1.7.1.

[0088] The watermark image used in the simulation experiment of the present invention is the logo image of Shanghai Medical College of Fudan University, which has an image size of 256×256×3 and an image format of JPEG. The medical image used is an image from the “wholebrain atlas” medical image dataset, which has an image size of 256×256×3 and an image format of JPEG.

[0089] 2. Analysis of simulation content and results.

[0090] The simulation experiment of the present invention is to generate zero watermarks on the input medical image and watermark image respectively by comparing the present invention with three existing technologies (dual-tree complex wavelet transform and discrete cosine transform DTCWT-DCT zero watermark method, discrete wavelet transform and discrete cosine transform DWT-DCT zero watermark method, and fast discrete curvelet transform and discrete cosine transform FDCuT-DCT zero watermark method), obtain the generated zero watermark image, and detect watermark information on the generated zero watermark image.

[0091] In the simulation experiment, the three existing technologies used are:

[0092] The prior art dual-tree complex wavelet transform and discrete cosine transform DTCWT-DCT zero watermark method refers to the zero watermark method proposed by Liu J et al. in “A robust multi-watermarking algorithm for medical images based on DTCWT-DCT and Henon map. Applied Sciences, 9(4):700, 2019.”, referred to as the dual-tree complex wavelet transform and discrete cosine transform DTCWT-DCT zero watermark method.

[0093] The prior art discrete wavelet transform and discrete cosine transform DWT-DCT zero watermark method refers to the zero watermark method proposed by Zear et al. in “A proposed secure multiple watermarking technique based on DWT, DCT and SVD for application in medicine. Multimed Tools Appl, 77(4), 4863–4882, 2018”, referred to as the discrete wavelet transform and discrete cosine transform DWT-DCT zero watermark method.

[0094] The prior art fast discrete curvelet transform and discrete cosine transform FDCuT-DCT zero watermark method refers to the zero watermark method proposed by ThankiR et al. in “An efficient medical image watermarking scheme based on FDCuT-DCT. Engineering science and technology, an international journal, 20(4): 1366-1379, 2017.”, referred to as the fast discrete curvelet transform and discrete cosine transform FDCuT-DCT zero watermark method.

[0095] The peak signal-to-noise ratio (PSNR) and normalization coefficient (NC) are used to test the attack resistance of zero-watermark images generated by the four methods.

[0096] Use the following formula to calculate the peak signal-to-noise ratio (PSNR) and the normalization coefficient (NC), and plot all the calculation results in Table 1:

[0097]

[0098]

[0099] For the simulation experiment of the present invention, the value of MAX is 255, where m and n are both 256, W(i,j,k) is the watermark image, and W′(i,j,k) is the pixel value of the i-th row, j-th column, and k-th channel of the watermark information detected from the generated zero-watermark image.

[0100] Table 1. Quantitative comparison of zero-watermark images generated by the present invention and various existing technologies in simulation experiments

[0101]

[0102] As shown in Table 1, the present invention maintains a watermark NC value above 0.98 for zero-watermarked images generated after image attacks. This performance is significantly higher than that of the three existing methods, demonstrating that the present invention can generate high-quality zero-watermarked images. This performance is particularly strong against compression attacks, enabling clear watermark detection. The present invention also maintains a stable NC value for medical images with a PSNR of 12.0574 after attacks, demonstrating that the zero-watermarked images generated by the present invention are highly resistant to various attacks.

[0103] The above simulation experiments show that the method of the present invention uses a trained convolutional neural network to obtain 512-channel style features of medical images, fully retains the position feature information of the medical image, and fuses it with the content features of the watermark image to generate a zero-watermark image. The trained ResNet18 is used for watermark detection, which solves the problems of zero-watermark information loss and image feature position information loss in the existing technical methods, and solves the problems caused by these problems, such as the generated zero watermark cannot resist attacks, watermark detection fails, and the success rate of generating zero watermark is low.

Claims

1. A method for generating zero watermark for medical images based on feature fusion, characterized in that: A convolutional neural network with 512 channels is constructed. The trained convolutional neural network is used to extract the style features of the medical image and the content features of the watermark image. The two features are then fused to generate a zero-watermark image. The steps of this method include the following: Step 1: Build a convolutional neural network with 512 channels: Step 1.1, build a convolutional neural network with 16 convolutional layers. Its structure is as follows: first convolutional layer, second convolutional layer, first pooling layer, third convolutional layer, fourth convolutional layer, second pooling layer, fifth convolutional layer, sixth convolutional layer, seventh convolutional layer, eighth convolutional layer, third pooling layer, ninth convolutional layer, tenth convolutional layer, eleventh convolutional layer, twelfth convolutional layer, fourth pooling layer, thirteenth convolutional layer, fourteenth convolutional layer, fifteenth convolutional layer, sixteenth convolutional layer, fifth pooling layer, activation function layer; Step 1.2: Set the convolutional neural network parameters. Set the number of channels of the first to second convolutional layers to 64, the number of channels of the third to fourth convolutional layers to 128, the number of channels of the fifth to eighth convolutional layers to 256, and the number of channels of the ninth to sixteenth convolutional layers to 512. Set the size of the convolution kernel to 3×3, the convolution step to 1, and the convolution kernel padding to 1. Use the maximum pooling method for the first to fifth pooling layers, set the size of the pooling area kernel to 2×2, and the step to 2. Use the Softmax function to implement the activation function layer. Step 2: Generate two training sets for the network: Step 2.1: P medical images and R watermark images are combined into a sample set, where P ≥ 10, R ≥ 4, and the length, width, and number of channels of each image are 256 × 256 × 3; Step 2.2: Perform six attack methods on each medical image in the sample set to obtain all the attacked medical images. Step 2.3: The medical images in the sample set and all the attacked medical images are combined into a training set; Step 2.4, the watermark images in the sample set are combined into a watermark image training set; Step 3: Train the convolutional neural network: Step 3.1: Take an unselected medical image from the medical image training set and input it into the convolutional neural network. Calculate the style features of the current medical image, that is, the sum of the inner products of the activation responses of the medical image in the first convolutional layer, the third convolutional layer, the fifth convolutional layer, the ninth convolutional layer, and the thirteenth convolutional layer. Step 3.2: Take an unselected watermark image from the watermark image training set and input it into the convolutional neural network to calculate the content features of the current watermark image, that is, the sum of the activation responses of the watermark image in the fourteenth convolutional layer; Step 3.3: Concatenate the selected medical image and the watermark image to generate a cascade image, which is then fed into a convolutional neural network. During each iterative training, the network updates the style and content features of the cascade image. The mean square error loss between the updated style features and the style features obtained from the selected medical image is used as the style feature loss function. The mean square error loss between the updated content features and the content features obtained from the selected watermark image is used as the content feature loss function. The convolutional neural network parameters are updated using the Adam algorithm until both loss functions converge, completing the feature fusion of the medical image style features and the watermark image content features. Step 3.4: Repeat steps 3.1 to 3.3 until all images in the medical image training set and the watermark image training set are traversed to obtain a trained convolutional neural network. Step 4: Generate zero-watermark image: Step 4.1: Use the cv.resize function to adjust the size of the medical image to be generated with zero watermark and the corresponding watermark image, and adjust the length, width, and channel size of the two images to 256×256×3; Step 4.2, concatenating the resized medical image and the watermark image to generate a cascade image; In step 4.3, the cascade image is input into the trained neural network, and the zero-watermark image is output as a fusion of the style features of the medical image and the content features of the watermark image.

2. The method for generating a zero watermark for medical images based on feature fusion according to claim 1, characterized in that: The six attacking parties described in step 2.2 are as follows: The first attack method: perform a rotation attack on each medical image in the sample set with a rotation degree ranging from 1° to 144°, and obtain at least 100 images of the image after the rotation attack; The second attack method: perform a cropping attack on each medical image with a cropping area ranging from 0.01% to 40% of the image, and obtain at least 100 cropped images of the image; The third attack method: each medical image is subjected to a compression attack with a compression factor ranging from 0.01% to 40%, and at least 100 compressed attack images of the image are obtained; The fourth attack method: each medical image is subjected to a noise attack with a noise coefficient ranging from 0.01% to 40%, and at least 100 noise-attacked images of the image are obtained; The fifth attack method: each medical image is subjected to a scaling attack with a scaling degree ranging from 0.01% to 40%, and at least 100 scaled attack images of the image are obtained; The sixth attack method: perform a filtering attack on each medical image with a filtering range of 0.01% to 40%, and obtain at least 100 filtered attack images of the image.

3. The method for generating a zero watermark for medical images based on feature fusion according to claim 1, characterized in that: The style feature loss function described in step 3.3 is: Where a and x represent the medical image selected in the current iteration and the corresponding zero-watermark image generated by the convolutional neural network, respectively. LS represents the style loss value between images a and x. l represents the style loss value between images a and x calculated by the lth convolutional layer in the convolutional neural network. L represents all convolutional layers in the convolutional neural network used to calculate the style loss in the current iteration. w l N represents the weight of the style loss of the lth convolutional layer of a and x to the style loss of all convolutional layers on L in the convolutional neural network, l Indicates the number of channels of the lth convolutional layer in the convolutional neural network, M l G represents the number of outputs of each channel in the lth convolutional layer of the convolutional neural network, l and A l They respectively represent the style features of image a at the lth convolutional layer in the convolutional neural network and the style features of image x at the lth convolutional layer in the convolutional neural network.

4. The method for generating a zero watermark for medical images based on feature fusion according to claim 3, characterized in that: The content feature loss function described in step 3.3 is: Where t represents the watermark image selected in the current iteration, LC represents the content loss value between the watermark image t and the zero-watermark image x, F and P represent the content features of the watermark image t and the content features of the zero-watermark image x, respectively.

5. A medical image zero watermark detection method based on feature fusion according to the medical image zero watermark generation method of claim 1, characterized in that: The detector is trained using the detection training set, and the trained detector is used to perform a style subtraction operation on the input zero-watermark image and the cascade image of the medical image, thereby subtracting the style features of the medical image from the zero-watermark image to obtain watermark information. The steps of the detection method include the following: Step 1: Generate a detection training set: Step 1.1: Select at least 1,000 medical images to form a sample set, use a feature fusion-based medical image zero-watermark generation method, use the OASIS logo image as the watermark image, and generate a corresponding zero-watermark image for each medical image in the sample set; Step 1.2, concatenate each medical image in the sample set with the zero-watermark image corresponding to the medical image, and form the detection training set with all the concatenated images; Step 2, train the detector: Step 2.1, use the classic residual network ResNet18 as the detector; Step 2.2: Input the detection training set into the detector and train the detector. Use the Adam algorithm to iteratively update the network parameters until the network loss function converges. Output the medical image style features in the zero-watermarked image to obtain the trained detector. Step 3: Detect watermark information: The medical image and the corresponding zero-watermark image are cascaded to obtain a cascade image, and the cascade image is input into a trained detector to output the watermark information corresponding to the medical image.

6. The method for medical image zero watermark detection based on feature fusion according to claim 5, characterized in that: The loss function described in step 2.2 is: Where N represents and p i ′The number of pixels in the two images, represents the i-th pixel value of the OASIS logo as the watermark image, p′ j Represents the j-th pixel value in the watermark information detected by the cascaded image input detector.

Citation Information

Patent Citations

  • Color medical image zero-watermark construction method and system and detection method and system

    CN110570342A

  • Methods, systems, and detection methods for constructing zero-watermarking color medical images

    CN110570342B

  • Face age estimation method based on inverted residual network

    CN110458084A

  • Medical image zero-watermark generation algorithm based on multi-algorithm fusion

    CN114742687A