A method and system for zero-watermarking medical images based on hybrid Transformer networks

By combining a multi-scale pooling module of a hybrid Transformer network with a wavelet-gated query attention module, the problem of small medical image datasets and insufficient robustness is addressed, achieving efficient local-global feature fusion and improving the robustness and generalization of zero-watermarking of medical images.

CN122492422APending Publication Date: 2026-07-31NANJING TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING TECH UNIV
Filing Date
2026-01-30
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing deep learning methods are prone to overfitting when medical image datasets are small, and lack prior knowledge for denoising, resulting in insufficient robustness and generalization ability. Furthermore, existing methods fail to effectively preserve spatial local information in mid-to-high frequency subbands.

Method used

A hybrid Transformer network is adopted, which combines a multi-scale pooling module and a wavelet-gated query attention module. Through multi-scale local feature extraction and frequency domain denoising, local-global feature fusion is achieved, thereby improving robustness and generalization.

Benefits of technology

It effectively avoids overfitting problems, enhances resistance to geometric and noise attacks, preserves mid-to-high frequency spatial details, improves the robustness and generalization of zero watermarking, and does not modify the original medical image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122492422A_ABST
    Figure CN122492422A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for zero-watermarking of medical images based on a hybrid Transformer network. The method includes: acquiring a medical image and a watermark image; inputting the medical image into a pre-trained hybrid Transformer network, extracting multi-scale local features from the medical image through a multi-scale pooling module, and performing global modeling of the multi-scale local features through a wavelet-gated query attention module to obtain local-global fusion features; inputting the local-global fusion features into a fully connected layer to obtain a medical image feature vector, and converting the medical image feature vector into a feature matrix; binarizing the feature matrix and the watermark image and performing an XOR operation to obtain a zero-watermark image. This invention improves the robustness of zero-watermarking of medical images against geometric attacks and noise attacks, while also improving the generalization ability in scenarios with small samples and multiple differences in medical images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of digital watermarking technology, specifically relating to a zero-watermarking method and system for medical images based on a hybrid Transformer network. Background Technology

[0002] Zero watermarking is a digital watermarking technology often used for copyright protection of medical images. It requires that the watermark can still be extracted to protect copyright even after the medical image is subjected to geometric attacks such as translation, scaling, and rotation, as well as noise distortion during transmission. This is the robustness of the watermark.

[0003] Local features typically show little change under global geometric attacks, while global features are more robust when medical images are severely damaged locally. Many deep learning methods generate robust features by fusing local and global features, combining their respective advantages. However, because medical image datasets are usually small and vary significantly across different body parts, it is crucial to extract robust features while maintaining good generalization ability. While most deep learning methods have continuously improved feature extraction capabilities, the simultaneous increase in model parameters poses a challenge of overfitting on small-scale medical datasets.

[0004] Furthermore, while deep learning methods improve feature extraction capabilities by fusing local and global features, they are prone to incorrectly learning noise into features due to a lack of prior knowledge about denoising. Some studies combine frequency domain methods with prior denoising knowledge with deep learning methods, applying deep learning models to extract features in the low-frequency sub-band to reduce noise. However, existing methods directly extract features from the low-frequency sub-band, failing to effectively preserve spatial local information in the mid-to-high-frequency sub-bands, thus limiting further improvements in model robustness. Summary of the Invention

[0005] This invention provides a method and system for zero-watermarking of medical images based on a hybrid Transformer network, which can simultaneously improve the robustness and generalization of zero-watermarking of medical images.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0007] The first aspect of this invention provides a zero-watermarking method for medical images based on a hybrid Transformer network, comprising:

[0008] Acquire medical images and watermarked images; input the medical images into a pre-trained hybrid Transformer network, extract multi-scale local features from the medical images through the multi-scale pooling module in the hybrid Transformer network, and perform global modeling of the multi-scale local features through the wavelet-gated query attention module in the hybrid Transformer network to obtain local-global fusion features;

