An unsupervised medical image registration method
By combining the U-shaped network framework of Swing Transformer and CNN with ghost convolution rotation transformation processing, the problem of limited receptive field size in medical image registration of convolutional neural networks is solved, realizing efficient and low-cost medical image registration and improving the accuracy and robustness of registration.
Patent Information
- Application Number
- CN202311732231.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-16
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-12-16
AI Technical Summary
Existing convolutional neural networks are limited by the size of their receptive field in medical image registration, making it difficult to effectively capture long-range spatial information in images. They also have high computational costs and are difficult to handle large-deformation registration tasks.
A U-shaped network framework combining Swin Transformer and CNN is adopted. Through ghost convolution rotation transformation processing and deformation neural network model, multiple ghost convolution rotation transformation and deformation field calculations are performed. Combined with lightweight feature extraction and local feature capture, a deformation neural network model is constructed to achieve unsupervised medical image registration.
It improves the efficiency and accuracy of image registration, reduces training overhead and computational costs, achieves registration with large deformation while incorporating more details, and ensures the effectiveness and robustness of registration.
Smart Images

Figure CN117830362B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to an unsupervised medical image registration method. Background Technology
[0002] Medical image registration (DIR) establishes a spatial correspondence between two images by optimizing an energy function. Its importance lies in the fact that it provides a powerful tool to enhance the information value of medical images, helping medical professionals better understand patients' conditions and make more accurate diagnostic and treatment decisions.
[0003] Convolutional neural networks (CNNs) have garnered significant attention in the field of medical image registration, showing geometrical improvements in both registration performance and speed compared to traditional methods. However, due to the inherent limitations of the CNN architecture, its receptive field is limited, it ignores long-term dependencies in images, and it cannot effectively capture long-range spatial information. Even with improved methods, such as incorporating numerous upsampling and downsampling functions and skip connections to enhance information flow, introducing extended convolutions to increase the receptive field size, and integrating attention mechanisms, these efforts, despite achieving excellent experimental results, are ultimately constrained by the network framework and cannot achieve significant further improvements.
[0004] One of the key factors in convolutional neural networks (CNNs) is the size of the receptive field. While combining consecutive convolutional layers and pooling operations can increase the theoretical receptive field of ConvNets, their effective receptive field remains limited, making them less efficient at capturing long-range spatial correspondences. This is crucial for image registration, which aims to identify correspondences between different parts of an image. In contrast, Transformers are widely recognized for their superior ability to capture long-range dependencies and achieve excellent performance when trained on large datasets. Transmorph combines the Swin Transformer with a CNN to design an encoder-decoder U-shaped network framework. By leveraging the complementary advantages of both, it overcomes the limitation of the pure Transformer acting solely as a low-pass filter for feature extraction. The addition of convolutional modules improves the granularity of information capture. Swin-VoxelMorph and ViT-V-Net also utilize the self-attention mechanism in Transformers to facilitate feature learning. In addition, other methods, such as AttentionReg and xmorphher, use cross-attention to simulate correspondences between moving and stationary images. In the Attention-Reg layer and each layer of xmorphher, a cross-attentionTransformer (CAT) module is used to establish the relationship between moving and stationary image features. Some studies also consider the relationship between attention and deformation estimation, such as Coordinate Translator and Deformer. Deformer uses the multiplication of the attention map and value matrix in transformer calculations to weight the prediction basis and generate the deformation field. Coordinate Translator calculates the matching score between the stationary and moving feature maps. Then, the calculated score is used to reweight the deformation field.
[0005] However, convolutional neural networks perform spatial alignment by estimating the mapping relationship between two images, but this often requires continuous iterative optimization, resulting in high computational costs and making them very cumbersome in practical applications.
[0006] In deep learning methods, as the network deepens, the receptive field of CNNs gradually expands, resulting in significant differences between features extracted at lower and higher stages. Given the limited receptive field, CNNs are limited in capturing long-distance relationships between image regions; furthermore, CNNs are insensitive to large-deformation registration tasks and cannot effectively generate distortions. Summary of the Invention
[0007] To address the aforementioned technical problems, this application provides an unsupervised medical image registration method that improves image registration efficiency by continuously learning and gaining a better understanding of the correspondence between two images during the registration task.
[0008] This application is achieved through the following technical solution: an unsupervised medical image registration method, comprising:
[0009] Acquire stationary and moving images;
[0010] The stationary image and the moving image are merged to obtain the initial merged image;
[0011] The initial merged image is segmented to obtain multiple preprocessed image blocks. The multiple preprocessed image blocks are then subjected to multiple ghost convolution rotation transformation processes to obtain multiple processed image blocks. The number of preprocessed image blocks is the same as the number of processed image blocks.
[0012] The obtained multiple processed image blocks are merged to obtain a merged processed image;
[0013] A deformation neural network model is constructed, and the merged image is input into the deformation neural network model to obtain the deformation field;
[0014] The obtained deformation field is used to distort the moving image to obtain a distorted image.
[0015] Preferably, the method for obtaining multiple processed image blocks by performing multiple ghost convolution rotation transformations on multiple preprocessed image blocks includes:
[0016] S1. Take multiple preprocessed image blocks as image blocks to be processed, and use the GT module to process the multiple image blocks to be processed to obtain processed image blocks;
[0017] S2. The processed image blocks are spliced in pairs to obtain multiple spliced image blocks, and the number of spliced image blocks is half of the processed image blocks;
[0018] S3. Take multiple stitched image blocks as image blocks to be processed, and iterate them sequentially. Stop the iteration when the number of stitched image blocks obtained reaches the set number; the final stitched image block is obtained.
[0019] S4. Take the multiple final stitched images as image blocks to be convolved, and upsample the image blocks to be convolved to obtain multiple upsampled image blocks. Perform convolution operation on the multiple upsampled image blocks and the stitched image blocks with the same number of upsampled image blocks to obtain convolved image blocks. Continue to use the convolved image blocks as image blocks to be convolved, and iterate in this way. When the number of convolved image blocks obtained is the same as the number of preprocessed images, stop the iteration and obtain the final convolved image block.
[0020] S5. Convolve the resulting final convolutional image block with the preprocessed image block to obtain the final processed image block.
[0021] Preferably, the GT module includes:
[0022] The first normalization module performs a normalization process on the input image block to be processed;
[0023] The W / SW-GMSA module performs lightweight feature extraction on the image block to be processed after one normalization process to obtain the feature image block;
[0024] The second normalization module performs secondary normalization processing on the obtained feature image blocks;
[0025] The GCF module performs lightweight feature fusion on the feature image after secondary normalization to obtain the fused image.
[0026] Preferably, the loss function of the deformation neural network model is:
[0027] In the formula: This represents the average pixel value within a local window of size n centered at pixel p; This represents the pixel value of the i-th pixel. Represents a moving image; Represents the average pixel value of a moving image; Represents the deformation field; This represents the pixel value of the i-th pixel in the distorted image.
[0028] Preferably, the method for feature extraction of the image to be processed by the W / SW-GMSA module after one normalization process includes: In the formula: These represent the q, k, and v vectors respectively during the l-th iteration of processing the image patch to be processed; This represents the total number of iterations when processing the image patch; d is a constant, and B represents the relative position offset value.
[0029] Preferably, in step S5, the final convolutional image block is convolved with the preprocessed image block, and then further convolved with the preprocessed image block to obtain multiple processed image blocks.
[0030] The beneficial effects of this application are: compared with previous methods, the proposed algorithm achieves better global feature extraction and incorporates local feature capture, realizing registration with large deformations while integrating more details; it ensures the effectiveness and robustness of registration while minimizing the overhead and cost required for training. (See attached figures.)
[0031] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1 This is a schematic diagram of the flow structure of the unsupervised medical image registration method in an embodiment of the present invention;
[0033] Figure 2 This is a schematic diagram of the process structure of ghost convolution rotation transformation in an embodiment of the present invention. Detailed Implementation
[0034] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0035] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0036] Example
[0037] like Figure 1 As shown, this embodiment provides an unsupervised medical image registration method, including:
[0038] Acquire fixed and moving images; the fixed images are medical images before surgery, and the moving images are medical images during surgery.
[0039] The stationary image and the moving image are merged to obtain the initial merged image;
[0040] The initial merged image is divided into multiple preprocessed image blocks; the size of each image block is [4,4,4], and each preprocessed image block is encoded; such as image block 1, image block 2, image block 3, image block 4, image block 5, image block 6, image block 7, image block 8, image block 9, image block 10, etc.
[0041] The initial merged image is segmented to obtain multiple preprocessed image blocks. The multiple preprocessed image blocks are then subjected to multiple ghost convolution rotation transformation processes to obtain multiple processed image blocks. The number of preprocessed image blocks is the same as the number of processed image blocks.
[0042] like Figure 2 The diagram illustrates a network structure for LTUMedReg, employing a U-shaped framework, with a three-dimensional spatial domain as the input. Volume pairs, of which Representing the image size, the merged volume is first processed by the patch embedding module and then divided into N blocks of size 2. Furthermore, the planarized non-overlapping 3D patches are used to map all tokens to a feature representation in a high-dimensional space through linear projection, with the number of N following the formula: The token is then fed into a series of GhostConv Swin Transformer blocks and patch merge blocks, where it is uniformly divided into windows to fit the image size, and multi-head attention (MSA) is computed within the windows. The window size is defined as follows: The number of windows is determined by the formula: The ground truth (GT) counts for each stage appear in pairs. In odd-numbered blocks, the MSA is calculated locally within the window, while in even-numbered blocks, it is calculated after a step size of [missing value]. MSA is calculated within the window after the cyclic shift of the voxels. The number of ground truth (GT) blocks varies at different stages. This design aims to increase the number of GT blocks because deeper feature maps contain more details, and appropriately increasing the number of GT blocks allows for more detailed and comprehensive feature information acquisition. Therefore, innovative work on GT blocks is considered to be highly effective in acquiring feature information. For the Swin Transformer in medical image registration tasks, this is an improvement. Merging patch blocks stitches together the features of each group of 8 adjacent tokens, and then the 8C features are transformed into 2C (e.g., H) through linear projection. In the decoder section, the upsampled feature maps from consecutive convolutional layers are merged with the feature maps passed from skip connections. As the number of layers decreases, consecutive convolutional layers extract local feature information from the image surface by directly acting on the original image and the image after average pooling. Finally, all information is input into the registration head and the deformation field is output.
[0043] In the specific implementation of this embodiment, the following method is followed:
[0044] S1. Input the encoded preprocessed image into the GT module to obtain the processed image block;
[0045] S2. The processed image blocks are stitched together in pairs to obtain multiple stitched image blocks, such as: image block 12; image block 34; image block 56; image block 78; image block 910, etc. That is, the image blocks are stitched together in pairs to form the stitched image blocks. If there is one image block left after stitching, it is directly used as the stitched image block.
[0046] S3. Input the stitched image blocks into the GT module for further processing, iterating sequentially until the set number is reached, then complete the iteration to obtain the final stitched image blocks, such as stitched image blocks 12345678.
[0047] S4. Take the multiple final stitched images as image blocks to be convolved, and upsample the image blocks to be convolved to obtain multiple upsampled image blocks; for example, upsample the stitched image block 12345678 into two image blocks, image block 1234 and image block 5678.
[0048] Multiple upsampled image blocks are convolved with a stitched image block of the same number of upsampled image blocks to obtain a convolutional image block. For example, the upsampled image block 1234 is convolved with the stitched image block 1234 obtained in S3 to obtain convolutional image block 1234, and the image block 5678 is convolved with the stitched image block 5678 obtained in S3 to obtain convolutional image block 5678.
[0049] Then, the convolutional image blocks 1234 and 5678 are upsampled respectively to obtain sampled image blocks 12, 34, 56 and 78.
[0050] Then, the sampled image block 12, sampled image block 34, sampled image block 56 and sampled image block 78 are convolved with the stitched image block 12, stitched image block 34, stitched image block 56 and stitched image block 78 obtained in step S3 to obtain convolved image block 12, convolved image block 34, convolved image block 56 and convolved image block 78 respectively;
[0051] Upsampling convolutional image blocks 12, 34, 56, and 78 yields sampled image blocks 1, 2, 3, 4, 5, 6, 7, and 8. Then, these sampled image blocks are convolved with image blocks 1, 2, 3, 4, 5, 6, 7, and 8 respectively to obtain convolutional image blocks 1, 2, 3, 4, 5, 6, 7, and 8.
[0052] The convolutional image blocks 1, 2, 3, 4, 5, 6, 7, and 8 are then convolved with each other to obtain the final convolutional image blocks 1, 2, 3, 4, 5, 6, 7, and 8.
[0053] S5. Merge the obtained final convolutional image blocks 1, 2, 3, 4, 5, 6, 7, and 8 to obtain the merged image.
[0054] A deformation neural network model is constructed, and the merged image is input into the deformation neural network model to obtain the deformation field;
[0055] The deformation neural network model is used to identify the deformation field in the input merged image. In this embodiment, the loss function of the deformation neural network model is: This represents the average pixel value within a local window of size n centered at pixel p; This represents the pixel value of the i-th pixel. Represents a moving image; Represents the average pixel value of a moving image; Represents the deformation field; This represents the pixel value of the i-th pixel in the distorted image.
[0056] After determining the deformation field through the deformation neural network model, the obtained deformation field is used to distort the moving image to obtain a distorted image. Specifically, during processing, the three-dimensional coordinates of each pixel in the moving image are first obtained, and then the three-dimensional distorted coordinates of each pixel after deformation are calculated using the deformation field. The distorted pixel coordinates are obtained, and the pixel value at the corresponding position is obtained from the moving image using an interpolation method and assigned to the distorted image to obtain the distorted image. This is a well-known technique in the art and will not be described in detail in this embodiment.
[0057] In another embodiment, the GT module used in this embodiment is based on the Swing Transformer and improves its internal multi-head attention calculation and feedforward neural network (represented as MLP in the current Transformer). Through experimental design and result analysis, the correlation between MSA and FNN is explored to play a decisive role in the network spatial modeling capability and the size of the computational overhead. In addition, the innovative work in this part realizes plug-and-play functionality and can be widely applied to Transformer-related networks.
[0058] In the Swing Transformer, windowed convolutional multi-head self-attention (W-MSA) uses linear projection to generate the three vectors Q, K, and V required for MSA calculation. Inspired by CvT, ghost convolution projection is applied to the calculation of the Q vector, while the K and V vectors are still calculated using linear mapping. However, unlike CvT, which uses convolutional projection across the entire image for MSA calculation, the GT block uses a mixture of convolutional and linear projection, and the MSA calculation is performed in a separate window. This compensates for the lack of local context modeling capability of linear projection and makes up for the transformer's insufficient ability to acquire local information. Regarding the computational cost of MHSA, the computational load and model parameter size are reduced due to the use of convolutional operations, allowing Transformer layer normalization to replace batch normalization, improving registration performance. Furthermore, unlike CvT's pointwise convolution, linear mapping within the window avoids overfitting. This makes it more lightweight.
[0059] The GT module shown in Figure 3 includes:
[0060] The first normalization module performs a normalization process on the input image block to be processed;
[0061] The W / SW-GMSA module performs lightweight feature extraction on the image block to be processed after one normalization process to obtain the feature image block;
[0062] The second normalization module performs secondary normalization processing on the obtained feature image blocks;
[0063] The GCF module performs lightweight feature fusion on the feature image after secondary normalization to obtain the fused image.
[0064] The calculation process is as follows:
[0065] ;
[0066] ,
[0067] ,
[0068]
[0069] and These represent the Window Ghost Convolutional MSA module and the Shifted Ghost Convolutional Window MSA module, respectively, while GCF represents the Ghost Convolution Feedforward module. and The MSA calculation in the module is shown in the formula: In the formula: These represent the q, k, and v vectors respectively during the l-th iteration of processing the image patch to be processed; This represents the total number of iterations when processing the image patch; d is a constant. B represents the parameter value; B represents the relative position offset value.
[0070] The difference is that the q vector value is calculated through convolution mapping, while k and v are the results of linear projection calculation. Conv3d is ghost convolution, which performs convolution operations on the window with a kernel size S.
[0071] MLPs, as a major component of feedforward neural networks, provide additional spatial context, but they come at a high computational cost. Heavy network training burden, numerous model parameters, and slow convergence speed have hindered the development of transformers. The Ghost Convolutional Feed Forward module (GCF) introduces ghost convolutions into MLPs as a feedforward neural network option. By combining a small number of convolutional kernels with cost-effective linear computation, it extracts feature information while reducing the computation of redundant information, thus ensuring network performance and effectively reducing computational resource consumption. GCF not only further enhances the extraction of local features but also significantly reduces the total computational cost of training and the size of model parameters, making lightweight models possible.
[0072] Compared to previous methods, the algorithm achieves better global feature extraction and incorporates local feature capture, enabling registration with large deformations while integrating more details; it ensures the effectiveness and robustness of registration while minimizing the overhead and cost of training.
[0073] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. An unsupervised medical image registration method, characterized in that, include: Acquire stationary and moving images; The stationary image and the moving image are merged to obtain the initial merged image; The initial merged image is segmented to obtain multiple preprocessed image blocks. The multiple preprocessed image blocks are then subjected to multiple ghost convolution rotation transformation processes to obtain multiple processed image blocks. The number of preprocessed image blocks is the same as the number of processed image blocks. The obtained multiple processed image blocks are merged to obtain a merged processed image; A deformation neural network model is constructed, and the merged image is input into the deformation neural network model to obtain the deformation field; The obtained deformation field is used to distort the moving image to obtain a distorted image; Methods for obtaining multiple processed image blocks by performing multiple ghost convolution rotation transformations on multiple preprocessed image blocks include: S1. Take multiple preprocessed image blocks as image blocks to be processed, and use the GT module to process the multiple image blocks to be processed to obtain processed image blocks; S2. The processed image blocks are spliced in pairs to obtain multiple spliced image blocks, and the number of spliced image blocks is half of the processed image blocks; S3. Take multiple stitched image blocks as image blocks to be processed, and iterate them sequentially. Stop the iteration when the number of stitched image blocks obtained reaches the set number; the final stitched image block is obtained. S4. Take the multiple final stitched images as image blocks to be convolved, and upsample the image blocks to be convolved to obtain multiple upsampled image blocks. Perform convolution operation on the multiple upsampled image blocks and the stitched image blocks with the same number of upsampled image blocks to obtain convolved image blocks. Continue to use the convolved image blocks as image blocks to be convolved, and iterate in this way. When the number of convolved image blocks obtained is the same as the number of preprocessed images, stop the iteration and obtain the final convolved image block. S5. Convolve the resulting final convolutional image block with the preprocessed image block to obtain the final processed image block; The GT module includes: The first normalization module performs a normalization process on the input image block to be processed; The W / SW-GMSA module performs lightweight feature extraction on the image block to be processed after one normalization process to obtain the feature image block; The second normalization module performs secondary normalization processing on the obtained feature image blocks; The GCF module performs lightweight feature fusion on the feature image after secondary normalization to obtain the fused image. The method for feature extraction of the image to be processed by the W / SW-GMSA module after one normalization process includes: ; In the formula: These represent the q, k, and v vectors in the l-th iteration when processing the image block to be processed, respectively; T represents the total number of iterations when processing the image block to be processed; d is a constant; and B represents the relative position offset value. and These represent the Window Ghost Convolutional MSA module and the Shifted Ghost Convolutional Window MSA module, respectively, while GCF represents the Ghost Convolution Feedforward module; among them, and The MSA calculation in the module is shown in the formula: ; The q vector value is calculated through convolution mapping, while k and v are the results of linear projection calculation. Conv3d is ghost convolution, which performs convolution operations on the window with a kernel size S.
2. The unsupervised medical image registration method according to claim 1, characterized in that, The loss function of the deformation neural network model is: ; In the formula: This represents the average pixel value within a local window of size n centered at pixel p; This represents the pixel value of the i-th pixel. Represents a moving image; Represents the average pixel value of a moving image; Represents the deformation field; This represents the pixel value of the i-th pixel in the distorted image.
3. The unsupervised medical image registration method according to claim 1, characterized in that: In S5, the final convolutional image block is convolved with the preprocessed image block, and then further convolved with the preprocessed image block to obtain multiple processed image blocks.
