Nuclear magnetic image Alzheimer's disease diagnosis method and system based on three-dimensional Transform

By adopting a multi-level adaptive network based on three-dimensional Transformer in nuclear magnetic imaging diagnosis, the problem that the existing technology is difficult to obtain multi-level and multi-dimensional pathological related features is solved, and higher diagnostic accuracy and efficiency are achieved.

CN119722576AActive Publication Date: 2025-03-28WUHAN UNIV

Patent Information

Application Number
CN202411621075.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-03-28
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

The existing nuclear magnetic imaging diagnostic method based on convolutional neural networks has shortcomings in modeling long-distance dependency features, making it difficult to effectively obtain multi-level and multi-dimensional pathologically related global features, resulting in loss of diagnostic accuracy.

Method used

A multi-level adaptive network based on three-dimensional Transformer is adopted to build a multi-level adaptive network through components such as voxel attention module, plaque attention module, global-local feature extraction module, Transformer encoding module, etc., to achieve multi-level and multi-dimensional attention to the lesion area.

Benefits of technology

It improves the accuracy of Alzheimer's disease diagnosis, enhances the feature extraction ability and interpretability of the model, saves computing resources, and improves diagnostic efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119722576A_ABST
    Figure CN119722576A_ABST
Patent Text Reader

Abstract

The invention discloses a nuclear magnetic image Alzheimer's disease diagnosis method and system based on a three-dimensional Transform. The method comprises the following steps: firstly, collecting data to construct a diagnostic data set, and preprocessing the data; an Alzheimer's disease diagnosis network model based on Transform is constructed and trained, and the Alzheimer's disease diagnosis network model based on Transform comprises a voxel attention module, a plaque attention module, a global-local feature extraction module, an auxiliary classification module, a Transform coding module and an overall classification module. After an Alzheimer's disease structure image to be diagnosed is preprocessed, the trained Alzheimer's disease deep diagnosis model is used for diagnosis classification. The method is beneficial to rapid and accurate Alzheimer's disease identification, improves the accuracy and efficiency of related disease identification, is beneficial to early prevention and multi-dimensional intervention, creates convenience for Alzheimer's disease patients, and reduces the burden of a public medical system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence technology, and in particular relates to a multi-level nuclear magnetic resonance imaging diagnosis method based on a three-dimensional Transformer, which can be used for automatic diagnosis of Alzheimer's disease. Background Art

[0002] Globally, the increasing incidence of dementia has put considerable pressure on public healthcare systems and has become a growing public health issue worthy of attention. Due to the lack of effective treatment for Alzheimer's disease, timely and accurate diagnostic methods are of great significance for multi-dimensional intervention and delaying the course of the disease. As a non-invasive and widely used neuroimaging method, brain MRI provides sufficient anatomical information to help interpret and analyze abnormal structural changes in the brain. Computer-assisted MRI diagnosis has gained widespread attention for its objectivity, timeliness, and economy.

[0003] With the development of deep learning algorithms, diagnostic methods based on convolutional neural networks integrate image processing, feature extraction, and diagnostic classification steps. However, methods based on convolutional neural networks have shortcomings in modeling long-distance dependent features. They can only increase the receptive field by stacking convolutional layers, making it difficult to effectively obtain multi-level and multi-dimensional pathology-related global features, resulting in a waste of computing resources. In addition, existing diagnostic methods based on convolutional neural networks cannot adaptively focus on the lesion area and cannot effectively utilize abnormal structural features, resulting in a loss of diagnostic accuracy. Summary of the invention

[0004] In view of the deficiencies in the prior art, the present invention provides a multi-level adaptive nuclear magnetic resonance imaging (MRI) Alzheimer's disease diagnosis method based on a three-dimensional Transformer, which utilizes the Transformer network structure and attention mechanism to construct a multi-level adaptive network, achieve multi-level and multi-dimensional attention to the lesion area, and thus improve the accuracy of Alzheimer's disease diagnosis.

[0005] To achieve the above object, the technical solution adopted by the present invention includes the following steps:

[0006] S1, obtain the structural MRI Alzheimer's disease dataset, pre-process the images, divide them into training set, validation set and test set according to a certain ratio, rotate, flip and perform random noise data enhancement on the training set;

[0007] S2, inputting the preprocessed image into a Transformer-based Alzheimer's disease diagnosis network model, wherein the Transformer-based Alzheimer's disease diagnosis network model includes a voxel attention module, a plaque attention module, a global-local feature extraction module, an auxiliary classification module, a Transformer encoding module, and an overall classification module;

[0008] Among them, the voxel attention module is implemented by the spatial attention mechanism, the patch attention module is implemented by the channel attention mechanism, the global-local feature extraction module is used to extract more effective global and local features, and the Transformer encoding module uses mixed attention to unify the global-local multi-level feature expression, model long-distance dependencies and form robust classification features. Finally, the auxiliary classification module and the overall classification module output the classification results.

[0009] S3, using the preprocessed training set of the Alzheimer's disease dataset to supervise the training of the Alzheimer's disease diagnosis network model based on the three-dimensional Transformer;

[0010] S4, after preprocessing the structural images of Alzheimer's disease to be diagnosed, the trained deep diagnosis model of Alzheimer's disease is used for diagnostic classification.

[0011] Furthermore, the preprocessing process described in step S1 includes: performing anterior joint-posterior joint point correction on the image, performing bias field correction on the image, nonlinearly aligning the corrected image to the standard Colin27 template, and resampling to unify the three-dimensional voxel spacing to 1×1×1, and finally removing the dura mater and skull.

[0012] Furthermore, the voxel attention module described in step S2 adopts a three-dimensional spatial attention module, first performs average pooling and maximum pooling on the input, splices the pooled features in the channel dimension, performs three-dimensional convolution on the spliced ​​features, and activates them to obtain the spatial attention weights and multiply them with the input features to obtain the voxel attention weighted features.

[0013] Furthermore, the patch attention module described in step S2 adopts an improved three-dimensional channel attention module, divides the voxel attention weighted features into fixed-size patches of 4×4×4, and expands them on the channel scale, and converts the features into one-dimensional vectors by adaptive average pooling and adaptive maximum pooling, and processes them using continuous three-dimensional convolution with a convolution kernel of 1×1×1, ReLu activation function and three-dimensional convolution with a convolution kernel of 1×1×1, adds the processed features and activates them using the Sigmoid function, and obtains the patch attention weight and multiplies it by the voxel attention weighted feature to obtain the patch attention weighted feature.

[0014] Furthermore, in the global-local feature extraction module, the input is the patch attention weighted feature, which is processed by the embedding coding module combined with the auxiliary classification module, and the output is the global feature embedding E G and local feature embedding E L ;

[0015] The input local features are attention-weighted patch feature sequences N i is the patch feature p i The number of voxels is used to screen specific regional features related to the disease, and then the local feature extraction supervision is performed through the auxiliary classification module. During the supervision process, the local features are further fed forward to the softmax function to generate the pathology-related probability of each pixel. The local voxels with the highest pathology probability within the neighborhood of 8 voxels are selected and spliced ​​into the local classification feature F. cl ; Then the embedded coding module is used to encode the plaque feature sequence And the local classification feature F cl Perform embedding coding to obtain the global feature embedding E G and local feature embedding E L ; The embedding coding module consists of a data flattening operation and a linear layer.

[0016] Further, the Transformer encoding module described in step S2 includes four consecutive Hilbert Swin Transformer attention calculation modules and Patch Merging blocks, wherein the first and third attention calculation modules are attention modules based on window attention calculation mechanism, and the second and fourth attention modules are attention modules based on shifted window attention calculation mechanism, and each attention calculation module is followed by a Patch Merging feature merging module, and the function of the feature merging module is to reduce the dimension of features step by step to extract high-dimensional features; the window-based attention calculation mechanism divides the feature map into non-overlapping windows, and the pixels perform self-attention calculation within the windows; the shifted window-based attention calculation mechanism divides the feature map into partially overlapping windows, and the windows are moved to form a new window set, and the pixels between different windows are interacted in the self-attention calculation.