[0009] The local-global fusion features are input into the fully connected layer to obtain the medical image feature vector, which is then converted into a feature matrix. The feature matrix and the watermark image are binarized and XORed to obtain the zero-watermark image.

[0010] Furthermore, the hybrid Transformer network includes a first multi-scale pooling downsampling block, a second multi-scale pooling downsampling block, a first global feature fusion block, and a second global feature fusion block connected in sequence.

[0011] Both the first multi-scale pooling downsampling block and the second multi-scale pooling downsampling block include downsampling layers and several multi-scale pooling modules connected in sequence; the last multi-scale pooling module in the first multi-scale pooling downsampling block is connected to the downsampling layer in the second multi-scale pooling downsampling block.

[0012] Both the first global feature fusion block and the second global feature fusion block include a downsampling layer, several multi-scale pooling modules, and several wavelet-gated query attention modules connected in sequence; the last multi-scale pooling module in the second multi-scale pooling downsampling block is connected to the downsampling layer in the first global feature fusion block; the last wavelet-gated query attention module in the first global feature fusion block is connected to the downsampling layer in the second global feature fusion block.

[0013] Furthermore, the first multi-scale pooling downsampling block and the second multi-scale pooling downsampling block each use a number of... and The multi-scale pooling module; the number of the first global feature fusion block used is Multi-scale pooling modules and their number are Wavelet-gated query attention module; the second global feature fusion block uses a number of... Multi-scale pooling modules and their number are Wavelet-gated query attention module.

[0014] Furthermore, the training process of the hybrid Transformer network specifically includes:

[0015] Medical training images of multiple body parts are acquired, and geometric and noise attacks are performed on the original medical training images to obtain damaged medical image samples. The original medical training images and damaged medical image samples are respectively input into a pre-constructed hybrid Transformer network to obtain feature vectors of the original medical training images and feature vectors of the damaged medical image samples. The cosine loss between the feature vectors of the original medical training images and the feature vectors of the damaged medical image samples is calculated. The regularization loss is calculated based on the learnable parameters of the hybrid Transformer network.

[0016] The total training loss is obtained by weighted summation of the regularization loss and cosine loss, expressed as follows:

[0017]

[0018] In the formula, Total training loss; For cosine loss, Set weights for the cosine loss; For regularization loss, Set weights for the regularization loss;

[0019] The parameters of the hybrid Transformer network are optimized based on the total training loss. The training process of the hybrid Transformer network is repeated iteratively until the total training loss converges and the trained hybrid Transformer network is output.

[0020] Furthermore, multi-scale local features are extracted from medical images using the multi-scale pooling module in a hybrid Transformer network, specifically including:

[0021] The medical image is downsampled and used as the input feature of the multi-scale pooling module. The input features of the multi-scale pooling module are divided by channel to obtain the first-level sub-features of four branches. The first-level sub-features of the four branches are input into the pooling window to obtain the second-level sub-features of the four branches. The formula is as follows:

[0022]

[0023]

[0024]

[0025]

[0026]

[0027] In the formula, , , and These are the first-level sub-features of the four branches; , , and These are the second-level sub-features output from the four branches; This indicates a partitioning operation of the input features along the channel dimension; This is a convolution with a kernel size of 1*1; For medical images; This represents the average pooling operation;

[0028] After concatenating and fusing the second-level sub-features output from the four branches, the results are input into an efficient channel attention and multilayer perceptron to obtain multi-scale local features, expressed as follows:

[0029]

[0030] In the formula, It represents multi-scale local features; It is a multilayer perceptron; For efficient channel attention; This is a convolution with a kernel size of 1*1; This is for splicing and merging operations at the channel dimension.

[0031] Furthermore, a local-global fusion feature is obtained by globally modeling multi-scale local features through a wavelet-gated query attention module in a hybrid Transformer network, specifically including:

[0032] Multi-scale local features are decomposed into frequency domain subbands using two-dimensional discrete wavelet transform. Frequency domain subband Frequency domain subband and frequency domain subband The formula is as follows:

[0033]

