Image registration method, apparatus and device, and storage medium
By extracting image features and generating displacement fields at multiple scales, the problem of insufficient image registration performance in the existing technology is solved, and efficient and accurate image registration and interpretability improvement are achieved.
Patent Information
- Application Number
- PCT/CN2023/076415
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-04-29
- Filing Date
- 2023-02-16
- Publication Date
- 2024-09-19
AI Technical Summary
Existing image registration methods based on unsupervised learning cannot obtain the expected registration performance due to the limited ability of convolutional neural networks to capture spatial relationships, and it is difficult to accurately achieve image registration.
By extracting feature maps of image pairs to be registered at multiple scales, converting the displacement vector of each voxel into a combination of multiple displacement basis vectors, learning the displacement field, and generating the final displacement field based on the displacement field at all scales, This enables efficient and accurate image registration.
It improves the speed and accuracy of image registration, alleviates the problem of scarce annotation information in image data sets, enhances the interpretability of the registration network, and reduces the amount of calculation.
Smart Images

Figure CN2023076415_19092024_PF_FP_ABST
Abstract
Description
Image registration method, device, equipment and storage medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 29, 2022, with application number 2022104789745 and application name “Image registration method, device, equipment and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of artificial intelligence and image processing technology, and specifically to image registration technology. Background Art
[0003] Image registration, as the foundation of digital image processing, is used to perform spatial transformations (such as translation, rotation, or scale transformation) on two or more images corresponding to the same area acquired at different times, of different types, or with different imaging devices to achieve consistency. Its purpose is to find the optimal spatial transformation (i.e., the optimal deformation field or displacement field). Image registration technology can achieve functions such as image transformation and feature point extraction and matching, and has important applications in the field of medical image processing. The purpose of medical image registration is to find an optimal spatial transformation that best aligns the underlying anatomical structures, thereby helping doctors more easily observe and analyze the growth and changes of organs and lesions from multiple angles, making clinical diagnostic results more reliable and accurate.
[0004] Traditional non-learning-based image registration methods define the registration task as an optimization problem with various constraints to incorporate desirable properties such as inverse consistency, symmetry, and topological order preservation. However, these methods require iterative, computationally intensive optimization for each pair of registered images, resulting in slow optimization and difficult implementation. In recent years, a growing number of studies have begun to use deep learning methods to address image registration, achieving results superior to traditional algorithms. However, existing unsupervised learning-based image registration methods fail to achieve the desired registration performance due to factors such as the limited ability of convolutional neural networks to capture spatial relationships. This means that accurate image registration is difficult to achieve.
[0005] Summary of the Invention
[0006] In order to solve the above problems, the embodiments of the present application provide an image registration method, apparatus, device and storage medium, which can more effectively learn spatial relationships from image features, thereby achieving accurate image registration.
[0007] The present invention provides an image registration method, including:
[0008] Acquire a fixed image and a moving image to be registered;
[0009] Obtaining feature maps of the fixed image and the moving image at multiple scales;
[0010] For each scale of the multiple scales, determining a displacement field corresponding to the scale based on respective feature maps of the fixed image and the moving image at the scale, the displacement field being used to indicate a mapping from the moving image to the fixed image at the scale, wherein a displacement vector from each voxel in the moving image to a corresponding voxel in the fixed image in the displacement field is a combination of a plurality of displacement basis vectors, wherein the plurality of displacement basis vectors are obtained based on feature vectors corresponding to the voxels in the feature map of the moving image at the scale;
[0011] A final displacement field is generated based on the displacement fields corresponding to the multiple scales, and a transformation process is performed on the moving image based on the final displacement field, so that the transformed moving image is registered with the fixed image.
[0012] The present invention provides an image registration device, comprising:
[0013] an image acquisition module, configured to acquire a fixed image and a moving image to be registered;
[0014] a feature map extraction module, configured to obtain feature maps of the fixed image and the moving image at multiple scales;
[0015] a displacement field determination module configured to determine, for each scale of the plurality of scales, a displacement field corresponding to the scale based on feature maps of the fixed image and the moving image at the scale, wherein the displacement field indicates a mapping from the moving image to the fixed image at the scale, and wherein a displacement vector from each voxel in the moving image to a corresponding voxel in the fixed image in the displacement field is a combination of a plurality of displacement basis vectors, wherein the plurality of displacement basis vectors are obtained based on feature vectors corresponding to the voxels in the feature map of the moving image at the scale;
[0016] The displacement field synthesis module is configured to generate a final displacement field based on the displacement fields corresponding to the multiple scales, and transform the moving image based on the final displacement field so that the transformed moving image is aligned with the fixed image.
[0017] An embodiment of the present application provides a computer device, comprising: one or more processors; and one or more memories, wherein a computer executable program is stored in the one or more memories, and when the computer executable program is executed by the processor, the image registration method described above is performed.
[0018] An embodiment of the present application provides a computer-readable storage medium having computer-executable instructions stored thereon. When the instructions are executed by a processor, the instructions are used to implement the image registration method described above.
[0019] The present application provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the image registration method according to the embodiment of the present disclosure.
[0020] Compared to traditional image registration methods, the method provided in the embodiments of the present application significantly improves registration speed and accuracy by adopting an image registration model based on unsupervised neural network learning, while also alleviating the problem of scarce annotation information in image datasets. Furthermore, compared to existing registration methods based on unsupervised learning, the method provided in the embodiments of the present application improves the interpretability of the registration network and reduces the computational effort required for registration by facilitating the mapping from image representations to spatial relationships, rather than directly converting image representations into spatial correspondences.
[0021] The method provided in the embodiment of the present application extracts feature maps of the moving image and the fixed image in the image pair to be registered at multiple scales. At each scale, based on the feature vector corresponding to each voxel in the moving image in the corresponding feature map, the displacement vector of each voxel in the moving image is converted into a combination of multiple displacement basis vectors to learn the displacement field from the paired feature maps, and generate the final displacement field based on the displacement fields at all scales, thereby making full use of the image feature information at different scales and achieving efficient and accurate image registration. The method of the embodiment of the present application can learn the displacement field from coarse to fine based on different scales, and by fusing the displacement fields at all scales, it can fully utilize the potential information of different representation subspaces without introducing dense continuous network calculations. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] FIG1 is a schematic diagram illustrating a scenario of processing a registration request from a user terminal in an embodiment of the present application;
[0023] FIG2A is a flow chart illustrating an image registration method according to an embodiment of the present application;
[0024] FIG2B is a schematic diagram illustrating a multi-scale registration network of an image registration method according to an embodiment of the present application;
[0025] FIG2C is a schematic diagram illustrating the application of a multi-scale registration network in an embodiment of the present application;
[0026] FIG3A is a flow chart illustrating determining a displacement field from a feature map of an image pair to be registered in an embodiment of the present application;
[0027] FIG3B is a schematic diagram illustrating determining a displacement field from a feature map of an image pair to be registered in an embodiment of the present application;
[0028] FIG3C is a schematic flow chart illustrating a method for determining a displacement field from a feature map of an image pair to be registered in an embodiment of the present application;
[0029] FIG4A is a schematic diagram illustrating cascade fusion of multiple displacement fields determined at multiple scales in an embodiment of the present application;
[0030] FIG4B is a flow chart illustrating each level of fusion in the cascade fusion in an embodiment of the present application;
[0031] FIG4C is a schematic diagram illustrating the first level of fusion in the cascade fusion in an embodiment of the present application;
[0032] FIG5 is a schematic diagram showing image registration results using different methods and visualization results of deformation fields at different scales in an embodiment of the present application;
[0033] FIG6 is a schematic diagram illustrating the application of the image registration method in an embodiment of the present application;
[0034] FIG7 is a schematic diagram illustrating an image registration device in an embodiment of the present application;
[0035] FIG8 shows a schematic diagram of an image registration device in an embodiment of the present application;
[0036] FIG9 is a schematic diagram showing the architecture of an exemplary computing device in an embodiment of the present application;
[0037] FIG10 shows a schematic diagram of a storage medium in an embodiment of the present application. DETAILED DESCRIPTION
[0038] To facilitate the description of the present application, concepts related to the present application are introduced below.
[0039] The image registration method provided in the embodiment of the present application can be implemented based on artificial intelligence (AI). For the image registration method based on artificial intelligence, it can extract potential features from the image pairs to be registered in a manner similar to how humans identify the association between the image pairs to be registered by the naked eye and align the image pairs to be registered based on the association, and determine the displacement field of the image based on these features, thereby achieving image registration. Artificial intelligence, by studying the design principles and implementation methods of various intelligent machines, enables the image registration method provided in the embodiment of the present application to quickly and accurately extract various potential features in the image, thereby establishing a spatial mapping relationship between voxel pairs in the image pairs to be registered.
[0040] The image registration method provided in the embodiments of the present application can be implemented based on computer vision (CV) technology. Based on computer vision technology, the image registration method provided in the embodiments of the present application can extract feature information from the input image and achieve accurate image registration by effectively learning spatial relationships from the image features.
[0041] The image registration method provided in the embodiment of the present application can be based on deep learning technology. Deep learning technology has outstanding performance in the field of medical image analysis (such as organ or tumor segmentation, lesion detection and disease diagnosis, etc.) with its powerful learning ability and feature extraction ability. In recent years, some researchers have carried out medical image registration research based on deep learning. These studies generally include: combining deep networks with traditional registration algorithms, direct registration based on supervised learning models, and direct registration based on unsupervised learning models. For the image registration method combining deep networks with traditional registration algorithms, although the deep network has improved the efficiency of registration to a certain extent, it is still in the iterative optimization framework of traditional image registration. In addition, the feature extraction process of the deep network is separated from the image registration task. Therefore, it cannot be ensured that the features extracted by the network have adaptive descriptiveness for the registration problem. In the research on registration models based on supervised learning, the parameters of the registration model are trained by using the difference loss between the gold standard deformation and the predicted deformation as the objective function. However, the performance of the supervised registration model is usually limited by the accuracy of the supervised label information (i.e., the gold standard deformation field). For clinical medical images, the acquisition of the gold standard deformation field in the training data is very difficult and time-consuming. In the direct registration method based on the unsupervised learning model, the deformation field output by the registration network is used to perform spatial transformation on the image to be registered to generate a deformed image. Then, the registration network is trained by maximizing the similarity between the deformed image and the reference image, thereby avoiding the need for the gold standard deformation field and realizing an end-to-end unsupervised training registration model. Therefore, in an embodiment of the present application, image registration can be achieved by training an unsupervised registration network based on an unsupervised learning method.
[0042] Optionally, the image registration method provided in the embodiment of the present application can be based on a neural network. A neural network (such as a feedforward network) is a mechanism for learning to simulate the hierarchical processing of information by the human brain's visual system. By constructing a model with multiple hidden layers, different weights are assigned to the information in the input image, and multi-level and multi-angle image features are automatically extracted to better understand the input image. A convolutional neural network (CNN) is a type of feedforward neural network (FNN) that includes convolution calculations and has a deep structure. It is one of the representative algorithms of deep learning. A convolutional neural network has representation learning capabilities and can perform shift-invariant classification on input information according to its hierarchical structure. The image registration method provided in the embodiment of the present application can learn all the parameters in the registration network based on neural network training for subsequent direct use of the registration network, without the need to optimize the registration metric function each time registration is performed.
[0043] Optionally, the image registration method provided in the embodiment of the present application can also be based on the attention mechanism. The essence of the attention mechanism originates from the human visual mechanism and belongs to the brain signal processing mechanism unique to human vision, namely human attention. The attention mechanism only averages the learned features and has certain limitations. The multi-head attention mechanism is a special variation of the attention mechanism. It uses a function to calculate similarity and comprehensively learns features from different aspects of the model through multiple transformations. It is equivalent to multiple single attention mechanisms learning features from different subspaces and then splicing these features together through a combination of linear transformations. The multi-head attention mechanism uses multiple queries to select multiple information from the input information in parallel, wherein each attention mechanism focuses on different parts of the input information. In the embodiment of the present application, the multi-head attention mechanism can be used to help the registration model assign different weights to each input feature and extract more critical information. Thus, multiple displacement basis vectors and their weights used to describe the spatial transformation relationship of the image are obtained from the feature vector of the input image, fully considering the correlation between the images to be registered, and automatically learning the hidden relationship between the features of these images to improve the accuracy of image registration.
[0044] To sum up, the solution provided in the embodiment of the present application involves technologies such as artificial intelligence, unsupervised image registration, and multi-head attention mechanism. The embodiment of the present application will be further described below in conjunction with the accompanying drawings.
[0045] FIG1 is a schematic diagram of a scenario in which a registration request from a user terminal is processed in an embodiment of the present application.
[0046] In Figure 1, a user can initiate an image registration request through their user terminal, for example, by uploading a pair of images to be registered through a specific interface on the user terminal. The user terminal can then respond to the image registration request by transmitting the image data to the corresponding server via the network (or directly).
[0047] Optionally, the user terminal may specifically include a smart phone, a tablet computer, a laptop computer, a vehicle-mounted terminal, a wearable device, and the like. The user terminal may be installed with a browser or a client of various applications (including system applications and third-party applications). The network may be an Internet of Things based on the Internet and / or telecommunications network, which may be a wired network or a wireless network. For example, it may be an electronic network that can realize information exchange functions, such as a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a cellular data communication network, etc. The server may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server.
[0048] As shown in Figure 1, the server can perform image registration processing in real time based on the received image data (e.g., data of the image pair to be registered). Subsequently, the server can return the processed image registration results (e.g., the registered image pair and corresponding result data) to the user terminal via the network and display them as a response to the user's image registration request.
[0049] Image registration is a key and challenging task in image processing. It primarily studies algorithms for aligning and fusing images of the same object acquired under different conditions. In daily life, images of the same object often come from different acquisition devices, at different times, and from different perspectives. Therefore, these images need to be registered. Specifically, for a pair of images, image registration is used to find the spatial mapping relationship between the two images, thereby aligning points corresponding to the same location in the two images. This facilitates subsequent operations such as recognition, segmentation, and fusion. Image registration algorithms have widespread applications and profound impacts in various fields, including computer vision, medical image processing, and material mechanics. For example, medical imaging technology has developed rapidly in recent years, evolving from static to dynamic imaging, from morphology to function, and from two-dimensional images to three-dimensional stereoscopic images. Because human organs are easily deformed and anatomical structures undergo growth and changes at different stages of life, doctors often need to visually observe different medical images to perform registration, which is difficult for doctors who lack spatial visualization and subjective medical experience. The goal of medical image registration is to find an optimal spatial transformation that best aligns underlying anatomical structures, helping doctors more easily observe and analyze the growth and changes of organs and lesions from multiple angles, making clinical diagnoses more reliable and accurate. Medical image registration transforms the coordinates of one image (a moving image) into another (a fixed image) so that corresponding locations in the two images match, resulting in a registered image.
[0050] Registration methods can be divided into traditional registration methods and learning-based registration methods based on the different algorithms they rely on. Traditional registration methods are based on mathematical iterative optimization methods. They first define a similarity index (for example, the L2 norm) and define the registration task as an optimization problem with various constraints. In order to combine the desired characteristics (such as inverse consistency, symmetry, and topological order preservation), they continuously iteratively optimize through parametric or non-parametric transformations to maximize the similarity between the registered moving image and the fixed image. However, such registration methods require iterative and intensive calculations for each new pair of registered images, resulting in slow optimization and difficult implementation.
[0051] Compared to traditional registration methods, learning-based registration methods offer significant advantages and potential. Consequently, a growing number of researchers are studying this approach, with numerous related publications published in recent years. Learning-based registration methods are based on neural network training, where parameters are shared. The model is first trained using a large amount of data, and then the trained model is used to register new images. With the increasing application of deep learning in medical image analysis, it has achieved impressive results in organ segmentation, lesion detection, and classification. Consequently, a growing number of studies are using deep learning methods to address image registration, achieving results superior to those of traditional algorithms. Unsupervised neural networks have significantly improved registration speed and accuracy, while also alleviating the problem of scarce annotation information in image datasets. Recent unsupervised learning-based registration methods often use the unsupervised medical image registration model (VoxelMorph) as a benchmark, with the semantic segmentation network (U-Net) architecture as the primary framework to learn dense, nonlinear correspondences between input image pairs. However, these unsupervised learning-based registration methods fail to achieve the desired registration performance, due to factors such as the limited ability of convolutional neural networks to capture spatial relationships. This means they struggle to accurately achieve image registration. Furthermore, some registration methods propose using attention mechanisms to better represent spatial relationships. However, these methods focus too much on long-range dependencies between images and neglect the local nature of registration, ignoring the need to find corresponding voxels in local regions during the registration task.
[0052] In order to solve the above problems, an embodiment of the present application provides an image registration method, which converts the displacement vector at each voxel in the image into a displacement field composed of multiple displacement basis vectors determined based on image features, so as to more effectively learn spatial relationships from image features and thus achieve accurate image registration.
[0053] Compared to traditional image registration methods, the method provided by the embodiments of the present application significantly improves registration speed and accuracy by adopting an image registration model based on unsupervised neural network learning, while also alleviating the problem of scarce annotation information in image datasets. Furthermore, compared to existing registration methods based on unsupervised learning, the method provided by the embodiments of the present application improves the interpretability of the registration network and reduces the computational effort required for image registration by facilitating the mapping from image representations to spatial relationships, rather than directly converting image representations into spatial correspondences.
[0054] The method provided in the embodiment of the present application extracts feature maps of the image pair to be registered at multiple scales, and at each scale, converts the displacement vector of each voxel included in the moving image of the image pair to be registered into a combination of multiple displacement basis vectors, where the combination of the multiple displacement basis vectors is determined based on the feature vector corresponding to the voxel in the corresponding feature map, so as to learn the displacement field from the paired feature maps, and generate the final displacement field based on the displacement fields at all scales, thereby making full use of the image feature information at different scales to achieve efficient and accurate image registration. The method of the embodiment of the present application can learn the displacement field from coarse to fine based on different scales, and by fusing the displacement fields at all scales, fully utilize the potential information of different representation subspaces without introducing dense continuous network calculations.
[0055] FIG2A is a flow chart illustrating an image registration method 200 according to an embodiment of the present application. FIG2B is a schematic diagram illustrating a multi-scale registration network for the image registration method according to an embodiment of the present application. FIG2C is a schematic diagram illustrating the application of the multi-scale registration network according to an embodiment of the present application. It should be understood that the image registration method according to an embodiment of the present application can be executed by a computer device, which can specifically be a terminal device or a server.
[0056] In step 201 , a fixed image and a moving image to be registered may be acquired.
[0057] As described above, the purpose of image registration is to spatially transform the coordinates of each voxel (here, a voxel corresponds to a 3D image, for example, alternatively, a pixel in a 2D image) in the moving image of the image pair to be registered so that it is aligned with the coordinates of the corresponding voxel in the fixed image. This is to determine the displacement vector of each voxel in the moving image, thereby determining the displacement field of the moving image. A voxel is a volume element (Volume Pixel), which is conceptually similar to a pixel, the smallest unit in a 2D image space. It is the smallest unit in a 3D image space and is commonly used in fields such as 3D imaging and medical imaging, while a pixel is used in image data of 2D computer graphics.
[0058] For scenarios such as medical image registration as described above, considering that as imaging technology develops from planar images to three-dimensional images, image processing also needs to adapt to the three-dimensional images obtained. Therefore, in the following text of this application, the image registration scenario of three-dimensional images is mainly described, but this does not mean that the scope of application of the image registration method provided in the embodiment of this application is limited. The image registration method provided in the embodiment of this application can also be applied to other higher or lower dimensional image processing. The following operations on three-dimensional images are only used as examples and not as limitations.
[0059] Optionally, in the embodiment of the present application, for a three-dimensional medical image registration scenario (where the moving image and the fixed image are three-dimensional medical images), the acquired image pair to be registered can be represented as Where M is the moving image, F is the fixed image, and D, W, and H represent the depth, width, and height of the moving and fixed images, respectively. Therefore, the image registration process can be expressed as follows: For each voxel in the moving image M, find the most similar voxel in the fixed image F. The mapping function between the moving image M and the fixed image F can usually be represented by a deformation field φ consisting of the displacement vectors between each pair of voxels in the moving image M and the fixed image F.
[0060] Therefore, the image registration method provided in the embodiment of the present application aims to determine the deformation field of the moving image M. By adopting the spatial transformation network, the moving image M is mapped to the fixed image F according to the determined deformation field φ, so that the deformed moving image It can be registered to a fixed image F, where the dimensions of the deformation field φ represent the three-dimensional spatial dimensions, which correspond to the three-dimensional spatial transformation of each voxel in the moving image M. Specifically, the deformation field φ can be expressed as Id+u, where Id represents the identity transformation for the moving image M, and u represents the displacement field, which is composed of the displacement vectors between each pair of voxels in the image pair to be registered {M,F}. For example, for a two-dimensional image of size [W,H], the displacement field size is [W,H,2], while for a three-dimensional image of size [D,W,H], the displacement field size is [D,W,H,3], where the displacement field can represent the displacement of each voxel / pixel in various directions (e.g., x, y, z axes). The spatial transformation network can generate a normalized sampling network based on the displacement field, and the moving image can be sampled using this network to obtain the registered moving image.
[0061] In step 202 , feature maps of the fixed image and the moving image at multiple scales may be obtained.
[0062] Considering that different image information can be obtained from feature maps at different scales for the same image, in an embodiment of the present application, obtaining the feature maps of the fixed image and the moving image at multiple scales may include: utilizing an encoder based on a convolutional neural network to extract the feature maps of the fixed image and the moving image at different scales through different convolution blocks in the encoder, thereby obtaining the feature maps of the fixed image and the moving image at multiple scales.
[0063] Convolutional neural networks extract target features through layer-by-layer abstraction. The shallow network feature maps have high resolution, small receptive fields, strong geometric information representation capabilities, and weak semantic representation capabilities, making them suitable for processing small targets. The deep network has a large receptive field and strong semantic information representation capabilities, but the feature maps have low resolution and weak geometric information representation capabilities, making them suitable for processing large targets. For three-dimensional medical images, low-level detail feature maps capture rich spatial information and highlight the boundaries of organs; while high-level semantic feature maps contain position information and locate the location of the organs. Therefore, the moving image M and the fixed image F can be fed into the same encoder (shared weights) based on the convolutional neural network for feature extraction, so that the encoder can extract a sequence of intermediate feature maps at different scales through different convolution blocks. That is, feature maps at multiple scales are obtained. For example, FIG2B shows a case of four scales (the number of scales L = 4), where B represents the number of image pairs to be registered. As shown in FIG2B, the encoder can extract feature maps at four scales based on the moving image M and the fixed image F through different convolution blocks (the number of convolution kernels is C1, C2, C3 and C4 respectively). And for a fixed image F ), where for the same scale l, the dimensions of the feature maps of the moving image and the fixed image are the same, for example, for scale l = 3, and The dimensions are B*D3*W3*H3*C3.
[0064] It should be understood that in the embodiment of the present application, only the case of a scale of 4 is used as an example to describe the image registration process, but this is not a limitation on the number of scales. The image registration method provided in the embodiment of the present application can also use other numbers of scales to achieve image registration.
[0065] According to an embodiment of the present application, the size of the feature map of the fixed image or the moving image at a specific scale may be the size of the fixed image or the moving image reduced in accordance with the corresponding ratio. Optionally, in order to increase the receptive field, the size of the feature map at scale l may be reduced in proportion to 1 / 2 of the size of the original image. l For example, for the case of L=4, the size of the feature map of the moving image at scale l=3 can be moved to 1 / 8 of the original size of the image, that is, D3*W3*H3=(D*W*H) / 8. Of course, the size of the feature map can also be reduced based on other methods. The above-mentioned scaling down method is only used as an example and not as a limitation in this application.
[0066] Therefore, multiple displacement fields can be learned from paired feature maps of fixed and moving images at multiple scales. The displacement fields learned at all scales are fused to combine the characteristics of low-level detail feature maps and high-level semantic feature maps to obtain a more accurate displacement field.
[0067] In step 203, for each scale of the multiple scales, a displacement field corresponding to the scale can be determined based on the feature maps of the fixed image and the moving image at the scale, where the displacement field is used to indicate the mapping from the moving image to the fixed image at the scale.
[0068] As described above, a displacement field can be determined for each pair of feature maps at each scale, wherein the displacement field is composed of displacement vectors between pairs of voxels in the pair of images to be registered. According to an embodiment of the present application, in the displacement field, the displacement vector from each voxel in the moving image to the corresponding voxel in the fixed image can be a combination of multiple displacement basis vectors, and the multiple displacement basis vectors can be obtained based on the feature vectors corresponding to the voxels in the feature map of the moving image at the scale.
[0069] Unlike methods that directly convert image representations into spatial correspondences, in order to promote the mapping from image representations to spatial relationships and improve the interpretability of spatial transformations in image registration networks, in the image registration method provided in an embodiment of the present application, for the displacement field determination portion shown in FIG2B , the displacement vector between two voxels is decomposed into a combination representation of multiple displacement basis vectors based on linear algebra theory, thereby avoiding complex and poorly interpretable direct spatial correspondence conversions. According to an embodiment of the present application, determining the displacement field corresponding to the scale based on the feature maps of the fixed image and the moving image at the scale may include the steps shown in FIG3A .
[0070] FIG3A is a flow chart illustrating the determination of a displacement field from a feature map of an image pair to be registered, according to an embodiment of the present application. FIG3B is a schematic diagram illustrating the determination of a displacement field from a feature map of an image pair to be registered, according to an embodiment of the present application. FIG3C is a schematic flow chart illustrating the determination of a displacement field from a feature map of an image pair to be registered, according to an embodiment of the present application.
[0071] As shown in FIG3A , in step 2031 , for each feature vector in the feature map of the moving image at the scale, a plurality of displacement basis vectors may be generated based on the feature vector.
[0072] Optionally, for the feature map of the moving image and the feature map of the fixed image at the same scale, the combined representation of the above-mentioned multiple displacement basis vectors can be obtained by two independent branches using the multi-head attention mechanism as shown in Figure 3B. Specifically, in an embodiment of the present application, the multiple displacement basis vectors and their respective weights can be generated based on the feature vector using K attention heads, where each attention head can generate N displacement basis vectors, where K can be an integer greater than 1 and N can be a positive integer.
[0073] As shown in Figure 3B, each attention head is used to generate N displacement basis vectors, which can correspond to the branch in the upper half of Figure 3B, which operates on the feature map of the moving image. In this branch, linear projection can be used to convert each feature vector in the feature map of the moving image into N (for example, 5 are shown in Figure 3B) displacement basis vectors, wherein each displacement basis vector can be composed of three elements, which can correspond to displacements in three spatial directions, i.e., displacements on the x, y, and z axes, respectively. In order to obtain information from different representation subspaces, the image registration method provided in an embodiment of the present application is based on a multi-head attention mechanism, using K attention heads for each feature vector, and the number of displacement basis vectors for each attention head is N, thereby generating K×N displacement basis vectors for each voxel. Specifically, for the feature map of the moving image M at scale l It can be viewed as a C3-dimensional feature vector consisting of B*D3*W3*H3. For each feature vector, in each attention head, a fully connected layer outputs an N×3-dimensional vector, which can be viewed as N three-dimensional displacement basis vectors. Therefore, through K attention heads, K×N displacement basis vectors can be extracted for each feature vector. Among them, this branch only uses the feature map of the moving image to generate the displacement basis vector, which is sufficient to extract the most representative displacement basis vector to represent the most likely deformation direction of each voxel.
[0074] In step 2032, weights of the plurality of displacement basis vectors may be determined for the feature vector based on feature maps of the fixed image and the moving image at the scale.
[0075] As shown in Figure 3B , determining the weights of the multiple displacement basis vectors may correspond to the branch in the lower half of Figure 3B , which operates on the feature maps of the fixed image and the moving image. In this embodiment of the present application, for each of the K attention heads, the weights of the N displacement basis vectors are generated based on the concatenation of the feature maps of the fixed image and the moving image at the scale using the attention head.
[0076] Optionally, in this branch, by splicing the moving image and the fixed image (shown as C in the figure) feature map Linear projection is performed to learn the attention weights of the N displacement basis vectors corresponding to each attention head. Specifically, in this branch, the similarity between the voxels of the moving image and the fixed image can be learned through a linear layer and a normalized exponential function (softmax function), thereby determining the attention weights of the N displacement basis vectors (for example, in Figure 3B, the attention weights corresponding to the above five displacement basis vectors are 0.2, 0.2, 0.4, 0.1, and 0.1, respectively).
[0077] It should be noted that both linear projections are performed independently for each pair of feature vectors, resulting in fewer parameters than standard CNN or Transformer blocks. In addition, since the potential information of the voxels in the neighborhood of a voxel has been integrated into the feature vector corresponding to that voxel through the CNN-based encoder, the similarity measure is no longer limited to voxels at the same location, and the receptive field expands as the resolution of the feature map decreases.
[0078] Therefore, based on the above two independent branches, the displacement vector of the voxel corresponding to the feature vector can be determined.
[0079] In step 2033, for each eigenvector in the feature map of the moving image at the scale, a displacement field corresponding to the scale may be determined based on a plurality of displacement basis vectors corresponding to the eigenvector and their weights.
[0080] Based on the feature vectors in the moving image, the direction in which each voxel is most likely to deform is determined, and based on the similarity between the moving image and the fixed image, the relative displacement in each direction in which deformation is most likely to occur is determined. Then, based on these directions and the relative displacement in these directions, the displacement vectors of the corresponding voxels can be determined.
[0081] In an embodiment of the present application, determining the displacement field corresponding to the scale based on multiple displacement basis vectors corresponding to the feature vector and their weights may include: for the K attention heads, determining the displacement field corresponding to the scale based on the average value of the corresponding products of the N displacement basis vectors and their respective weights; wherein the displacement vector from each voxel in the moving image to the corresponding voxel in the fixed image may be a weighted sum of the multiple displacement basis vectors.
[0082] Optionally, the combined representation of the above-mentioned multiple displacement basis vectors can be a weighted sum of multiple displacement basis vectors, wherein the weights of these displacement basis vectors are determined by normalizing the attention weights of all displacement basis vectors corresponding to the same feature vector.
[0083] As mentioned above, each displacement vector in the displacement field corresponding to the scale l (l=1...L) (where k represents the number of the displacement vector in the displacement field) can be obtained by taking the average value of the sum of the products of the attention weights of all attention heads and the corresponding displacement basis vectors. For example, It can be expressed as:
[0084] in, is the i-th shift basis vector in the j-th attention head, w i,j is the attention weight of the displacement basis vector, [·] represents the concatenation operation, and fc1 and fc2 represent the mapping functions of the two branches respectively. Therefore, by determining each displacement vector in the displacement field The displacement field u at scale l can be determined l (l=1...L).
[0085] In an embodiment of the present application, in the process of determining the displacement field corresponding to each scale as described with reference to Figures 3A to 3C, by using a non-global multi-head attention mechanism, while respecting the locality of the alignment, it has fewer parameters than the solution using a standard CNN or Transformer block.
[0086] FIG3C shows, in the form of a flow chart, a method for determining the displacement field u based on the feature maps of the moving image and the fixed image at scale l, with respect to the dimensions of the feature maps of the moving image and the fixed image. l As shown in Figure 3C, the two process flows in the flowchart correspond to the two independent branches mentioned above. For the process flow on the left, the feature map of the moving image is converted into K N×3-dimensional displacement basis vectors through linear projection. Therefore, the dimension of its feature map changes from B*D l *W l *H l *C l Change to B*D l *W l *H l *(K*N*3), while in the process flow on the right, the feature maps of the moving image and the fixed image are spliced, and the dimension of the spliced feature map is B*D l *W l *H l *2C l , the spliced feature map is converted into the attention weights of the above K N×3-dimensional displacement basis vectors through the above linear projection, so the spliced feature map is changed to B*D l *W l *H l *(K*N*1). By reshaping the results of these two process flows (such as transposition transformation, etc.), the displacement field in the K attention heads can be obtained, whose dimension is B*Dl *W l *H l *K*3. Therefore, by averaging the displacement fields across all attention heads as described above, the displacement field u at scale l can be determined l , whose dimensions are B*3*D l *W l *H l .
[0087] In step 204, a final displacement field may be generated based on the displacement fields corresponding to the multiple scales, and the moving image may be transformed based on the final displacement field so that the transformed moving image is registered with the fixed image.
[0088] After determining the corresponding multiple displacement fields for feature maps at multiple scales, these displacement fields at different scales cannot be directly used as the final registration results. This is because the fine-scale displacement field has a limited receptive field and cannot represent large deformations, while the coarse-scale displacement field is too coarse to provide an accurate voxel-level displacement vector for the original image. Therefore, in the image registration method provided in the embodiments of the present application, a refinement fusion network can be used to fuse these displacement fields to combine the characteristics of the low-level detail feature map and the high-level semantic feature map to obtain a more accurate final displacement field.
[0089] In an embodiment of the present application, generating a final displacement field based on the displacement fields corresponding to each of the multiple scales may include: cascading and fusing the displacement fields corresponding to each of the multiple scales according to the scale size, so as to convert the displacement fields corresponding to each of the multiple scales into a final displacement field at the original size of the moving image.
[0090] In the image registration method provided in an embodiment of the present application, a cascade fusion network as shown in Figure 4A can be used to generate a final displacement field based on multiple displacement fields. The cascade fusion network repeatedly applies fusion blocks and convolution heads to convert displacement fields at L scales into a final displacement field at the original resolution.
[0091] FIG4A is a schematic diagram illustrating the cascade fusion of displacement fields corresponding to multiple scales in an embodiment of the present application. FIG4B is a flow chart illustrating each level of fusion in the cascade fusion in an embodiment of the present application. FIG4C is a schematic diagram illustrating the first level of fusion in the cascade fusion in an embodiment of the present application.
[0092] Optionally, for the case of L=4, cascade fusion can be performed in descending order of scale l, and the cascade fusion includes L-1 level fusion, wherein the output feature map of the fusion block of the lth level fusion is recorded as g l For the l-th level fusion, the output g of the upper level fusion can be l+1And the displacement field corresponding to this level of fusion (expressed as B*3*D l *W l *H l ), and the feature maps of the moving image and the fixed image and Generate the fusion result g of this level fusion through the fusion block l As shown in Figure 4A, for the case of L = 4, the displacement field determined at 4 scales is The final displacement field B*3*D*W*H can be obtained through 3-level fusion. Among them, for the L-1 level fusion, its input includes the displacement field corresponding to the level fusion and the feature maps of the moving image and the fixed image respectively. and In addition, there is no input of the upper fusion, but it also includes the feature extraction g of the displacement field under the scale L L .
[0093] In the embodiment of the present application, cascading and fusing the displacement fields corresponding to the multiple scales according to the scale sizes may include steps 2041 to 2044 as shown in FIG. 4B .
[0094] In step 2041, in each level of fusion in the cascade fusion, the feature map with a specific number of channels output by the previous level fusion may be upsampled to obtain a first feature map.
[0095] Optionally, as shown in (a) of FIG4C , the feature map g output by the upper fusion can be l+1 Upsampling is performed to obtain the first feature map. For example, the size of the feature map corresponding to scale l is proportionally reduced to 1 / 2 of the size of the original image. l , the output g of the upper fusion can be l+1 Perform bilinear interpolation upsampling, and the dimension of the first feature map obtained is B*3*D l *W l *H l It should be understood that other data processing methods that can achieve the same effect can also be applied to the method of the embodiment of the present application. The upsampling method in the embodiment of the present application is only used as an example and not as a limitation.
[0096] In step 2042 , feature extraction may be performed on the displacement field corresponding to the level fusion, and the displacement field may be converted into a second feature map having the specific number of channels.
[0097] Optionally, the displacement field u on scale l can be transformed into l Converted into a feature map h with a specific number of channels C (for example, C = 128, the fixed number of channels can be set according to actual needs) l, i.e. the second feature map. Similarly, in the L-1 level fusion above, the feature extraction g of the displacement field at scale L is L It can also be obtained in this way. As an example, the predetermined convolution block may include three convolution layers (for example, the number of channels is 16, 64 and 128 respectively, and the scale of each convolution layer is 1), and may be followed by group normalization and activation function (for example, ReLU activation function). It should be noted that convolution blocks of different scales do not share weights, and their convolution kernel sizes can be set to (5,5,5), (5,5,3), (5,3,3), (3,3,3) from large to small scales. It should be understood that the specific parameters of the predetermined convolution block can be set according to actual needs, and the above-mentioned specific parameter settings are only used as examples and not limitations in the embodiments of the present application.
[0098] In step 2043, the first feature map and the second feature map may be added and concatenated with the feature maps of the fixed image and the moving image at the scale corresponding to the fusion level.
[0099] Optionally, the result of the upper fusion can be combined with the displacement field information and feature map corresponding to the current fusion to generate a fusion result. l+1 Added to the feature map h extracted from the displacement field corresponding to the current fusion l (The dimension of the result of the addition is still B*3*D l *W l *H l ). Afterwards, the result of the addition can be combined with the latent representation and The result of splicing can be expressed as Here, upsample(·) represents upsampling (·). Therefore, by applying the convolution block shown in (b) in Figure 4C to the spliced result to extract feature information, the image information g of this level of fusion can be obtained. l .
[0100] In step 2044, feature extraction may be performed on the spliced result to generate a feature map with the specific number of channels as the output of the fusion at this level.
[0101] As shown in (b) of Figure 4C, the last component of the fusion block can be another convolution block, which can increase the number of channels of the output high-order potential representation (C+2C l ) is reduced to a fixed number of channels C. The convolution block can have the same structure and parameters as the predetermined convolution block described above, which will not be described here. However, it should be understood that other methods that can achieve the same purpose or effect can also be applied to the image registration method provided in the embodiment of the present application.
[0102] In an embodiment of the present application, cascading and fusing the displacement fields corresponding to the multiple scales according to the scale size may also include: extracting features from the feature map with the specific number of channels output by the first level fusion in the cascade fusion to generate the final displacement field.
[0103] As mentioned above, for the case of L=4, through the cascade fusion of L-1 fusion blocks, the final displacement field with 3 output channels is required. Optionally, the feature map g output by the first level fusion can be 1 A similar convolutional head is applied (e.g., a convolutional head containing three decoding blocks, each decoding block has two consecutive structures containing a convolution layer and an activation function (e.g., a ReLU activation function)) to generate a final displacement field with dimensions B*3*D*W*H.
[0104] In the image registration method provided in the embodiment of the present application, the intermediate displacement fields determined at multiple scales are fused by adopting a refinement fusion network as described in reference Figures 4A to 4C to generate a final displacement field. Based on the characteristics of low-level detail feature maps and high-level semantic feature maps, combined with the displacement field information and feature maps at multiple scales, high-resolution large deformation mapping capabilities are provided.
[0105] Therefore, the image registration method described above with reference to steps 201 to 204 can be represented as a schematic flowchart as shown in FIG2C . Here, by inputting the image pair to be registered into the multi-scale registration network in the embodiment of the present application, a deformation field of the moving image in the image pair to be registered can be obtained. Therefore, by applying the obtained deformation field to the moving image, a final registered image can be output.
[0106] In the image registration method provided in the embodiment of the present application, the training of the multi-scale registration network can be based on the optimization of the registration loss function. Among them, by optimizing the registration loss function based on the training data in the multi-scale registration network, the optimal parameters of the multi-scale registration network can be determined. The determined optimal parameters can be directly applied in subsequent image registration tasks without the need to re-perform the optimization calculation for real-time tasks each time. The parameters involved in operations such as convolution in the image registration method of the embodiment of the present application can be predetermined based on the optimization of the registration loss function.
[0107] Therefore, according to an embodiment of the present disclosure, the generation of the final displacement field can be based on the optimization of the registration loss function, and the registration loss function may include a first term for measuring the similarity between the transformed moving image (i.e., the moving image obtained by transforming the moving image based on the final displacement field) and the fixed image, and a second term for imposing a penalty on the displacement field to penalize the local spatial changes of the moving image.
[0108] Optionally, the image registration method provided in the embodiment of the present application can use most registration loss functions, such as the following registration loss functions:
[0109] Among them, λ is the regularization trade-off parameter.
[0110] Among them, the first The similarity between the transformed moving image and the fixed image is measured by local normalized cross-correlation, which can be expressed as:
[0111] Where Ω is the entire voxel set, and P represents the neighboring voxels of voxel p.
[0112] If you use and represents the expected value of the neighboring voxels of the fixed image and the transformed moving image at voxel p, then ΔF(q) and Can be defined as and In order to eliminate the influence of absolute gray value, the structural differences between the image pairs to be registered can be better reflected.
[0113] In the embodiment of the present disclosure, the second It can be a regularization applied to the deformation field to penalize local spatial changes in the moving image, which can be expressed as:
[0114] in, Represents the approximate spatial gradient of the displacement vector between two adjacent voxels.
[0115] Alternatively, u(p (x+1) ,p y ,p z )-u(p x ,p y ,p z ) calculated And apply similar operations to obtain and Therefore, by constraining the size of the displacement as above, it can be ensured that the moving image will not produce too much distortion.
[0116] As described above, the image registration method provided in the embodiment of the present application provides direct guidance for determining the displacement field at each scale and for the feature extractor by imposing a penalty on the displacement field at each scale.
[0117] It should be noted that in order to compute the objective function, the displacement field determined at each scale needs to be upsampled to the original size to deform the moving image.
[0118] Therefore, the total registration loss function used in the image registration method provided in the embodiment of the present application can be expressed as:
[0119] Among them, β l Represents the intermediate registration loss function at scale l The weight of .
[0120] As mentioned above, by imposing an auxiliary loss on the output determined by the displacement field at each scale, as shown in Figure 2B, additional guidance can be provided to fully utilize the representation subspace at each scale to avoid excessive distortion in moving images.
[0121] Figure 5 is a schematic diagram illustrating the image registration results using different methods and the visualization results of deformation fields at different scales in the embodiments of the present application. Figure 5 (a) shows a comparison of medical image registration results using different methods, and Figure 5 (b) shows the visualization results of deformation fields at different scales using the image registration method provided in the embodiments of the present application.
[0122] The image registration results shown in (a) and (b) of FIG5 are the registration results of magnetic resonance imaging (MRI) images of the brain, wherein curves of different depths represent the boundaries of different brain structures (for example, the two closed curves symmetrically distributed at the bottom of the MRI image correspond to the boundaries of the caudate nucleus). As shown in FIG5(a), compared with other image registration methods (such as SyN, NiftyReg, VoxelMorph, etc.), the image registration method in the embodiment of the present application can better preserve the detailed information of the medical image, and the deformed moving image (labeled "the present disclosure" in the figure) can better match the segmentation annotations of different brain structures.
[0123] The different colors of the deformation field in (a) and (b) in Figure 5 represent the degree of deformation, that is, the displacement of the voxel point, where the darker the color, the greater the displacement, and the direction of change of the curve in the deformation field indicates the displacement direction of the voxel point. As shown in Figure 5 (b), as the scale changes from small to large, the resulting deformation field gradually becomes blurred and the resolution gradually decreases. Through the image registration method of the embodiment of the present application, the characteristics of the low-level detail feature map and the high-level semantic feature map can be combined to obtain a more accurate displacement field.
[0124] FIG6 is a schematic diagram illustrating the application of the image registration method according to an embodiment of the present application.
[0125] As shown in Figure 6, the image registration method provided by the embodiment of the present application can be directly applied as a model. For example, in Figure 6 (a), the user can upload a pair of images to be registered (for example, on the front end A), and after receiving the image pair to be registered, the back end can use the model trained based on the image registration method provided by the embodiment of the present application to directly register the image pair to be registered (back end) and output the registration result (for example, on the front end B).
[0126] As shown in (b) in Figure 6, the image registration method provided in the embodiment of the present application can also be deployed through the intelligent open laboratory platform. Users can directly use the image registration method and output the registered image by dragging relevant modules (for example, image registration module) into the display interface.
[0127] FIG. 7 is a schematic diagram illustrating an image registration apparatus 700 in an embodiment of the present application.
[0128] The image registration device 700 may include an image acquisition module 701 , a feature map extraction module 702 , a displacement field determination module 703 , and a displacement field synthesis module 704 .
[0129] The image acquisition module 701 may be configured to acquire a fixed image and a moving image to be registered.
[0130] The feature map extraction module 702 may be configured to obtain feature maps of the fixed image and the moving image at multiple scales.
[0131] The displacement field determination module 703 can be configured to determine, for each scale of the multiple scales, a displacement field corresponding to the scale based on the respective feature maps of the fixed image and the moving image at the scale, wherein the displacement field is used to indicate a mapping from the moving image to the fixed image at the scale, and in the displacement field, a displacement vector from each voxel in the moving image to a corresponding voxel in the fixed image is a combination of multiple displacement basis vectors, and the multiple displacement basis vectors are obtained based on feature vectors corresponding to the voxels in the feature map of the moving image at the scale.
[0132] The displacement field synthesis module 704 may be configured to generate a final displacement field based on the multiple displacement fields determined at the multiple scales, and perform transformation processing on the moving image based on the final displacement field so that the transformed moving image is aligned with the fixed image.
[0133] Optionally, the displacement field determination module 703 may be specifically configured to:
[0134] For each eigenvector in the feature map of the moving image at the scale, generating a plurality of displacement basis vectors corresponding to the eigenvector based on the eigenvector; and determining a weight of each of the plurality of displacement basis vectors based on the feature maps of the fixed image and the moving image at the scale.
[0135] For each eigenvector in the feature map of the moving image at the scale, a displacement field corresponding to the scale is determined based on a plurality of displacement basis vectors corresponding to the eigenvector and weights thereof.
[0136] Optionally, the multiple shift basis vectors and their respective weights are generated based on the feature vector using K attention heads, where K is an integer greater than 1;
[0137] Wherein, each of the attention heads is used to generate N displacement basis vectors; N is an integer greater than or equal to 1;
[0138] For each of the K attention heads, the attention head is used to generate a weight for each of the N displacement basis vectors based on the concatenation of the feature maps of the fixed image and the moving image at the scale.
[0139] Optionally, the displacement field determination module 703 may be specifically configured to:
[0140] For the K attention heads, determining a displacement field corresponding to the scale based on an average of corresponding products of the N displacement basis vectors and their respective weights;
[0141] The displacement vector from each voxel in the moving image to the corresponding voxel in the fixed image is a weighted sum of the multiple displacement basis vectors.
[0142] Optionally, the feature map extraction module 702 may be specifically configured as follows:
[0143] Using an encoder based on a convolutional neural network, extracting feature maps of the fixed image and the moving image at different scales through different convolution blocks in the encoder to obtain feature maps of the fixed image and the moving image at multiple scales;
[0144] The size of the feature map of the fixed image or the moving image at a specific scale is the size of the fixed image or the moving image after being reduced in accordance with a corresponding ratio.
[0145] Optionally, the displacement field synthesis module 704 may be specifically configured as follows:
[0146] According to the scales, the displacement fields corresponding to the multiple scales are cascaded and fused to convert the displacement fields corresponding to the multiple scales into a final displacement field at the original size of the moving image.
[0147] Optionally, the displacement field synthesis module 704 may be specifically configured as follows:
[0148] In each level of fusion in the cascade fusion, upsampling the feature map with a specific number of channels output by the previous level fusion to obtain a first feature map;
[0149] Performing feature extraction on the displacement field corresponding to the level fusion, and converting the displacement field into a second feature map having the specific number of channels;
[0150] Adding the first feature map and the second feature map, and concatenating the added feature map with the feature maps of the fixed image and the moving image at the scale corresponding to the fusion level;
[0151] Feature extraction is performed on the spliced result to generate a feature map with the specific number of channels as the output of the fusion level.
[0152] Optionally, the displacement field synthesis module 704 may be specifically configured as follows:
[0153] Feature extraction is performed on the feature map with the specific number of channels output by the first-level fusion in the cascade fusion to generate the final displacement field.
[0154] Optionally, the generation of the final displacement field is based on optimization of a registration loss function, which includes a first term for measuring the similarity between the transformed moving image and the fixed image, and a second term for penalizing the displacement field to penalize local spatial changes of the moving image.
[0155] According to another aspect of the embodiment of the present application, an image registration device is provided, wherein the image registration device is a computer device. FIG8 shows a schematic diagram of an image registration device 2000 in an embodiment of the present application.
[0156] As shown in FIG8 , the image registration device 2000 may include one or more processors 2010 and one or more memories 2020. The memory 2020 stores computer-readable code, which, when executed by the one or more processors 2010, may execute the image registration method described above.
[0157] The processor in the embodiments of the present application can be an integrated circuit chip with signal processing capabilities. The above-mentioned processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., which can be an X86 architecture or an ARM architecture.
[0158] In general, various example embodiments of the present application can be implemented in hardware or dedicated circuits, software, firmware, logic, or any combination thereof. Certain aspects can be implemented in hardware, while other aspects can be implemented in firmware or software that can be executed by a controller, microprocessor or other computing device. When various aspects of the embodiments of the present disclosure are illustrated or described as block diagrams, flow charts, or using some other graphical representation, it will be understood that the blocks, devices, systems, techniques, or methods described herein can be implemented in hardware, software, firmware, dedicated circuits or logic, general-purpose hardware or controller or other computing device, or some combination thereof, as non-limiting examples.
[0159] For example, the method or apparatus according to the embodiment of the present application can also be implemented with the aid of the architecture of the computing device 3000 shown in FIG9 . As shown in FIG9 , the computing device 3000 may include a bus 3010, one or more CPUs 3020, a read-only memory (ROM) 3030, a random access memory (RAM) 3040, a communication port 3050 connected to a network, an input / output component 3060, a hard disk 3070, and the like. The storage device in the computing device 3000, such as the ROM 3030 or the hard disk 3070, can store various data or files used for processing and / or communication of the image registration method provided by the present disclosure, as well as program instructions executed by the CPU. The computing device 3000 may also include a user interface 3080. Of course, the architecture shown in FIG8 is merely exemplary. When implementing different devices, one or more components in the computing device shown in FIG9 may be omitted according to actual needs.
[0160] According to another aspect of the embodiment of the present application, a computer-readable storage medium is further provided. FIG10 shows a schematic diagram 4000 of a storage medium in an embodiment of the present application.
[0161] As shown in FIG10 , the computer storage medium 4020 stores computer-readable instructions 4010. When the computer-readable instructions 4010 are executed by a processor, the image registration method according to the embodiment of the present disclosure described with reference to the above figures can be executed. The computer-readable storage medium in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. The non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct memory bus random access memory (DR RAM). It should be noted that memory of the methods described herein is intended to include, but is not limited to, these and any other suitable types of memory. It should be noted that memory of the methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0162] The present application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the image registration method of the present application.
[0163] The exemplary embodiments of the present application described in detail above are merely illustrative and not restrictive. Those skilled in the art will appreciate that various modifications and combinations may be made to these embodiments or their features without departing from the principles and spirit of the present application, and such modifications should fall within the scope of the present application.
Claims
1. An image registration method, performed by a computer device, comprising: Acquire a fixed image and a moving image to be registered; Obtaining feature maps of the fixed image and the moving image at multiple scales; For each scale of the multiple scales, determining a displacement field corresponding to the scale according to feature maps of the fixed image and the moving image at the scale, the displacement field being used to indicate a mapping from the moving image to the fixed image at the scale, wherein a displacement vector from each voxel in the moving image to a corresponding voxel in the fixed image is a combination of multiple displacement basis vectors, and the multiple displacement basis vectors are obtained based on feature vectors corresponding to the voxels in the feature map of the moving image at the scale; A final displacement field is generated based on the displacement fields corresponding to the multiple scales, and a transformation process is performed on the moving image based on the final displacement field, so that the transformed moving image is registered with the fixed image.
2. The method according to claim 1, wherein determining the displacement field corresponding to the scale according to the feature maps of the fixed image and the moving image at the scale comprises: For each feature vector in the feature map of the moving image at the scale, generate a plurality of displacement basis vectors corresponding to the feature vector based on the feature vector; and determine the weights of the plurality of displacement basis vectors based on the feature maps of the fixed image and the moving image at the scale respectively; For each feature vector in the feature map of the moving image at the scale, a displacement field corresponding to the scale is determined based on a plurality of displacement basis vectors corresponding to the feature vector and weights thereof.
3. The method of claim 2, wherein the plurality of shift basis vectors and their respective weights are generated based on the feature vector using K attention heads, where K is an integer greater than 1; in, Generate N displacement basis vectors using each of the attention heads; N is an integer greater than or equal to 1; Among them, for each of the K attention heads, the attention head is used to generate the weights of the N displacement basis vectors based on the splicing of the feature maps of the fixed image and the moving image at the scale.
4. The method according to claim 3, wherein determining the displacement field corresponding to the scale based on a plurality of displacement basis vectors corresponding to the feature vector and their weights comprises: For the K attention heads, determining a displacement field corresponding to the scale based on an average of corresponding products of the N displacement basis vectors and their respective weights; The displacement vector from each voxel in the moving image to the corresponding voxel in the fixed image is a weighted sum of the multiple displacement basis vectors.
5. The method according to claim 1, wherein obtaining feature maps of the fixed image and the moving image at multiple scales comprises: Using an encoder based on a convolutional neural network, extracting feature maps of the fixed image and the moving image at different scales through different convolution blocks in the encoder to obtain feature maps of the fixed image and the moving image at multiple scales; The size of the feature map of the fixed image or the moving image at a specific scale is the size of the fixed image or the moving image after reducing the size according to a corresponding ratio.
6. The method according to claim 5, wherein generating a final displacement field based on the displacement fields corresponding to the multiple scales comprises: According to the scales, the displacement fields corresponding to the multiple scales are cascaded and fused to convert the displacement fields corresponding to the multiple scales into a final displacement field at the original size of the moving image.
7. The method according to claim 6, wherein the cascading fusion of the displacement fields corresponding to the multiple scales according to the scale size comprises: In each level of fusion in the cascade fusion, upsampling the feature map with a specific number of channels output by the previous level fusion to obtain a first feature map; Performing feature extraction on the displacement field corresponding to the level of fusion, and converting the displacement field into a second feature map having the specific number of channels; Adding the first feature map to the second feature map, and concatenating the first feature map with the feature maps of the fixed image and the moving image at the scale corresponding to the fusion at this level; Feature extraction is performed on the spliced result to generate a feature map with the specific number of channels as the output of the fusion at this level.
8. The method according to claim 7, wherein the cascading fusion of the displacement fields corresponding to the multiple scales is performed according to the scale size, further comprising: Feature extraction is performed on the feature map with the specific number of channels output by the first level fusion in the cascade fusion to generate the final displacement field.
9. The method of claim 1, wherein the generation of the final displacement field is based on optimization of a registration loss function, wherein the registration loss function includes a first term for measuring the similarity between the transformed moving image and the fixed image, and a second term for penalizing the displacement field to penalize local spatial variations of the moving image.
10. An image registration device, comprising: An image acquisition module, configured to acquire a fixed image and a moving image to be registered; A feature map extraction module is configured to obtain feature maps of the fixed image and the moving image at multiple scales; a displacement field determination module, configured to determine, for each scale of the multiple scales, a displacement field corresponding to the scale according to the feature maps of the fixed image and the moving image at the scale, the displacement field being used to indicate a mapping from the moving image to the fixed image at the scale; in the displacement field, a displacement vector from each voxel in the moving image to a corresponding voxel in the fixed image is a combination of a plurality of displacement basis vectors, the plurality of displacement basis vectors being obtained based on feature vectors corresponding to the voxels in the feature map of the moving image at the scale; The displacement field synthesis module is configured to generate a final displacement field based on the displacement fields corresponding to the multiple scales, and transform the moving image based on the final displacement field so that the transformed moving image is aligned with the fixed image.
11. The device according to claim 10, wherein determining the displacement field corresponding to the scale according to the feature maps of the fixed image and the moving image at the scale comprises: For each feature vector in the feature map of the moving image at the scale, generate a plurality of displacement basis vectors corresponding to the feature vector based on the feature vector; and determine the weights of the plurality of displacement basis vectors based on the feature maps of the fixed image and the moving image at the scale respectively; For each feature vector in the feature map of the moving image at the scale, a displacement field corresponding to the scale is determined based on a plurality of displacement basis vectors corresponding to the feature vector and weights thereof.
12. The apparatus according to claim 10, wherein the step of generating a final displacement field based on the displacement fields corresponding to the plurality of scales comprises: According to the scales, cascade fusion is performed on the displacement fields corresponding to the multiple scales, so as to convert the displacement fields corresponding to the multiple scales into a final displacement field at the original size of the moving image; The step of cascading and fusing the displacement fields corresponding to the multiple scales according to the scale sizes includes: In each level of fusion in the cascade fusion, upsampling the feature map with a specific number of channels output by the previous level fusion to obtain a first feature map; Performing feature extraction on the displacement field corresponding to the level of fusion, and converting the displacement field into a second feature map having the specific number of channels; Adding the first feature map to the second feature map, and concatenating the first feature map with the feature maps of the fixed image and the moving image at the scale corresponding to the fusion at this level; Feature extraction is performed on the spliced result to generate a feature map with the specific number of channels as the output of the fusion at this level.
13. A computer device comprising: one or more processors; as well as One or more memories, wherein a computer executable program is stored, and when the computer executable program is executed by the processor, the method of any one of claims 1-9 is performed.
14. A computer program product stored on a computer-readable storage medium and comprising computer instructions which, when executed by a processor, cause a computer device to perform the method of any one of claims 1 to 9.
15. A computer-readable storage medium having computer-executable instructions stored thereon, wherein the instructions are used to implement the method according to any one of claims 1 to 9 when executed by a processor.