[0017] Furthermore, the calculation process of the Hilbert Swin Transformer attention calculation module is as follows:

[0018] Specifically, each attention calculation module uses a multi-head attention method to perform attention calculation. Let Q, K, and V be the feature query vector, key vector, and value vector, respectively, where K and V come from the global feature embedding E G Perform linear projection and set the position code as B hil , d k is the feature dimension, Att is single-head self-attention, Multihead is multi-head self-attention, Concat is the concatenation operation, and the self-attention calculation process is as follows:

[0019]

[0020] Multihead=Concat(Att1,Att2...)W

[0021] Among them, the local feature embedding E L With global feature embedding E G Generate local eigenvector Q L With the global eigenvector Q G , the feature query vector is used as the local feature vector Q L With the global eigenvector Q G The sum of , let Layernorm represent the linear normalization layer:

[0022] Q G =Layernorm(E G )

[0023] Q L =Layernorm(E L )

[0024] Q=Q L +Q G

[0025] After the feature vector is self-attentioned in the Hilbert Swin Transformer module, the obtained attention feature vector is reshaped to restore it to a three-dimensional scale, then dimensionally reduced in Patch Merging and input into the next layer of Hilbert Swin Transformer module. The output features of the last layer of Patch Merging blocks are flattened and input into the overall classification head module, and finally the classification results are output.

[0026] Furthermore, during the attention calculation process, the relative position encoding is used to perform position encoding B on the local window in the image. hil The calculation of is implemented by Hilbert-based relative position coding. The Hilbert-based relative position coding uses the Hilbert space position coding order to perform relative position calculation, and calculates the relative position relationship between each patch block in the window to better capture local context information.

[0027] Furthermore, both the auxiliary classification head module and the overall classification head module are composed of an adaptive mean pooling layer, a batch normalization layer, a ReLu activation layer, and a linear layer.

[0028] Furthermore, the loss function for training the Alzheimer's disease diagnosis network model based on the three-dimensional Transformer includes the auxiliary classification head loss and the overall classification head loss. The loss function is the cross entropy loss. Let y be the true label. is the prediction result output by the overall classification module, The prediction results output by the auxiliary classification module are:

[0029]

[0030]

[0031] L total =αL mcls +βL acls

[0032] Where L mcls is the overall classification head loss, L acls is the auxiliary classification head loss, α and β are the weight ratios, α+β=1.

[0033] The present invention provides a nuclear magnetic resonance imaging Alzheimer's disease diagnosis system based on a three-dimensional Transformer, comprising:

[0034] A processor and a memory, the memory is used to store program instructions, and the processor is used to call the stored instructions in the memory to execute a three-dimensional Transformer-based magnetic resonance imaging Alzheimer's disease diagnosis method as described in the above technical solution.

[0035] Compared with the existing technology, the advantages and beneficial technical effects of the present invention are as follows:

[0036] (1) The multi-level adaptive MRI Alzheimer's disease diagnosis method provided by the present invention performs adaptive attention weighting at the voxel level and plaque level, guides the deep network to focus on abnormal structural lesions, reduces the weight of normal structures, and improves the model's feature extraction capability and interpretability;

[0037] (2) The multi-level adaptive nuclear magnetic resonance imaging method for diagnosing Alzheimer's disease provided by the present invention selects local classification related features from global features to form a global-local feature structure and extract multi-level image information, which is conducive to capturing the pathological conditions existing in the image from multiple levels;

[0038] (3) The multi-level adaptive magnetic resonance imaging Alzheimer's disease diagnosis method provided by the present invention uses a Hilbert Swin Transformer encoder based on hybrid attention to encode global-local features, wherein the hybrid attention mechanism integrates global-local features, models long-distance dependencies, increases the receptive field, and enhances the model's expression ability while saving computing power;