[0034] In the formula, It is a two-dimensional discrete wavelet transform; It represents multi-scale local features;

[0035] For frequency domain subband Frequency domain subband Frequency domain subband and frequency domain subband Wavelet-gated adaptive denoising is used to obtain frequency domain subbands. Frequency domain subband Frequency domain subband and frequency domain subband The formula is as follows:

[0036]

[0037] In the formula, This is a convolution with a kernel size of 1*1; express Activation function;

[0038] Frequency domain subband is obtained by inverse two-dimensional discrete wavelet transform. Frequency domain subband Frequency domain subband and frequency domain subband Convert to medical denoising image features; the formula is:

[0039]

[0040] In the formula, Features for medical image denoising; For wavelet-gated adaptive denoising; It represents multi-scale local features; It is the inverse two-dimensional discrete wavelet transform;

[0041] A query matrix is ​​obtained by performing dimensionality reshaping operations on the features of medical denoised images, and a key matrix and a value matrix are obtained by performing dimensionality reshaping operations on multi-scale local features.

[0042] An attention weight matrix is ​​generated based on the query matrix and the key matrix. The value matrix is ​​then weighted and summed using the attention weight matrix to obtain the gated denoising dual-domain fusion feature.

[0043] The gated denoising dual-domain fusion features are input into a multilayer perceptron to obtain local-global fusion features, expressed as follows:

[0044]

[0045] In the formula, It is a local-global fusion feature. It is a multilayer perceptron. This is a gated denoising dual-domain fusion feature.

[0046] Furthermore, a dimensionality reshaping operation is performed on the medical denoised image features to obtain a query matrix, and a dimensionality reshaping operation is performed on the multi-scale local features to obtain a key matrix and a value matrix, specifically including:

[0047]

[0048]

[0049]

[0050] In the formula, For query matrix; V is the key matrix; V is the value matrix; For dimensional reshaping operations; Features for medical image denoising; It represents multi-scale local features; This is a convolution with a kernel size of 1*1.

[0051] Furthermore, an attention weight matrix is ​​calculated based on the query matrix and the key matrix. The value matrix is ​​then weighted and summed using the attention weight matrix to obtain the gated denoising dual-domain fusion features, specifically including:

[0052]

[0053] In the formula, For wavelet-gated query attention function; It represents multi-scale local features; express Normalization function; For query matrix; V is the key matrix; V is the value matrix; This represents the matrix transpose operation. Represents the attention weight matrix. This represents the dimension of the key vector.

[0054] A second aspect of the present invention provides a medical image zero-watermarking system based on a hybrid Transformer network, comprising:

[0055] The image acquisition unit is used to acquire medical images and watermarked images;

[0056] The feature extraction unit is used to input medical images into a pre-trained hybrid Transformer network. Multi-scale local features are extracted from the medical images through the multi-scale pooling module in the hybrid Transformer network. The multi-scale local features are then globally modeled through the wavelet-gated query attention module in the hybrid Transformer network to obtain local-global fusion features.

[0057] The feature fusion unit inputs local-global fused features into the fully connected layer to obtain medical image feature vectors, and then converts the medical image feature vectors into feature matrices.

[0058] The watermarking unit is used to binarize the feature matrix and the watermark image and perform an XOR operation to obtain a zero-watermark image.

[0059] A third aspect of the present invention provides an electronic terminal, characterized in that it includes a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the medical image zero-watermarking method described in the first aspect.

[0060] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0061] The hybrid Transformer network of this invention adopts an architecture that combines a low-parameter multi-scale pooling module with a low-computation wavelet-gated query attention module. This avoids the overfitting problem of large-scale models on small sample medical data, and achieves efficient extraction of local-global fusion features, while simultaneously improving the robustness and generalization of zero watermark.

[0062] The multi-scale pooling module of this invention uses a multi-branch cascaded residual modeling method to capture local features from different receptive fields. With the inherent stability of pooling operations, it greatly enhances the resistance of zero watermark to geometric attacks such as translation and scaling.

