Multi-scale spatial information network classification method based on structural magnetic resonance imaging
By constructing a multi-scale spatial information network model based on three-dimensional sym2 wavelet transformation and graph mixed attention mechanism, the problem of insufficient mining of lesions and weak generalization capabilities in Alzheimer's classification is solved, and high accuracy and good generalization performance are achieved.
Patent Information
- Application Number
- CN202510864501.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-06-26
AI Technical Summary
The existing sMRI-based Alzheimer's classification method is insufficient in mining lesions details and has weak generalization ability on other data sets.
A multi-frequency perception fusion module based on three-dimensional sym2 wavelet transformation and a graph mixed attention mechanism module are used to build a multi-scale spatial information network model, extract multi-scale feature information through a multi-frequency perception fusion module, and flexibly model the relationship between channels and spatial position in the graph mixed attention mechanism to improve the model's lesion details mining ability and generalization performance.
High accuracy diagnosis on ADNI data sets were achieved, and generalization verification was carried out on AIBL and OASIS data sets, overcoming the generalization problem in the existing technology, and improving the accuracy and generalization ability of Alzheimer's disease classification.
Smart Images

Figure CN120375102A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical image processing, and particularly relates to a multi-scale spatial information network classification method based on structural magnetic resonance imaging. Background Art
[0002] Alzheimer's Disease (AD) is a neurodegenerative disease with progressive cognitive impairment as the main clinical feature. As the most common type of senile dementia, with the progression of the disease course, the cognitive impairment and impairment of daily living ability of AD patients show progressive aggravation. At present, there is no effective method for completely curing AD, but early intervention and comprehensive treatment strategies can delay the disease progression, significantly improve the quality of life of patients, and reduce the long-term care cost.
[0003] sMRI is a non-invasive imaging technology based on strong magnetic fields, which can provide detailed information with high resolution and high contrast on the internal anatomical structure and morphology of the brain tissue. In the diagnosis of AD, compared with other neuroimaging techniques, sMRI can not only clearly show the three-dimensional spatial distribution characteristics of AD-related brain regions such as the hippocampus, medial temporal lobe, and frontal lobe.
[0004] At present, the deep learning classification method based on sMRI is still insufficient in mining the detailed information of AD lesions, and has weak generalization ability on other data sets. Summary of the Invention
[0005] The present invention aims at the problems of insufficient mining of lesion detail information and weak generalization ability in the existing AD classification method based on sMRI. To solve the above technical problems, the present invention is implemented through the following technical solutions: The present invention proposes a multi-scale spatial information network classification method based on structural magnetic resonance imaging. The multi-scale spatial information network classification method is used in the image processing process of Alzheimer's disease. The method includes the following steps: Step 1: Obtain sMRI images from the Alzheimer's Disease Neuroimaging Initiative (ADNI) dataset, the Australian Imaging Biomarkers and Lifestyle Flagship Study of Ageing (AIBL) dataset, and the Open Access Series of Imaging Studies of Alzheimer's disease (OASIS) dataset, and perform preprocessing. Based on the preprocessed sMRI images, construct a whole-brain image dataset required for the classification model; Step 2: Divide the whole-brain image dataset constructed in Step 1 into a test set and a validation set; Step 3: Based on the test set and the validation set divided in Step 2, construct a multi-frequency perception fusion module (MFAFM) based on three-dimensional sym2 wavelet transform for multi-scale spatial information processing in the frequency domain to capture features at different levels; Step 4: Based on the features captured at different levels in Step 3, construct a graph hybrid attention mechanism module GHA. The graph hybrid attention mechanism module GHA is implemented through a dual-attention collaborative mechanism, which combines a graph channel attention mechanism and a spatial attention mechanism. Step 5: Based on the inverted residual module GHA_MB in the graph hybrid attention mechanism module GHA constructed in Step 4, use it as the backbone module of the multi-scale spatial information network model. The convolutional layer of the inverted residual module GHA_MB is implemented using an inverted residual structure. Step 6: Construct a multi-scale spatial information network model. Combine the multi-frequency perception fusion module MFAFM constructed in Step 3, the graph hybrid attention mechanism module GHA constructed in Step 4, and the inverted residual module GHA_MB constructed in Step 5, and place a classifier to complete the final classification task. Step 7: Train and validate the multi-scale spatial information network model on the Alzheimer's Disease Neuroimaging Initiative dataset ADNI, and conduct generalization validation on the Australian Imaging Biomarkers and Lifestyle Flagship Study of Ageing dataset AIBL and the Open Access Series of Imaging Studies of Alzheimer's disease dataset OASIS. Finally, obtain an Alzheimer's disease classification model.
[0006] Further, a preferred implementation is provided. The preprocessing in Step 1 includes AC-PC commissure and skull stripping, and spatial normalization to the template MIN152 operation.
[0007] Further, a preferred implementation is provided. The method for dividing the whole-brain image dataset constructed in Step 1 into a test set and a validation set in Step 2 is as follows: Perform five-fold cross-validation on the Alzheimer's Disease Neuroimaging Initiative dataset ADNI, where four parts are used as the test set and one part is used as the validation set.
[0008] Further, a preferred implementation is provided. The preprocessing in Step 1 includes AC-PC commissure and skull stripping, and spatial normalization to the template MIN152 operation.
[0009] Further, a preferred implementation is provided. The method for implementing the graph hybrid attention mechanism module GHA through a dual-attention collaborative mechanism in Step 4 is as follows: The graph channel attention mechanism is used to model the relationships between channels through a graph structure to emphasize features with rich information and suppress useless features. The spatial attention mechanism is used to quantify the feature importance of different spatial positions through a learnable spatial weight matrix and locate the specific spatial position of the lesion. The dual attention coordination mechanism is used to enable the multi-scale spatial information network model to simultaneously capture key information of the channel dimension and the spatial dimension, and the two work together to achieve adaptive enhancement of multi-scale features.
[0010] Furthermore, a preferred implementation is provided, wherein step 5 also includes the steps of expanding, processing and compressing the input features.
[0011] Further, a preferred embodiment is provided, in which the size of the whole brain image data set required for constructing the classification model using the preprocessed sMRI images in step 1 is 128 128 128-pixel whole-brain image.
[0012] Solution 2: A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any one of Solution 1 when executing the program.
[0013] Solution three: A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method as described in any one of Solution one.
[0014] The present invention is beneficial in that: The multi-frequency perception fusion module based on three-dimensional sym2 wavelet transform proposed in the present invention effectively extracts multi-scale feature information based on sMRI images. Its low-frequency components can reflect global pathological changes such as overall atrophy of the brain, while its high-frequency components can capture detailed information in the image, including edges, textures and tiny local changes. Finally, these multi-scale frequency information are fused to provide rich information for subsequent structures. The graph hybrid attention mechanism module proposed in this paper uses graph structure to flexibly model the relationship between channels, and combines the spatial attention mechanism to locate the specific spatial position of the lesion. In view of the complexity of the spatial structure of 3DMRI images, the graph hybrid attention mechanism module effectively adaptively enhances multi-scale features.
[0015] The present invention proposes a multi-scale spatial information network model based on sMRI, achieves high-accuracy diagnosis of Alzheimer's disease on the ADNI dataset, and verifies its generalization on the AIBL and OASIS datasets, overcoming the problem of weak generalization of the current sMRI-based Alzheimer's disease classification method.
[0016] The present invention is also applicable to the field of Alzheimer's disease image processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1Flowchart of the multi-scale spatial information network classification method based on structural magnetic resonance imaging described in Embodiment 1.
[0018] Figure 2 Schematic diagram of the preprocessing of sMRI brain images described in Embodiment 1.
[0019] Figure 3 Schematic diagram of the multi-scale spatial information network model constructed in Embodiment 1. Specific implementation mode
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments.
[0021] Embodiment 1. This embodiment provides a multi-scale spatial information network classification method based on structural magnetic resonance imaging. The multi-scale spatial information network classification method is used in the image processing process of Alzheimer's disease. The method includes the following steps: Step 1: Obtain sMRI images from the Alzheimer's Disease Neuroimaging Initiative dataset ADNI, the Australian Imaging Biomarkers and Lifestyle Flagship Study of Ageing dataset AIBL, and the Open Access Series of Imaging Studies of Alzheimer's Disease dataset OASIS, and perform preprocessing. Based on the preprocessed sMRI images, construct a whole-brain image dataset required for the classification model. Step 2: Divide the whole-brain image dataset constructed in Step 1 into a test set and a validation set. Step 3: Based on the test set and the validation set divided in Step 2, construct a multi-frequency perception fusion module MFAFM based on 3D sym2 wavelet transform for multi-scale spatial information processing in the frequency domain to capture features at different levels. Step 4: Based on the features at different levels captured in Step 3, construct a graph hybrid attention mechanism module GHA. The graph hybrid attention mechanism module GHA is implemented through a dual attention collaboration mechanism, and the dual attention collaboration mechanism is based on a graph channel attention mechanism and a spatial attention mechanism. Step 5: Use the inverted residual module GHA_MB in the graph hybrid attention mechanism module GHA constructed in Step 4 as the backbone module of the multi-scale spatial information network model. The backbone module is used to extract discriminative features. Step 6: Construct a multi-scale spatial information network model. Combine the multi-frequency perception fusion module MFAFM constructed in Step 3, the graph hybrid attention mechanism module GHA constructed in Step 4, and the inverted residual module GHA_MB constructed in Step 5, and place a classifier to complete the final classification task; Step 7: Train and validate the multi-scale spatial information network model on the Alzheimer's Disease Neuroimaging Initiative dataset ADNI, and conduct generalization validation on the Australian Imaging Biomarkers and Lifestyle Flagship Study of Ageing dataset AIBL and the Open Access Series of Imaging Studies of Alzheimer's disease dataset OASIS, and finally obtain an Alzheimer's disease classification model.
[0022] Embodiment 2: This embodiment further limits the multi-scale spatial information network classification method based on structural magnetic resonance imaging described in Embodiment 1. The preprocessing described in Step 1 includes AC-PC commissure and skull stripping, and spatial normalization to the template MIN152 operation.
[0023] Embodiment 3: This embodiment further limits the multi-scale spatial information network classification method based on structural magnetic resonance imaging described in Embodiment 1. The method for dividing the whole-brain image dataset constructed in Step 1 into a test set and a validation set in Step 2 is as follows: Perform five-fold cross-validation on the Alzheimer's Disease Neuroimaging Initiative dataset ADNI, where four parts are used as the test set and one part is used as the validation set.
[0024] Embodiment 4: This embodiment further limits the multi-scale spatial information network classification method based on structural magnetic resonance imaging described in Embodiment 1. The method by which the graph hybrid attention mechanism module GHA in Step 4 is realized through a dual attention cooperation mechanism is as follows: The graph channel attention mechanism is used to model the relationship between channels through a graph structure to emphasize information-rich features and suppress useless features; The spatial attention mechanism is used to quantify the feature importance of different spatial positions through a learnable spatial weight matrix and locate the specific spatial position of the lesion; The dual attention cooperation mechanism is used to enable the multi-scale spatial information network model to simultaneously capture key information in the channel dimension and the spatial dimension, and the two cooperate to achieve adaptive enhancement of multi-scale features.
[0025] Embodiment 5: This embodiment further limits the multi-scale spatial information network classification method based on structural magnetic resonance imaging described in Embodiment 1. Step 5 further includes steps of expanding, processing, and compressing the input features.
[0026] Embodiment Six: This embodiment further defines the multi-scale spatial information network classification method based on structural magnetic resonance imaging described in Embodiment One. The size of the whole-brain image dataset required for constructing the classification model using the preprocessed sMRI images in Step 1 is 128. 128 A whole-brain image of 128 pixels.
[0027] Embodiment Seven: This embodiment proposes a computer device, including a memory and a processor. A computer program is stored in the memory. When the processor runs the computer program stored in the memory, the processor executes the multi-scale spatial information network classification method based on structural magnetic resonance imaging described in any one of Embodiments One to Six.
[0028] Embodiment Eight: This embodiment proposes a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the multi-scale spatial information network classification method based on structural magnetic resonance imaging described in any one of Embodiments One to Six.
[0029] Embodiment Nine: This embodiment provides the following examples for explaining the above Embodiments One to Eight. The specific examples are as follows: See Figures 1 to 3 As shown, this embodiment proposes a multi-scale spatial information network classification method based on structural magnetic resonance imaging. The method specifically includes the following steps: Step 1: Obtain sMRI images from the Alzheimer's Disease Neuroimaging Initiative dataset (ADNI), the Australian Imaging Biomarkers and Lifestyle Flagship Study of Ageing dataset (AIBL), and the Open Access Series of Imaging Studies of Alzheimer's disease dataset (OASIS) and perform preprocessing operations. The preprocessing operations include AC-PC alignment and skull stripping, spatial normalization to the MNI152 template, and resampling. After preprocessing, a whole-brain dataset image dataset required for constructing the classification model is obtained.
[0030] Step 1.1: Download two types of sMRI images of AD and NC (normal) from the Alzheimer's Disease Neuroimaging Initiative dataset (ADNI), the Australian Imaging Biomarkers and Lifestyle Flagship Study of Ageing dataset (AIBL), and the Open Access Series of Imaging Studies of Alzheimer's disease dataset (OASIS). Then perform unified preprocessing operations on the obtained original images.
[0031] Step 1.2: The first part of the preprocessing operation is to perform AC-PC commissure operation using the SPM12 toolbox and correct the head movement of the image to eliminate the influence of the subject's head movement during data acquisition.
[0032] Step 1.3, the second part of the preprocessing operation, uses the CAT12 toolbox for skull stripping to separate non-brain tissue parts such as the skull, scalp, eyeballs, and fat from the image.
[0033] Step 1.4, the third part of the preprocessing operation, uses the CAT12 toolbox to spatially normalize the image to the template MNI152, unifying different brain images into a standard space.
[0034] Step 1.5, the fourth part of the preprocessing operation, uses the SPM12 toolbox to resample the image to obtain a whole-brain image with a size of 128 128 128 pixels.
[0035] Step 2: Divide the data preprocessed in Step 1. For the Alzheimer's Disease Neuroimaging Initiative dataset, perform five-fold cross-validation, with four parts as the test set and one part as the validation set. To verify the generalization ability of the model, a cross-dataset validation method is adopted, using the Alzheimer's Disease Neuroimaging Initiative dataset as the training set and the Australian Alzheimer's Disease Neuroimaging, Biomarkers and Lifestyle Study dataset and the Open Access Series of Alzheimer's Disease Imaging dataset OASIS as independent validation sets.
[0036] Step 3: Based on the dataset divided in Step 2, construct a multi-frequency perception fusion module based on the three-dimensional sym2 wavelet transform for multi-scale processing in the frequency domain to capture features at different levels. The construction process of this module includes the following steps: Step 3.1: Import sub-units for constructing the libraries required for importing in the multi-frequency perception fusion module, including torch, torch.nn, and torch.nn.functional.
[0037] Step 3.2: Define a function for wavelet transform coefficient conversion to construct the multi-frequency perception fusion module and extract wavelet coefficients: Define a function named _to_wavelet_coefs that receives the wavelet type parameter wavelet, supports three types: string, tensor, and Wavelet object, and converts it into wavelet filter coefficients in PyTorch tensor format. By default, the sym2 wavelet is used for transformation to maintain smoothness and signal compactness.
[0038] Step 3.3: Construct a learnable scaling module for constructing a multi-frequency perception fusion module to perform feature scaling. Define a class named _ScaleModule, initialize the __init__() method, which accepts the shape and the initial scaling factor init_scale as parameters; call super(_ScaleModule, self).__init__() to inherit from the parent class nn.Module; create a learnable scaling parameter scale using nn.Parameter; perform scaling processing on the input x using the forward propagation method forward.
[0039] Step 3.4: Construct a multi-frequency perception fusion module for constructing a multi-scale spatial information network model to perform multi-scale processing in the frequency domain to capture features at different levels. Define a class named MFAFM, initialize the __init__() method, which accepts seven parameters: the number of input channels in_channels, the number of output channels out_channels, the convolutional kernel size kernel_size, the stride stride, the bias bias, and the wavelet type wt_type; call super(MFAFM, self).__init__(); use the assert function to ensure that the number of input and output channels is the same; adopt the sym2 wavelet type and call _to_wavelet_coefs('sym2') to obtain the wavelet transform filter self.wt_filter and the inverse transform filter self.iwt_filter for the forward wavelet transform self.dwt and the inverse wavelet transform self.idwt; create a basic convolutional layer self.base_conv for preliminary feature extraction and combine it with _ScaleModule for scaling to enhance the feature expression ability; use _ScaleModule to create the wavelet_scale function to scale the features after wavelet transform to enhance stability; define three convolutions with a convolutional kernel size of 3 and dilation rates of 1, 2, and 3, named self.lowfreq_conv_1, self.lowfreq_conv_2, and self.lowfreq_conv_3 respectively, for multi-scale processing of low-frequency information; define the self.wavelet_conv function with in_channels set to in_channels 7 and out_channels set to out_channels 7. Adapt to the high-frequency information after wavelet transform; use the forward propagation method forward to perform wavelet transform on the input x through self.dwt to extract low-frequency and high-frequency features. The high-frequency features are processed by wavelet_convs, while the low-frequency features are processed by lowfreq_conv_1, lowfreq_conv_2, and lowfreq_conv_3, and mean fusion is adopted. After that, the low-frequency and high-frequency features are concatenated and uniformly scaled by wavelet_scale, and the original shape is restored through the inverse wavelet transform idwt. Then, x is put into base_conv to extract the basic features and scaled by _ScaleModule. Finally, the features x_t obtained by the inverse wavelet transform are fused with the basic convolution features x to obtain the final output.
[0040] Step 4. Based on the dataset divided in Step 2, construct a graph hybrid attention mechanism module to model the relationship between channels and spatial positions in a flexible manner. The construction process of this module is as follows: Step 4.1. Import sub-units to import the libraries needed for constructing the graph hybrid attention mechanism module, including torch, torch.nn, and torch.nn.functional.
[0041] Step 4.2: Define a class named GHA for constructing a multi-scale spatial information network model to model the relationships between channels and spatial positions in a flexible way. Initialize the __init__() method, which receives two parameters: the number of input channels in_channel and the channel compression ratio ratio. Call super(GHA, self).__init__() to inherit from the parent class nn.Module. Define the number of hidden channels hide_channel and set it to in_channel / / ratio to reduce the computational complexity. Define a global pooling layer self.avg_pool for global pooling. Define a convolutional layer self.conv1 with a kernel size of 1 for dimensionality reduction. Define self.softmax for calculating the attention weights. To construct the graph structure, define the identity matrix self.A0, which is used to represent the feature vertex itself, and define the learnable adjacency matrix self.A2 with a small initial value, which can more flexibly customize the connection relationships between any vertices. Define a convolutional layer self.conv2 with a kernel size of 1 for self-attention transformation. Define self.Relu for non-linear activation. Define a convolutional layer self.conv3 with a kernel size of 1 for calculating channel attention. Define self.Sigmoid for normalizing the weights. Define a convolutional layer self.conv4 with a kernel size of 1 for restoring the number of channels. Define a convolutional layer self.conv5 with a kernel size of 1 for calculating spatial attention. Use the forward propagation method forward to compress the spatial information of the input x through avg_pool, reduce the dimension through conv1, then calculate the attention A1 through conv2 and use the Softmax activation function to obtain the channel attention weights. Form the attention matrix D from A0, A1, and A2, where D represents the connection relationships between different feature vertices. Then update the feature vertices with D, and perform non-linear transformation using conv3 and the Relu activation function. Then use conv4 to restore the original number of channels and the Sigmoid activation function to generate the final channel attention weights, multiply them with x to obtain the recalibrated channel-level response x1. Then use avg_pool to compress the channel dimension of x1 to obtain the spatial salient information. Finally, learn the weight distribution of the spatial positions through conv5 and Sigmoid, and multiply it with x1 to achieve the spatial-level response to obtain the final output x2.
[0042] Step 5: Based on the graph hybrid attention mechanism module constructed in Step 4, construct an inverted residual module based on the graph hybrid attention mechanism, which can further capture complex channel and spatial modeling relationships while balancing the model capacity and computational efficiency. The construction process of this module is as follows: Step 5.1: Import sub-units to build the libraries required for the inverted residual module based on the graph hybrid attention mechanism, including torch, torch.nn, and torch.nn.functional.
[0043] Step 5.2: Define a convolutional module class named ConvBNActivation to build the inverted residual module. As a basic functional module, it can be reused in the backbone network or various feature fusion paths: The initialization function __init__() takes six parameters: the number of input channels in_planes, the number of output channels out_planes, the kernel size kernel_size (default is 3), the stride stride (default is 1), the number of convolution groups groups (default is 1), the optional normalization function norm_layer, and the optional activation function activation_layer; Use padding=(kernel_size-1) / / 2 to ensure that the output is the same size as the input, achieving automatic compensation for the boundary; If the normalization function and activation function are not passed in, nn.BatchNorm3d is used as the normalization layer and nn.SiLU (Swish function) is used as the activation function by default. The Swish activation function has a smoother gradient characteristic, which helps to improve the nonlinear expression ability and training stability of the model; Inherit the parent class nn.Sequential through super().__init__() and encapsulate the following three sub-modules in order: The first layer is nn.Conv3d for feature extraction in three-dimensional space, with the input channels being in_planes, the output channels being out_planes, the kernel size being kernel_size, the stride being stride, the number of groups being groups, and the bias term being turned off (bias=False) to reduce parameter redundancy. The second layer is BatchNorm3d to perform batch normalization on the convolutional output and improve training efficiency. The third layer is the SiLU activation function to introduce non-linear features; As a basic functional module, it can be reused in the backbone network or various feature fusion paths, providing unified feature mapping capabilities and flexible structural configurations.
[0044] Step 5.3: Define a class named InvertedResidualConfig to construct the structural configuration parameters of the inverted residual module InvertedResidual. The initialization function __init__() takes the following ten parameters: kernel size of the convolution kernel kernel, number of input channels input_c, number of output channels out_c, channel expansion ratio expanded_ratio, stride stride, whether to use the GHA module use_GHA, random dropout rate drop_rate for the residual path, module number identifier index, and whether to enable the multi-frequency awareness fusion module use_MFAFM. Define self.input, self.kernel, self.out_c, self.use_GHA, self.drop_rate, self.index, self.use_MFAFM in sequence. In addition, define self.expanded_c = self.input_c * expanded_ratio to determine whether channel expansion convolution is required.
[0045] Step 5.4: Define a class named InvertedResidual to construct an inverted residual module based on the graph hybrid attention mechanism to further capture complex channel and spatial modeling relationships. The initialization function __init__() takes two parameters: a configuration object cnf of the InvertedResidualConfig class, which contains all the structural settings of the current module (including the number of channels, stride, convolution type, attention mechanism, etc.), and a normalization layer constructor norm_layer. Inherit from the parent class nn.Module through super(InvertedResidual_3d, self).__init__(). Set the residual connection strategy judgment. When stride = 1 and the input and output channels are the same, enable the residual connection; otherwise, do not enable it. Create an ordered dictionary named layers to store sub-modules in order. The activation function activation_layer is default set to nn.SiLU. Set the multi-frequency perception fusion module strategy judgment, whether to enable the multi-frequency perception fusion module to replace the ConvBNActivation convolution layer, and further judge whether to enable channel expansion. If expanded_c ≠ input_c, perform convolution with a kernel size of 1 for channel expansion. Set the judgment whether to enable the GHA module. Perform convolution with a kernel size of 1 to compress the expanded channels expanded_c to the output channels out_c. Define a self.block to pass the previously defined layers as parameters to nn.Sequential and assign it to self.block. Set a self.dropout to randomly discard some elements of the input to prevent overfitting. Use the forward propagation method forward to pass the input x through the constructed self.block in sequence. Then, if dropout is enabled in the configuration, perform a dropout operation on the main branch output. If the current module enables the residual connection, add the main branch output to the input x to form the final output.
[0046] Step 6: Based on the graph hybrid attention mechanism module and the inverted residual module based on the graph hybrid attention mechanism constructed in Steps 4 and 5 respectively, construct a multi-scale spatial information network model, combine important modules such as MFAFM, GHA, and GHA_MB, and set a classifier to complete the final classification task.
[0047] Step 6.1: Import sub-units to construct a multi-scale spatial information network model. Import the required libraries, including torch, torch.nn, torch.nn.functional, GHA, ConvBNActivation, and InvertedResidua.
[0048] Step 6.2: Define a class named MSIN for constructing a multi-scale spatial information network model. The initialization function __init__() takes multiple parameters, including the number of classes num_classes (default is 2), dropout rate dropout_rate (default is 0.2), drop connect rate drop_connect_rate (default is 0.2), an optional basic module block (default is InvertedResidual), and an optional normalization function norm_layer (default is nn.BatchNorm3d). Inherit from the parent class nn.Module through super(EfficientNet_b0_3d,self).__init__(). Then, configure the modules through default_cnf, including the convolutional kernel size, number of input and output channels, expansion ratio, stride, whether to enable graph hybrid attention mechanism, drop connect rate, whether to enable multi-frequency perception fusion module, and the number of module repetitions. Next, create a layer structure to combine multiple configured modules. Define a self.avgpool for global average pooling to compress all features to a 1x1 spatial size. Define a classifier self.classifier for classification using nn.Linear and use nn.dropout to prevent overfitting. Use the forward propagation method forward to process the input x layer by layer through the convolutional blocks of each stage and finally return the classification result.
[0049] Step 7: Based on the multi-scale spatial information network model in Step 6, train and validate the model performance. Use it to train and validate on the ANDI dataset for the multi-scale spatial information network model, and conduct generalization validation on the AIBL and OASIS datasets. Finally, obtain an Alzheimer's disease classification model.
[0050] Step 7.1: Define a class named NiiDataset to encapsulate medical image data for obtaining the data required to train and validate the model. This class inherits from the Dataset class in PyTorch. Its main function is to read NIfTI format image data in the specified root directory. In the __init__ method, it receives the root directory path root_dir as a parameter, obtains the full paths of all samples by traversing the subdirectories therein (such as AD and CN), and stores them in the self.file_list list. Construct a mapping dictionary class_to_idx from category to index for representing categories with numerical labels during training. In the __getitem__ method, obtain the corresponding image path by index, read the.nii file using the nibabel library, convert it to a NumPy array, perform normalization processing, and then convert it to the tensor format of PyTorch. Finally, return the image tensor, the corresponding category label, and the image path for subsequent training and classification analysis; Step 7.2: To evaluate the performance of the model in the Alzheimer's disease recognition task, this study uses the five-fold cross-validation method to effectively evaluate the results of model training and validation. During this process, the StratifiedFold function is used to partition the ANDI dataset to ensure that the category proportions in each fold are consistent, thus avoiding interference from category imbalance on model performance evaluation. In each fold, the training set and the validation set are respectively encapsulated as datasets of the Subset type, and corresponding data loaders are created with the help of torch.utils.data.DataLoader. In the training loader train_loader, shuffle=True is set to shuffle the sample order to improve the generalization ability of the model. In the validation loader test_loader, shuffle=False is set to ensure the stability of the evaluation process; Step 7.3: Set the experimental parameters for model training and validation. Define the training model function MSIN, set the number of categories to 2, the loss function to CrossEntropyLoss, and the optimizer to SGD (learning rate is 0.001). The model training runs for a total of 100 epochs. After each round of training, validation is performed, and the training loss and accuracy of the current round, as well as the prediction results and accuracy of the validation set, are recorded. During the validation phase, the model is in the evaluation mode, and gradient updates are turned off by torch.no_grad() to save computing resources, and the validation loss and accuracy of each round are recorded. If the validation accuracy of the current round is higher than the historical best value, update the "best validation accuracy" of this fold and its corresponding round. Finally, calculate and output the average accuracy ACC and the area under the curve AUC in the five-fold validation to evaluate the stability and reliability of the overall performance of the model.
[0051] Step 7.4: We adopt a cross-dataset validation method to verify the generalization ability of the model. Using ADNI as the training set and AIBL and OASIS-2 as independent validation sets, we conduct a generalization experiment. Its parameter settings are consistent with the main experiment. Finally, we calculate and output the accuracy value ACC and the area under the curve AUC of the model to evaluate the generalization ability of the overall model performance.
[0052] This invention uses sMRI as input data, extracts multi-scale frequency information through a multi-frequency perception fusion module based on three-dimensional sym2 wavelet transform, and flexibly models the relationships between channels and spatial positions using a graph hybrid attention module, thereby enhancing the model's ability to mine detailed information about sMRI lesions and its generalization performance.
[0053] Next, combined with specific experimental data, we further explain the technical solutions and their technical effects of this invention.
[0054] In this experiment, the baseline model (Baseline) is set as follows: Replace the graph hybrid attention module (GHA) in the multi-scale spatial information network model with a squeeze-and-excitation module (SE), and at the same time replace the multi-frequency perception fusion module (MFAFM) with ordinary convolution operations. Subsequently, by gradually introducing the MFAFM module and the GHA module, we explore the impact of each key module on the model performance. The experiment is conducted on the ADNI dataset, and the classification task is a binary classification problem of Alzheimer's disease (AD) and normal control (NC). The experimental results are shown in Table 1. It can be seen from the data in Table 1 that after adding the multi-frequency perception fusion module (MFAFM) to the baseline model, the accuracy is increased to 92.13% ± 1.24, and the AUC is increased to 93.82% ± 0.98, indicating that the MFAFM module has strong ability in extracting multi-frequency features and can effectively enhance the model's ability to recognize the brain structure features of Alzheimer's disease; after further introducing the graph hybrid attention module (GHA), the performance of the model is further improved, reaching an accuracy of 92.91% ± 1.03 and an AUC value of 94.42% ± 0.84. Compared with the baseline model, it is increased by 2.67% and 2.03% respectively, and the standard deviation is smaller, indicating that the GHA module proposed in this invention has significant advantages in integrating spatial structure information.
[0055] To verify the performance advantages and good generalization ability of the multi-scale spatial information network model (MSIN) described in the present invention in the Alzheimer's disease classification task, comparative experiments were conducted on three publicly available datasets, namely ADNI, AIBL, and OASIS, with the currently widely used classical 3D classification models (including 3D ResNet50, 3D DenseNet121, 3D EfficientNetB0, and 3D ViT). As shown in Table 2, on multiple datasets, the model proposed in the present invention is superior to the prior art in evaluation metrics such as accuracy and AUC, demonstrating stronger classification ability and cross-dataset generalization performance, further verifying the practical value and technological advancement of the model of the present invention in Alzheimer's disease diagnosis.
[0056] Table 1 Ablation Experiment
[0057] Table 2 Comparative Experiment with Other Classical Classification Models
[0058] Those skilled in the art can understand that the features recited in the various embodiments and / or claims of the present disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly recited in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the various embodiments of the present disclosure can be combined in various ways. All such combinations fall within the scope of the present disclosure.
[0059] Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications falling within the scope of the present invention. Obviously, those skilled in the art can make various changes and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.
Claims
1. A multi-scale spatial information network classification method based on structural magnetic resonance imaging, characterized in that The multi-scale spatial information network classification method is used in the image processing of Alzheimer's disease. The method includes the following steps: Step 1: Obtain sMRI images from the Alzheimer's Disease Neuroimaging Initiative dataset (ADNI), the Australian Imaging Biomarkers and Lifestyle Flagship Study of Ageing dataset (AIBL), and the Open Access Series of Imaging Studies of Alzheimer's Disease dataset (OASIS), and perform preprocessing. Based on the preprocessed sMRI images, construct a whole-brain image dataset required for the classification model; Step 2: Divide the whole-brain image dataset constructed in Step 1 into a test set and a validation set; Step 3: Based on the test set and validation set divided in Step 2, construct a multi-frequency perception fusion module (MFAFM) based on 3D sym2 wavelet transform for multi-scale spatial information processing in the frequency domain to capture features at different levels; Step 4: Based on the features at different levels captured in Step 3, construct a graph hybrid attention mechanism module (GHA). The graph hybrid attention mechanism module GHA is implemented through a dual-attention collaboration mechanism, which is based on a graph channel attention mechanism and a spatial attention mechanism; Step 5: Use the inverted residual module GHA_MB in the graph hybrid attention mechanism module GHA constructed in Step 4 as the backbone module of the multi-scale spatial information network model. The backbone module is used to extract discriminative features; Step 6: Construct a multi-scale spatial information network model, combine the multi-frequency perception fusion module MFAFM constructed in Step 3, the graph hybrid attention mechanism module GHA constructed in Step 4, and the inverted residual module GHA_MB constructed in Step 5, and set a classifier to complete the final classification task; Step 7: Train and validate the multi-scale spatial information network model on the Alzheimer's Disease Neuroimaging Initiative dataset (ADNI), and perform generalization validation on the Australian Imaging Biomarkers and Lifestyle Flagship Study of Ageing dataset (AIBL) and the Open Access Series of Imaging Studies of Alzheimer's Disease dataset (OASIS) to finally obtain an Alzheimer's disease classification model.
2. The multi-scale spatial information network classification method based on structural magnetic resonance imaging according to claim 1, wherein The preprocessing described in Step 1 includes AC-PC alignment and skull stripping, and spatial normalization to the template MIN152 operation.
3. The multi-scale spatial information network classification method based on structural magnetic resonance imaging according to claim 1, characterized in that The method for dividing the whole-brain image dataset constructed in Step 1 into a test set and a validation set in Step 2 is as follows: Perform five-fold cross-validation on the Alzheimer's Disease Neuroimaging Initiative dataset (ADNI), with four parts as the test set and one part as the validation set.
4. The multi-scale spatial information network classification method based on structural magnetic resonance imaging according to claim 1, wherein The method for the graph hybrid attention mechanism module GHA to be implemented through the dual-attention collaboration mechanism in Step 4 is as follows: The graph channel attention mechanism is used to model the relationship between channels through a graph structure to emphasize features with rich information and suppress useless features; The spatial attention mechanism is used to quantify the importance of features at different spatial positions through a learnable spatial weight matrix and locate the specific spatial position of the lesion; The dual-attention collaboration mechanism is used to enable the multi-scale spatial information network model to simultaneously capture key information in the channel dimension and the spatial dimension, and the two collaborate to achieve adaptive enhancement of multi-scale features.
5. The multi-scale spatial information network classification method based on structural magnetic resonance imaging according to claim 1, wherein Step 5 further includes steps of expanding, processing, and compressing the input features.
6. The multi-scale spatial information network classification method based on structural magnetic resonance imaging according to claim 1, wherein The size of the whole-brain image dataset required to construct the classification model using the preprocessed sMRI images in the said step 1 is 128 128 Whole-brain images of 128 pixels.
7. A computer device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and when the processor runs the computer program stored in the memory, the processor executes the method according to any one of claims 1-6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1-6 are implemented.
Citation Information
Patent Citations
Brain image classification device based on self-adaptive receptive field 3D spatial attention
CN112070742A
Alzheimer's disease classification model construction method and system based on neural network
CN118097322A
Method for extracting neuroimaging biomarker based on interpretable ensemble 3dcnn
US20240057932A1