[0039] (4) The multi-level adaptive magnetic resonance imaging method for diagnosing Alzheimer's disease provided by the present invention adopts spatial position coding based on the Hilbert space curve, improves the feature sampling order in the relative position coding calculation process, strengthens the locality of spatial features, and improves the accuracy of the diagnostic model.

[0040] (5) The method and system provided by the present invention are beneficial for the rapid and accurate identification of Alzheimer's disease, improving the accuracy and efficiency of identifying related diseases, and are beneficial for early prevention and multi-dimensional intervention, creating convenience for Alzheimer's patients and reducing the burden on the public medical system. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a flow chart of the overall process of an embodiment of the present invention.

[0042] Figure 2 4 is a flowchart of preprocessing of an embodiment of the present invention.

[0043] Figure 3 is a flow chart of the attention module of an embodiment of the present invention.

[0044] Figure 4 Schematic diagram of Hilbert coding according to an embodiment of the present invention.

[0045] Figure 5 1 is a diagram of an Alzheimer's disease imaging diagnosis model according to an embodiment of the present invention.

[0046] Figure 6 2 is a comparison diagram between the embodiment of the present invention and the existing method, wherein (a) is a ROC curve and (b) is a PR curve. DETAILED DESCRIPTION

[0047] The specific implementation process of the present invention is further described below in conjunction with the accompanying drawings.

[0048] The present invention discloses a multi-level adaptive nuclear magnetic resonance imaging (MRI) Alzheimer's disease diagnosis method based on three-dimensional Transformer. Firstly, data is collected to construct a diagnostic data set, and the data is preprocessed. The training set, validation set and test set are divided according to the proportion. The input image is processed by voxel attention and plaque attention to extract weighted features of the lesion area. The global-local module is used to extract global-local features, and the Transformer module is used for feature processing. The classification module is used to perform classification diagnosis to obtain the diagnosis probability.

[0049] The Alzheimer's diagnosis model method of the preferred embodiment of the present invention is as follows: Figure 1 Specifically, the steps include:

[0050] S1: Alzheimer's imaging data collection and processing, collecting Alzheimer's clinical imaging data and constructing a diagnostic classification data set;

[0051] S2: Perform image preprocessing on the constructed diagnostic classification image dataset.

[0052] Specifically, the pre-processing part described in step S2 is as shown in the attached Figure 2 , including using MIPAV software to perform anterior-posterior joint point correction on the image, using the N4 field correction algorithm of the SimpleITK library to correct the bias field of the image, using the ANTs medical image processing tool to nonlinearly align the corrected image to the standard Colin27 template, and resampling the three-dimensional voxel spacing to 1×1×1, and finally removing the dura mater and skull. S3: For the diagnostic classification data set that has completed preprocessing, the training set, validation set, and test set are divided into a ratio of 8:1:1, and the training set is rotated, flipped, and random noise data enhancement steps are performed.

[0053] S4: Construct an Alzheimer's disease imaging diagnosis model, which includes a voxel attention module, a plaque attention module, a global-local feature extraction module, an auxiliary classification module, a Transformer encoding module and an overall classification module. The voxel attention module is implemented using a spatial attention mechanism, the plaque attention module is implemented using a channel attention mechanism, and the Transformer module is based on a three-dimensional Swin-Transfomer module. The auxiliary classification module and the overall classification module both contain an adaptive mean pooling layer, a batch normalization layer, a ReLu activation layer and a linear layer.

[0054] The voxel attention module is used to adaptively assign weights to three-dimensional structural MRI images to focus on abnormal voxel features and provide subtle deformations for uniformly aligning image voxels at a spatial scale. The plaque attention module is used to adaptively apply weights to fixed-size image plaques to focus on abnormal local structures and emphasize pathology-related structural changes. The global-local feature extraction module is used to extract more effective global and local features from the weighted image features to represent the macroscopic characteristics and microscopic abnormalities of the image. The Transformer encoding module uses mixed attention to unify the global-local multi-level feature expression, model long-distance dependencies and form robust classification features. Finally, the auxiliary classification module and the overall classification module output the classification results.