[0063] This invention's wavelet-gated query attention module integrates the advantages of frequency domain denoising and deep learning. By differentially processing each frequency sub-band, it suppresses noise while preserving mid-to-high frequency spatial details, significantly improving robustness against noise attacks. Furthermore, the zero-watermark generation process does not modify the original medical image, meeting clinical application needs, and the third-party server storage design further ensures the security and reliability of copyright verification. Attached Figure Description

[0064] Figure 1 This is a flowchart of the zero-watermarking method for medical images provided in Embodiment 1 of the present invention;

[0065] Figure 2 This is a structural diagram of the hybrid Transformer network provided in Embodiment 1 of the present invention. Detailed Implementation

[0066] 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.

[0067] Example 1

[0068] like Figure 1 As shown, this embodiment provides a zero-watermarking method for medical images based on a hybrid Transformer network, including:

[0069] A hybrid Transformer network is constructed using a multi-scale pooling module and a wavelet-gated query attention module, such as... Figure 2As shown, the hybrid Transformer network includes a first multi-scale pooling downsampling block, a second multi-scale pooling downsampling block, a first global feature fusion block, and a second global feature fusion block connected in sequence.

[0070] Both the first multi-scale pooling downsampling block and the second multi-scale pooling downsampling block include downsampling layers and several multi-scale pooling modules connected in sequence; the last multi-scale pooling module in the first multi-scale pooling downsampling block is connected to the downsampling layer in the second multi-scale pooling downsampling block.

[0071] Both the first global feature fusion block and the second global feature fusion block include a downsampling layer, several multi-scale pooling modules, and several wavelet-gated query attention modules connected in sequence; the last multi-scale pooling module in the second multi-scale pooling downsampling block is connected to the downsampling layer in the first global feature fusion block; the last wavelet-gated query attention module in the first global feature fusion block is connected to the downsampling layer in the second global feature fusion block.

[0072] The hybrid Transformer network systematically compresses the feature map dimension through progressive downsampling, ensuring both the hierarchical nature of feature extraction and avoiding information redundancy. Stages 1 and 2 (the first multi-scale pooling downsampling block and the second multi-scale pooling downsampling block) focus on the application of multi-scale pooling modules, capturing multi-scale local features with a low parameter count. They leverage the inherent stability of pooling operations to enhance resistance to geometric attacks while avoiding overfitting issues of large-scale models on small-sample medical data.

[0073] Stages 3 and 4 (the first global feature fusion block and the second global feature fusion block) are reasonably integrated with the wavelet-gated query attention module to achieve deep fusion of local and global features. This module effectively solves the noise interference problem by preserving mid-to-high frequency spatial details through frequency domain adaptive denoising and reducing computational overhead through fast self-attention.

[0074] In this embodiment, the number of the first multi-scale pooling downsampling block and the second multi-scale pooling downsampling block used are respectively [number missing]. and The multi-scale pooling module; the number of the first global feature fusion block used is Multi-scale pooling modules and their number are Wavelet-gated query attention module; the second global feature fusion block uses a number of... Multi-scale pooling modules and their number are Wavelet-gated query attention module;

[0075] In this embodiment, the initial image size input to the hybrid Transformer network is... ,in, The height of the input image for the hybrid Transformer network, The width of the input image to the hybrid Transformer network; the output feature sizes of the first multi-scale pooling downsampling block, the second multi-scale pooling downsampling block, the first global feature fusion block, and the second global feature fusion block are respectively... , , , .

[0076] Training the hybrid Transformer network specifically includes:

[0077] Medical training images of multiple body parts are acquired. Geometric attacks (translation, scaling, and rotation) and noise attacks (Gaussian noise addition) are applied to the original medical training images to obtain damaged medical image samples. The original medical training images and damaged medical image samples are then input into a pre-constructed hybrid Transformer network to obtain feature vectors for the original medical training images and damaged medical image samples, respectively. The cosine loss between the feature vectors of the original medical training images and damaged medical image samples is calculated. Regularization loss is calculated based on the learnable parameters of the hybrid Transformer network.

[0078] The total training loss is obtained by weighted summation of the regularization loss and cosine loss, expressed as follows:

[0079]

[0080] In the formula, Total training loss; For cosine loss, Set weights for the cosine loss; For regularization loss, Set weights for the regularization loss;

[0081] The parameters of the hybrid Transformer network are optimized based on the total training loss. The training process of the hybrid Transformer network is repeated iteratively until the total training loss converges and the trained hybrid Transformer network is output.

[0082] Acquire medical images and watermark images; input the medical images into a pre-trained hybrid Transformer network, and extract multi-scale local features from the medical images through the multi-scale pooling module in the hybrid Transformer network, specifically including:

[0083] The medical image is downsampled and used as the input feature of the multi-scale pooling module. The input features of the multi-scale pooling module are divided by channel to obtain the first-level sub-features of four branches. The first-level sub-features of the four branches are input into the pooling window to obtain the second-level sub-features of the four branches. The formula is as follows:

[0084]

[0085]

[0086]

[0087]

[0088]

[0089] In the formula, , , and These are the first-level sub-features of the four branches; , , and These are the second-level sub-features output from the four branches; This indicates a partitioning operation of the input features along the channel dimension; This is a convolution with a kernel size of 1*1; For medical images; This represents the average pooling operation;

[0090] Among them, except for the first-level sub-features of the first branch No processing is performed to preserve the original scale information, thus avoiding the loss of basic structural information during multi-scale feature extraction. The original scale information contains the spatial layout and key details of the image core, serving as the benchmark for subsequent multi-scale feature fusion. It provides a reference for the association of features at different scales, ensuring that the fused features do not deviate from the essential attributes of the image.

[0091] First-level sub-features To the first-level sub-feature A cascaded residual modeling approach is adopted, whereby the first-level sub-feature is first input into a pooling window to output a small-scale feature, and then input together with the sub-feature of the next branch into a pooling window to output a second-level sub-feature. This process is repeated several times until the first-level sub-features of all branches have been processed. The residual propagation characteristic reduces information attenuation during feature extraction, allowing effective features at different scales to be fully preserved, improving the integrity and correlation of multi-scale local features, and thus enhancing the zero-watermark's resistance to geometric attacks.

[0092] After concatenating and fusing the second-level sub-features output from the four branches, the results are input into an efficient channel attention and multilayer perceptron to obtain multi-scale local features, expressed as follows:

[0093]

[0094] In the formula, It represents multi-scale local features; It is a multilayer perceptron; For efficient channel attention; This is a convolution with a kernel size of 1*1; This is for splicing and merging operations at the channel dimension.

[0095] In the feature fusion stage, Efficient Channel Attention (ECA) and Multilayer Perceptron (MLP) are introduced to achieve deep integration of multi-scale features while maintaining the model's lightweight nature. ECA efficiently and adaptively strengthens the weights of key feature channels and suppresses redundant interference, while MLP further optimizes feature correlation, making the output features both rich in detail and consistent. The low parameter count design is well-suited to the small size of medical image datasets, effectively avoiding overfitting and ensuring the generalization ability of feature extraction.

[0096] Local-global fused features are obtained by globally modeling multi-scale local features using a wavelet-gated query attention module in a hybrid Transformer network; specifically including:

[0097] Multi-scale local features are decomposed into frequency domain subbands using two-dimensional discrete wavelet transform. Frequency domain subband Frequency domain subband and frequency domain subband The formula is as follows:

[0098]

[0099] In the formula, It is a two-dimensional discrete wavelet transform; It represents multi-scale local features;

[0100] For frequency domain subband Frequency domain subband Frequency domain subband and frequency domain subband Wavelet-gated adaptive denoising is used to obtain frequency domain subbands. Frequency domain subband Frequency domain subband and frequency domain subband The formula is as follows:

[0101]

[0102] In the formula, express Activation function;