[0055] Specifically, the voxel attention module in step S4 first performs average pooling and maximum pooling on the input, concatenates the pooled features in the channel dimension, performs a three-dimensional convolution with a convolution kernel of 3×3×3 on the concatenated features, and activates them using the Sigmoid function to obtain the spatial attention weights and multiply them with the input features to obtain the voxel attention weighted features.

[0056] Specifically, the patch attention module described in step S4 adopts an improved three-dimensional channel attention module, divides the voxel attention weighted features into fixed-size patches of 4×4×4, and expands them on the channel scale, and converts the features into one-dimensional vectors by adaptive average pooling and adaptive maximum pooling, and processes them using continuous three-dimensional convolution with a convolution kernel of 1×1×1, ReLu activation function and three-dimensional convolution with a convolution kernel of 1×1×1, adds the processed features and activates them using the Sigmoid function, and obtains the patch attention weight, which is multiplied by the voxel attention weighted feature to obtain the patch attention weighted feature.

[0057] Specifically, in the global-local feature extraction module described in step S4, the input is the patch attention weighted feature, which is processed by the embedding coding module combined with the auxiliary classification module, and the output is the global feature embedding E G and local feature embedding E L The local feature is the attention-weighted patch feature sequence N i is the patch feature p i The number of local features is used to screen specific regional features related to the disease. In the local features, local patches with strong classification significance are given higher attention weights, while local patches with weak classification significance are weakened. Then, the local feature extraction supervision is performed through the auxiliary classification module. During the supervision process, the local features are further fed forward to the softmax function to generate the pathology-related probability of each pixel. The local voxels with the highest pathology probability within the neighborhood of 8 voxels are selected and spliced ​​into the local classification feature F. cl , and sent to the auxiliary classification module for classification. The local features extended along the channel are merged into global features. The global features are used to integrate all regional features of the image, model long-distance feature dependencies, measure the overall lesion situation, and finally perform diagnosis and classification through the overall classification module. The embedded coding module is used to encode the plaque feature sequence And the local classification feature F cl Perform embedding coding to obtain the global feature embedding E G and local feature embedding E L The embedding coding module consists of a data flattening operation and a linear layer.

[0058] Specifically, as attached Figure 3The Transformer encoding block described in step S4 includes four consecutive HilbertSwin Transformer attention calculation modules and Patch Merging blocks, wherein the first and third attention calculation modules are attention modules based on the window attention calculation mechanism, and the second and fourth attention modules are attention modules based on the shifted window attention calculation mechanism. Each attention calculation module is followed by a Patch Merging feature merging module, and the function of the feature merging module is to reduce the dimension of the features step by step to extract high-dimensional features. The window-based attention calculation mechanism divides the feature map into non-overlapping windows, and the pixels perform self-attention calculations in the windows; the shifted window-based attention calculation mechanism divides the feature map into partially overlapping windows, and the windows are moved to form a new window set, and the pixels between different windows are interacted in the self-attention calculation.

[0059] The Swin-Transformer encoding block calculation process is as follows:

[0060] Specifically, each attention calculation module uses a multi-head attention method to perform attention calculation. Let Q, K, and V be the feature query vector, key vector, and value vector, respectively, where K and V come from the global feature embedding E G Perform linear projection. Let the position code be B hil , d k is the feature dimension, Att is single-head self-attention, Multihead is multi-head self-attention, Concat is the concatenation operation, and the self-attention calculation process is as follows:

[0061]

[0062] Multihead=Concat(Att1, Att2...)W

[0063] Among them, the local feature embedding E L With global feature embedding E G Generate local eigenvector Q L With the global eigenvector Q G , the feature query vector is used as the local feature vector Q L With the global eigenvector Q G The sum of , let Layernorm represent the linear normalization layer:

[0064] Q G =Layernorm(E G )

[0065] Q L =Layernorm(E L )

[0066] Q=Q L +Q G