[0103] In this implementation, the low-frequency subband includes a global spatial structure. Using 1x1 convolutions for linear combination of channel dimensions preserves the spatial layout while reducing redundant information and noise; for mid-frequency sub-bands and intermediate frequency subband Lightweight gating mechanisms are used for adaptive noise suppression while preserving significant edge structure; for the most unstable high-frequency subbands Similarly, a lightweight gating mechanism is used for low-intensity denoising, thereby ensuring the quality of the reconstructed image by the inverse two-dimensional discrete wavelet transform.

[0104] Frequency domain subband is obtained by inverse two-dimensional discrete wavelet transform. Frequency domain subband Frequency domain subband and frequency domain subband Convert to medical denoising image features; the formula is:

[0105]

[0106] In the formula, Features for medical image denoising; For wavelet-gated adaptive denoising; It represents multi-scale local features; It is the inverse two-dimensional discrete wavelet transform;

[0107] The query matrix is ​​obtained by performing dimensionality reshaping operations on the features of the medical denoised image, and the key matrix and value matrix are obtained by performing dimensionality reshaping operations on the multi-scale local features; the expression formula is as follows:

[0108]

[0109]

[0110]

[0111] In the formula, For query matrix; V is the key matrix; V is the value matrix; For dimensional reshaping operations, Image features of shape converted to Image features of shape It refers to the batch size. It is the number of channels. w is the feature map height, and w is the feature map width. It's the number of heads that attract attention. This indicates the number of channels within each attention head; Features for medical image denoising; It represents multi-scale local features; This is a convolution with a kernel size of 1*1.

[0112] An attention weight matrix is ​​generated based on the query matrix and the key matrix. The value matrix is ​​then weighted and summed using the attention weight matrix to obtain the gated denoising dual-domain fusion feature. The formula is as follows:

[0113]

[0114] In the formula, For wavelet-gated query attention function; It represents multi-scale local features; express Normalization function; For query matrix; V is the key matrix; V is the value matrix; This represents the matrix transpose operation. Represents the attention weight matrix. This represents the dimension of the key vector.

[0115] The gated denoising dual-domain fusion features are input into a multilayer perceptron to obtain local-global fusion features, expressed as follows:

[0116]

[0117] In the formula, It is a local-global fusion feature. It is a multilayer perceptron. This is a gated denoising dual-domain fusion feature.

[0118] The local-global fusion features are input into the fully connected layer to obtain a 4096-dimensional medical image feature vector, which is then converted into a 64*64 feature matrix. The feature matrix and the watermark image are binarized and XORed to obtain a zero-watermark image, which is then stored on a third-party server for subsequent extraction of the watermark image to complete the medical image copyright protection.

[0119] In this embodiment, the wavelet-gated query attention module combines the advantages of frequency domain denoising and deep learning. By differentially processing each frequency sub-band, it suppresses noise while preserving mid-to-high frequency spatial details, significantly improving robustness against noise attacks. Furthermore, the zero-watermark generation process does not modify the original medical image, meeting clinical application needs, and the third-party server storage design further ensures the security and reliability of copyright verification.

[0120] Example 2

[0121] This embodiment provides a medical image zero-watermarking system based on a hybrid Transformer network. The medical image zero-watermarking system is used to execute the medical image zero-watermarking method described in Embodiment 1, including:

[0122] The image acquisition unit is used to acquire medical images and watermarked images;

[0123] The feature extraction unit is used to input medical images into a pre-trained hybrid Transformer network. Multi-scale local features are extracted from the medical images through the multi-scale pooling module in the hybrid Transformer network. The multi-scale local features are then globally modeled through the wavelet-gated query attention module in the hybrid Transformer network to obtain local-global fusion features.

[0124] The feature fusion unit inputs local-global fused features into the fully connected layer to obtain medical image feature vectors, and then converts the medical image feature vectors into feature matrices.

[0125] The watermarking unit is used to binarize the feature matrix and the watermark image and perform an XOR operation to obtain a zero-watermark image.

[0126] Example 3

[0127] This embodiment provides an electronic terminal, characterized in that it includes a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the medical image zero-watermarking method described in Embodiment 1.

[0128] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0129] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. 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, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0130] These 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 function 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 function specified in one or more boxes.

[0131] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment 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.

[0132] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A zero-watermarking method for medical images based on a hybrid Transformer network, characterized in that, include: Acquire medical images and watermarked images; The medical image is input into a pre-trained hybrid Transformer network. Multi-scale local features are extracted from the medical image through the multi-scale pooling module in the hybrid Transformer network. The multi-scale local features are then globally modeled through the wavelet-gated query attention module in the hybrid Transformer network to obtain local-global fusion features. The local-global fusion features are input into the fully connected layer to obtain the medical image feature vector, which is then converted into a feature matrix. The feature matrix and the watermark image are binarized and XORed to obtain the zero-watermark image.

2. The zero-watermarking method for medical images according to claim 1, characterized in that, The hybrid Transformer network includes a first multi-scale pooling downsampling block, a second multi-scale pooling downsampling block, a first global feature fusion block, and a second global feature fusion block connected in sequence. Both the first multi-scale pooling downsampling block and the second multi-scale pooling downsampling block include downsampling layers and several multi-scale pooling modules connected in sequence; the last multi-scale pooling module in the first multi-scale pooling downsampling block is connected to the downsampling layer in the second multi-scale pooling downsampling block. Both the first global feature fusion block and the second global feature fusion block include a downsampling layer, several multi-scale pooling modules, and several wavelet-gated query attention modules connected in sequence; the last multi-scale pooling module in the second multi-scale pooling downsampling block is connected to the downsampling layer in the first global feature fusion block; the last wavelet-gated query attention module in the first global feature fusion block is connected to the downsampling layer in the second global feature fusion block.

3. The zero-watermarking method for medical images according to claim 2, characterized in that, The first multi-scale pooling downsampling block and the second multi-scale pooling downsampling block each use a quantity of... and The multi-scale pooling module; the number of the first global feature fusion block used is Multi-scale pooling modules and their number are Wavelet-gated query attention module; the second global feature fusion block uses a number of... Multi-scale pooling modules and their number are Wavelet-gated query attention module.

4. The zero-watermarking method for medical images according to claim 1, characterized in that, The training process of the hybrid Transformer network specifically includes: Medical training images of multiple body parts are acquired, and geometric and noise attacks are performed on the original medical training images to obtain damaged medical image samples. The original medical training images and damaged medical image samples are respectively input into a pre-constructed hybrid Transformer network to obtain feature vectors of the original medical training images and feature vectors of the damaged medical image samples. The cosine loss between the feature vectors of the original medical training images and the feature vectors of the damaged medical image samples is calculated. The regularization loss is calculated based on the learnable parameters of the hybrid Transformer network. The total training loss is obtained by weighted summation of the regularization loss and cosine loss, expressed as follows: ; In the formula, Total training loss; For cosine loss, Set weights for the cosine loss; For regularization loss, Set weights for the regularization loss; The parameters of the hybrid Transformer network are optimized based on the total training loss. The training process of the hybrid Transformer network is repeated iteratively until the total training loss converges and the trained hybrid Transformer network is output.

5. The zero-watermarking method for medical images according to claim 2, characterized in that, Multi-scale local features are extracted from medical images using a hybrid Transformer network with multi-scale pooling modules, specifically including: The medical image is downsampled and used as the input feature of the multi-scale pooling module. The input features of the multi-scale pooling module are divided by channel to obtain the first-level sub-features of four branches. The first-level sub-features of the four branches are input into the pooling window to obtain the second-level sub-features of the four branches. The formula is as follows: ; ; ; ; ; In the formula, , , and These are the first-level sub-features of the four branches; , , and These are the second-level sub-features output from the four branches; This indicates a partitioning operation of the input features along the channel dimension; This is a convolution with a kernel size of 1*1; For medical images; This represents the average pooling operation; After concatenating and fusing the second-level sub-features output from the four branches, the results are input into an efficient channel attention and multilayer perceptron to obtain multi-scale local features, expressed as follows: ; In the formula, It represents multi-scale local features; It is a multilayer perceptron; For efficient channel attention; This is a convolution with a kernel size of 1*1; This is for splicing and merging operations at the channel dimension.