[0067] After the feature vector is self-attentioned in the Hilbert Swin Transformer module, the obtained attention feature vector is reshaped to restore it to a three-dimensional scale, then dimensionally reduced in the Patch Merging block and input into the next layer of Hilbert Swin Transformer module. The output features of the last layer of Patch Merging blocks are flattened and input into the overall classification head module, and finally the classification results are output.

[0068] Specifically, during the attention calculation process, the relative position encoding performs position encoding B on the local window in the image. hil The relative position relationship is calculated between each patch in the window to better capture local context information. Hilbert-based relative position coding uses the Hilbert spatial position coding order to perform relative position calculation, which better preserves the locality of spatial position information and avoids the phenomenon of jump sampling, making the relative position calculation more reasonable. The Hilbert coding sampling order is shown in the attached figure. Figure 4 As shown in the figure, the basic shape of the Hilbert curve is a U-shaped curve. For Hilbert sampling in three dimensions, the curve of each layer is transformed based on the curve of the previous layer. First, the current curve is divided into four parts, forming eight cubes in three dimensions. Recursively rotate and scale each part so that they are connected into a larger curve.

[0069] S5: Perform deep model training and use the divided pre-processed data to train the Alzheimer's disease imaging diagnosis model, as shown in the attached Figure 5 As shown in the network diagram, in the model, the auxiliary classification module takes local classification features as input, performs fully supervised learning on the local feature extraction part, and optimizes the network parameters through back propagation so that the network can learn more robust local features; the overall classification module takes the final features generated by the Transformer encoder model as input, and performs fully supervised learning on the overall classification effect.

[0070] Specifically, in step S5, the loss function for training the network includes the auxiliary classification head loss and the overall classification head loss. The loss function is the cross entropy loss. Let y be the true label. is the prediction result output by the overall classification module, The prediction results output by the auxiliary classification module are:

[0071]

[0072]

[0073] L total =αL mcls +βL acls

[0074] Where L mcls is the overall classification head loss, L acls is the auxiliary classification head loss, α and β are the weight ratios, α+β=1.

[0075] S6: Save the optimal overall classification model as the final diagnostic classification model.

[0076] To verify the effect of the present invention, comparative experimental data of the ADNI data set are shown in Table 1, where ACC represents accuracy, SEN represents sensitivity, SEP represents specificity, AUC represents the area under the ROC curve, and F1s represents the F1 score:

[0077]

[0078]

[0079] It can be seen that compared with general image classification models (ResNet 3D, ViT 3D and Swin-Transformer3D) and dementia-specific classification models (PT-DCN, ResAttNet, Trans-ResNet), the method of the present invention has the highest values ​​in ACC, SEN, SPE, AUC and F1s indicators, which proves the effectiveness of the method of the present invention.

[0080] The AUC curve and PR curve of the comparison method are shown in the attached figure. Figure 6 As shown in the figure, it can be seen that in the ROC curve of Figure (a) and the PR curve of Figure (b), the method of the present invention envelops the index curves of other methods and has a larger curve area, which verifies the effectiveness of the present invention.

[0081] On the other hand, an embodiment of the present invention further provides a three-dimensional Transformer-based nuclear magnetic resonance imaging Alzheimer's disease diagnosis system, comprising:

[0082] A processor and a memory, the memory is used to store program instructions, and the processor is used to call the stored instructions in the memory to execute a three-dimensional Transformer-based magnetic resonance imaging Alzheimer's disease diagnosis method as described in the above technical solution.

[0083] The present invention also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed, the Alzheimer's disease diagnosis method is implemented. Therefore, based on the method introduced in the present invention, the person skilled in the art can understand the specific structure and deformation of the computer-readable storage medium, so it is not repeated here. All computer-readable storage media used in the method of the present invention belong to the scope of protection of the present invention.

[0084] The specific embodiments described herein are merely examples of the spirit of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in similar ways, but they will not deviate from the spirit of the present invention or exceed the scope defined by the appended claims.

Claims