6. The zero-watermarking method for medical images according to claim 2, characterized in that, Local-global fused features are obtained by globally modeling multi-scale local features using a wavelet-gated query attention module in a hybrid Transformer network, specifically including: Multi-scale local features are decomposed into frequency domain subbands using two-dimensional discrete wavelet transform. Frequency domain subband Frequency domain subband and frequency domain subband The formula is as follows: ; In the formula, It is a two-dimensional discrete wavelet transform; It represents multi-scale local features; For frequency domain subband Frequency domain subband Frequency domain subband and frequency domain subband Wavelet-gated adaptive denoising is used to obtain frequency domain subbands. Frequency domain subband Frequency domain subband and frequency domain subband The formula is as follows: ; In the formula, This is a convolution with a kernel size of 1*1; express Activation function; Frequency domain subband is obtained by inverse two-dimensional discrete wavelet transform. Frequency domain subband Frequency domain subband and frequency domain subband Convert to medical denoising image features; the formula is: ; In the formula, Features for medical image denoising; For wavelet-gated adaptive denoising; It represents multi-scale local features; It is the inverse two-dimensional discrete wavelet transform; A query matrix is ​​obtained by performing dimensionality reshaping operations on the features of medical denoised images, and a key matrix and a value matrix are obtained by performing dimensionality reshaping operations on multi-scale local features. An attention weight matrix is ​​generated based on the query matrix and the key matrix. The value matrix is ​​then weighted and summed using the attention weight matrix to obtain the gated denoising dual-domain fusion feature. The gated denoising dual-domain fusion features are input into a multilayer perceptron to obtain local-global fusion features, expressed as follows: ; In the formula, It is a local-global fusion feature. It is a multilayer perceptron. This is a gated denoising dual-domain fusion feature.

7. The zero-watermarking method for medical images according to claim 6, characterized in that, The query matrix is ​​obtained by performing dimensionality reshaping operations on the features of medical denoised images, and the key matrix and value matrix are obtained by performing dimensionality reshaping operations on multi-scale local features. Specifically, this includes: ; ; ; In the formula, For query matrix; V is the key matrix; V is the value matrix; For dimensional reshaping operations; Features for medical image denoising; It represents multi-scale local features; This is a convolution with a kernel size of 1*1.

8. The zero-watermarking method for medical images according to claim 6, characterized in that, An attention weight matrix is ​​generated based on the query matrix and the key matrix. The value matrix is ​​then weighted and summed using the attention weight matrix to obtain the gated denoising dual-domain fusion features, specifically including: ; In the formula, For wavelet-gated query attention function; It represents multi-scale local features; express Normalization function; For query matrix; V is the key matrix; V is the value matrix; This represents the matrix transpose operation. Represents the attention weight matrix. This represents the dimension of the key vector.

9. A zero-watermarking system for medical images based on a hybrid Transformer network, characterized in that, include: The image acquisition unit is used to acquire medical images and watermarked images; The feature extraction unit is used to input medical images into a pre-trained hybrid Transformer network. Multi-scale local features are extracted from the medical images through the multi-scale pooling module in the hybrid Transformer network. The multi-scale local features are then globally modeled through the wavelet-gated query attention module in the hybrid Transformer network to obtain local-global fusion features. The feature fusion unit inputs local-global fused features into the fully connected layer to obtain medical image feature vectors, and then converts the medical image feature vectors into feature matrices. The watermarking unit is used to binarize the feature matrix and the watermark image and perform an XOR operation to obtain a zero-watermark image.

10. An electronic terminal, characterized in that, It includes a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to perform the steps of the medical image zero-watermarking method according to any one of claims 1 to 8.