1. A method for diagnosing Alzheimer's disease using magnetic resonance imaging based on a three-dimensional Transformer, characterized in that: The following steps are involved: S1, obtain the structural MRI Alzheimer's disease dataset, pre-process the images, divide them into training set, validation set and test set according to a certain ratio, rotate, flip and perform random noise data enhancement on the training set; S2, inputting the preprocessed image into a Transformer-based Alzheimer's disease diagnosis network model, wherein the Transformer-based Alzheimer's disease diagnosis network model includes a voxel attention module, a plaque attention module, a global-local feature extraction module, an auxiliary classification module, a Transformer encoding module, and an overall classification module; Among them, the voxel attention module is implemented by the spatial attention mechanism, the patch attention module is implemented by the channel attention mechanism, the global-local feature extraction module is used to extract more effective global and local features, and the Transformer encoding module uses mixed attention to unify the global-local multi-level feature expression, model long-distance dependencies and form robust classification features. Finally, the auxiliary classification module and the overall classification module output the classification results. S3, using the preprocessed training set of the Alzheimer's disease dataset to supervise the training of the Alzheimer's disease diagnosis network model based on the three-dimensional Transformer; S4, after preprocessing the structural images of Alzheimer's disease to be diagnosed, the trained deep diagnosis model of Alzheimer's disease is used for diagnostic classification.

2. The method for diagnosing Alzheimer's disease based on 3D Transformer magnetic resonance imaging according to claim 1, characterized in that: The preprocessing process described in step S1 includes: performing anterior joint-posterior joint point correction on the image, performing bias field correction on the image, performing nonlinear registration on the corrected image to the standard Colin27 template, and resampling to unify the three-dimensional voxel spacing to 1×1×1, and finally removing the dura mater and skull; The voxel attention module described in step S2 adopts a three-dimensional spatial attention module, first performs average pooling and maximum pooling on the input, splices the pooled features in the channel dimension, performs three-dimensional convolution on the spliced ​​features, and activates them to obtain the spatial attention weights and multiply them with the input features to obtain the voxel attention weighted features.

3. The method for diagnosing Alzheimer's disease based on 3D Transformer magnetic resonance imaging as claimed in claim 1, characterized in that: The patch attention module described in step S2 adopts an improved three-dimensional channel attention module, divides the voxel attention weighted features into fixed-size patches of 4×4×4, and expands them on the channel scale. The features are converted into one-dimensional vectors by adaptive average pooling and adaptive maximum pooling, and are processed using continuous three-dimensional convolution with a convolution kernel of 1×1×1, ReLu activation function and three-dimensional convolution with a convolution kernel of 1×1×1. The processed features are added and activated using the Sigmoid function to obtain the patch attention weight and multiply it by the voxel attention weighted feature to obtain the patch attention weighted feature.

4. The method for diagnosing Alzheimer's disease based on 3D Transformer magnetic resonance imaging according to claim 1, characterized in that: In the global-local feature extraction module, the input is the patch attention weighted feature, which is processed by the embedding coding module combined with the auxiliary classification module, and the output is the global feature embedding E G and local feature embedding E L ; The input local features are attention-weighted patch feature sequences N i is the patch feature p i The number of voxels is used to screen specific regional features related to the disease, and then the local feature extraction supervision is performed through the auxiliary classification module. During the supervision process, the local features are further fed forward to the softmax function to generate the pathology-related probability of each pixel. The local voxels with the highest pathology probability within the neighborhood of 8 voxels are selected and spliced ​​into the local classification feature F. cl ; Then the embedded coding module is used to encode the plaque feature sequence And the local classification feature F cl Perform embedding coding to obtain the global feature embedding E G and local feature embedding E L ; The embedding coding module consists of a data flattening operation and a linear layer.

5. The method for diagnosing Alzheimer's disease based on 3D Transformer magnetic resonance imaging according to claim 1, characterized in that: The Transformer encoding module described in step S2 includes four consecutive Hilbert Swin Transformer attention calculation modules and Patch Merging blocks, wherein the first and third attention calculation modules are attention modules based on the window attention calculation mechanism, and the second and fourth attention modules are attention modules based on the shifted window attention calculation mechanism. Each attention calculation module is followed by a Patch Merging feature merging module, and the function of the feature merging module is to reduce the dimension of features step by step to extract high-dimensional features; The window-based attention calculation mechanism divides the feature map into non-overlapping windows, and the pixels perform self-attention calculation within the window; the shifted window-based attention calculation mechanism divides the feature map into partially overlapping windows, and the windows are moved to form a new window set, and the pixels between different windows are interacted in the self-attention calculation.

6. The method for diagnosing Alzheimer's disease based on 3D Transformer magnetic resonance imaging according to claim 5, characterized in that: The calculation process of the Hilbert Swin Transformer attention calculation module is as follows: Specifically, each attention calculation module uses a multi-head attention method to perform attention calculation. Let Q, K, and V be the feature query vector, key vector, and value vector, respectively, where K and V come from the global feature embedding E G Perform linear projection and set the position code as B hil , d k is the feature dimension, Att is single-head self-attention, Multihead is multi-head self-attention, Concat is the concatenation operation, and the self-attention calculation process is as follows: Multihead=Concat(Att1,Att2...)W Among them, the local feature embedding E L With global feature embedding E G Generate local eigenvector Q L With the global eigenvector Q G , the feature query vector is used as the local feature vector Q L With the global eigenvector Q G The sum of , let Layernorm represent the linear normalization layer: Q G =Layernorm(E G ) Q L =Layernorm(E L ) Q=Q L +Q G After the feature vector is self-attentioned in the Hilbert Swin Transformer module, the obtained attention feature vector is reshaped to restore it to a three-dimensional scale, then dimensionally reduced in Patch Merging and input into the next layer of Hilbert Swin Transformer module. The output features of the last layer of Patch Merging blocks are flattened and input into the overall classification head module, and finally the classification results are output.

7. The method for diagnosing Alzheimer's disease based on 3D Transformer magnetic resonance imaging according to claim 6, characterized in that: During the attention calculation process, the relative position encoding is performed on the local window in the image. hil The calculation of is implemented by Hilbert-based relative position coding. The Hilbert-based relative position coding uses the Hilbert space position coding order to perform relative position calculation, and calculates the relative position relationship between each patch block in the window to better capture local context information.

8. The method for diagnosing Alzheimer's disease based on 3D Transformer magnetic resonance imaging as claimed in claim 1, characterized in that: Both the auxiliary classification head module and the overall classification head module consist of an adaptive mean pooling layer, a batch normalization layer, a ReLu activation layer, and a linear layer.

9. The method for diagnosing Alzheimer's disease based on 3D Transformer magnetic resonance imaging as claimed in claim 1, characterized in that: The loss function for training the Alzheimer's disease diagnosis network model based on the three-dimensional Transformer includes the auxiliary classification head loss and the overall classification head loss. The loss function is the cross entropy loss. Let y be the true label. is the prediction result output by the overall classification module, The prediction results output by the auxiliary classification module are: L total =αL mcls +βL acls Where L mcls is the overall classification head loss, L acls is the auxiliary classification head loss, α and β are the weight ratios, α+β=1.

10. A 3D Transformer-based MRI Alzheimer's disease diagnosis system, characterized in that: include: A processor and a memory, the memory is used to store program instructions, and the processor is used to call the stored instructions in the memory to execute a three-dimensional Transformer-based magnetic resonance imaging Alzheimer's disease diagnosis method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Alzheimer's disease classification prediction method based on visual Transform algorithm

    CN113951834A

  • 3D medical image segmentation method based on cross fusion convolution and deformable attention Transform

    CN115830041A

  • Transform-based lung CT image super-resolution reconstruction method

    CN116797541A

  • Remote sensing image scene classification method based on mixed attention and position coding

    CN117152632A

  • Medical image segmentation method based on MATT-UNet

    CN117495879A

Cited By

  • Image coding method and device based on dynamic attention and adaptive receptive field

    CN120953721A