A method for identifying multiple lesions in MRI images of brain diseases based on deep learning autoencoders.
By combining autoencoder networks and U-shaped networks, the accuracy and efficiency issues of multifocal identification in MRI images of brain diseases were solved, achieving efficient multifocal identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-26
- Publication Date
- 2026-03-10
AI Technical Summary
Current technologies for MRI imaging diagnosis of brain diseases lack objectivity and accuracy, are time-consuming, rely on scarce data labeled by doctors, and are difficult to effectively identify multiple lesions.
We employ autoencoder networks for unsupervised learning and U-shaped network training, combined with transfer learning, to reduce the need for doctor-labeled data and improve the accuracy of multi-lesion identification.
It improves the efficiency and accuracy of brain MRI images, reduces the need for labeled data, and shortens the diagnosis time.
Smart Images

Figure CN116523821B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence combined with clinical medical image processing, specifically a method for identifying multiple lesions in MRI images of brain diseases based on deep learning autoencoders. Background Technology
[0002] Magnetic resonance imaging (MRI) of the brain is an important imaging basis for the diagnosis of brain diseases, including sequences such as T1WI, T2WI, DWI, FLAIR, and SWI. Currently, the clinical imaging diagnosis of most brain diseases still relies mainly on the subjective judgment of physicians, which not only makes it difficult to ensure objectivity and accuracy, but also causes problems such as excessively long diagnostic time and lengthy and complicated procedures that urgently need to be addressed.
[0003] Deep learning is an extension of representation learning methods based on artificial neural networks in the field of machine learning. It has advantages such as high accuracy, high efficiency, and portability. It has been applied to image segmentation tasks in multiple medical fields, such as retinal vascular base images, head and neck angiography, and cardiac CT angiography images, achieving performance comparable to or even better than that of professional doctors on some public datasets.
[0004] Deep learning methods for lesion identification often rely on manual annotations by doctors as the benchmark for model training. The high cost and processing difficulty of acquiring medical image datasets, coupled with the scarcity of doctor-annotated data, limit the development of supervised deep learning methods. To address the scarcity of medical image data, transfer learning techniques have been widely applied. Most existing work uses models pre-trained on large-scale public datasets such as ImageNet and then fine-tunes them. However, this approach suffers from problems such as excessively large pre-trained model parameters, difficulty in modifying the structure, and limited performance improvement. Furthermore, most current deep learning-based brain imaging diagnostic methods use convolutional neural networks to detect and segment only single lesions, failing to effectively learn and judge the different features of multiple lesions, thus hindering the improvement of diagnostic accuracy for multi-lesion brain diseases. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of existing technologies by proposing a deep learning-based method for identifying multiple lesions in MRI images of brain diseases. By collecting and preprocessing real-world datasets, the accuracy of the deep learning method is improved. To address the limited amount of brain MRI data, an autoencoder network is introduced to perform unsupervised learning on the original MRI images, reducing the overall method's reliance on manually labeled data from doctors.
[0006] The technical solution of the present invention is as follows:
[0007] A method for identifying multiple lesions in MRI images of brain diseases based on deep learning autoencoders, characterized in that the method includes:
[0008] Step S1. Obtain the patient's original MRI image and the corresponding MRI lesion identification image with doctor annotations, and preprocess the MRI lesion identification image;
[0009] Step S2. Pre-train the original multi-sequence MRI images using an autoencoder network;
[0010] Step S3. Input the pre-trained original MRI image and the pre-processed MRI lesion marker image into the U-shaped network for training and segmentation processing to obtain the lesion segmentation result.
[0011] Further, step S1, obtaining the patient's original MRI image and the corresponding MRI lesion identification image with doctor annotation, specifically involves: obtaining the patient's original MRI image using an MRI machine; and using ITK-SNAP for doctor annotation to obtain the corresponding MRI lesion identification image.
[0012] Further, step S1, preprocessing the MRI lesion marker image, specifically includes:
[0013] Image segmentation processing uses a threshold algorithm to determine the brain region of the MRI lesion marker image, and transforms the original MRI image into a grayscale MRI image segmented into the lesion region, brain region, and background region. The lesion region is numbered according to different index values based on different lesions.
[0014] The data pre-selection process determines the size of the brain region based on the ratio of the number of pixels in the brain region in the pre-selected and accumulated MRI grayscale images, and deletes ambiguous MRI grayscale images and their corresponding original images based on lesion characteristics through thresholding, thus obtaining the pre-selected original MRI image.
[0015] Data augmentation processing is performed on the pre-selected original MRI image and the MRI grayscale image, respectively, to increase the original MRI image and the MRI grayscale image to more than five times their original size.
[0016] Furthermore, step S2 involves pre-training the original MRI images using an autoencoder network, specifically including:
[0017] S2.1 The dimensional feature values of the original MRI image are downsampled using an encoding function to obtain dimensionality-reduced feature values;
[0018] S2.2 The dimensionality reduction feature value is upsampled using a decoding function to obtain a dimensionality feature value that is equal to the dimensionality value of the original MRI image;
[0019] S2.3 uses the original MRI image as both input and output to the autoencoder network. After passing through S2.1 and S2.2, the mean square error (MSE) between the predicted and actual gray values is obtained. This MSE is then gradually reduced through backpropagation. When the MSE is less than a preset MSE threshold of 2*10... -4 Training is stopped when the time is right, serving as a pre-trained autoencoder model on the original MRI images.
[0020] Furthermore, the loss function is the average error, and the specific formula is as follows:
[0021]
[0022] Where n represents the number of pixels in the original image and the predicted image, X i Represents the actual grayscale value; Y i This represents the predicted grayscale value.
[0023] Further, step S3, inputting the pre-trained original MRI image and the pre-processed MRI lesion marker image into the U-shaped network for training and segmentation processing to obtain the lesion segmentation result, specifically includes:
[0024] The dimensionality feature values of the original MRI image are downsampled using n encoding functions. The hyperparameters of the encoding functions are transferred from the hyperparameters of the same layer in the autoencoder network to obtain the dimensionality reduction feature values.
[0025] The residual function is used as an intermediate module to connect the encoding and decoding functions, thereby obtaining the feature values of the intermediate module;
[0026] By using a selection function, the obtained dimensionality reduction feature values are opened to different decoding function channels according to the different sequences of the input original MRI images, while the remaining decoding function channels are locked. In this way, the loss function during training will only be affected by the opened decoding function channels.
[0027] The dimensionality-reduced feature values are upsampled using a decoding function to obtain dimensionality feature values that are equal to the dimensionality values of the original MRI image.
[0028] The output function is used to determine the dimensional feature values that are equal to the dimensional values of the original MRI image as different index values, thereby obtaining the predicted MRI segmentation result;
[0029] The original MRI image and the preprocessed MRI lesion marker image are used as the input and output of a general U-shaped network. After the above steps, the loss function values of the predicted marker image and the actual marker image are obtained. The loss function is gradually reduced through backpropagation. The above process is iterated 50 times until it converges. The weight value with the smallest loss function is taken as the trained segmentation network. The segmentation training of multi-sequence MRI images is completed, and the segmentation prediction map of brain lesions is obtained.
[0030] Furthermore, the loss function is the sum of 1-Dice Loss and Focal Loss, and the specific formula is as follows:
[0031]
[0032] Where TP represents the true positive rate, FP represents the false positive rate, FN represents the false negative rate, and g t Represents the fact value, p r α represents the predicted value, α represents the weighting parameter, and γ represents the focusing parameter.
[0033] Compared with the prior art, the beneficial effects of the present invention are:
[0034] 1. A training method was designed to address the characteristics of brain MRI images, which involve multiple lesions and limited data, thereby improving the efficiency of using brain MRI images.
[0035] 2. To address the issue of insufficient brain MRI image data, an unsupervised autoencoder network was used for pre-training before formal model training. Transfer learning was then used to transfer the trained encoding module architecture and related hyperparameters to the U-shaped network, which accelerated the network fitting rate and improved the recognition accuracy. Attached Figure Description
[0036] Figure 1 This is a flowchart of the multi-lesion identification method for brain disease MRI images based on deep learning autoencoders, as described in this invention.
[0037] Figure 2 This is a schematic diagram of the structure of an autoencoder network in an embodiment of the present invention.
[0038] Figure 3 This is a schematic diagram of the structure of a general U-shaped network in an embodiment of the present invention. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of this invention clearer and easier to understand, the invention will be described in detail below with reference to the accompanying drawings. Detailed embodiments and structures are given. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of the embodiments of this invention. It should be understood that this invention is not limited to the exemplary embodiments described herein.
[0040] The specific steps of this invention are as follows:
[0041] Step 1: Acquisition and preprocessing of brain MRI images;
[0042] Step 1-1, Data Acquisition
[0043] The original images of this invention were obtained using a Signa HDxt3.0T MRI scanner from GE Healthcare in the United States and stored in DICOM image sequence format with a resolution of 512x512. Images with lesions were manually labeled by doctors using ITK-SNAP on the original images and stored in NiFTI format.
[0044] Steps 1-2, Image Segmentation
[0045] The obtained MRI images with doctor annotations are fed into a thresholding algorithm, and brain region segmentation based on the thresholding algorithm is implemented using Matlab code. At this point, the original MRI data, after doctor annotation and thresholding, can be segmented into lesion regions, brain regions, and background regions. The index values for these regions are set to 0, 1, and 2 respectively. If there are two types of lesions, the index is sequentially shifted to 0, 1, 2, and 3. This transforms the original MRI image into grayscale images segmented according to different regions. The resulting grayscale images are then mapped one-to-one with the original MRI data.
[0046] Steps 1-3, Data pre-screening
[0047] The obtained segmented grayscale images are used to calculate the brain size of each MRI image by accumulating the pixels occupied by the brain. Based on the lesion characteristics of the input images, a threshold is set to remove ambiguous images, typically located in the head or tail area.
[0048] Steps 1-4, Data Augmentation
[0049] The Python albumentation library was used to transform the filtered raw MRI images, including spatial and pixel-level transformations. Spatial transformations included translation, flipping, scaling, and random cropping; pixel-level transformations included random addition of Gaussian noise, random brightness adjustment, sharpening, blurring, contrast adjustment, and saturation adjustment. Data augmentation was then performed, randomly selecting four of these transformations with equal probability of selection, increasing the size of the raw MRI images and segmentation maps by five times.
[0050] Step 2: Pre-train the raw MRI data using an autoencoder network; such as... Figure 3 As shown.
[0051] The automatic encoding module includes an encoding module and a decoding module. The encoding module consists of n downsampling modules, each containing m convolutional layers and one max-pooling layer. The number of channels in the convolutional layers of each downsampling module increases sequentially from 64, with a stride of (3, 3) and the ReLU activation function used within each layer. The max-pooling layer uses a (2, 2) matrix with a stride of (2, 2), effectively compatibility with neighboring region information. The encoding module downsamples the dimensionality features of the original image to obtain reduced-dimensionality features. The decoding module consists of n upsampling modules, the same number as the encoding modules. Each upsampling module contains an upsampling layer, a convolutional layer, a batch normalization layer, and an activation layer. The size of the upsampling layer in the upsampling module is set to 2; the connection layer has axis = 3; the number of channels in the convolutional layers is equal to the number of channels in the corresponding downsampling module's convolutional layer; ReLU is used as the activation function for the activation layer. The decoding module upsamples the obtained reduced-dimensionality features to obtain dimensionality features equal to the original image's dimensionality (n and m are the optimal positive integers obtained experimentally).
[0052] The aforementioned autoencoder network uses the average error loss function, with the specific formula as follows:
[0053]
[0054] Where n represents the number of pixels in the original image, X i Represents the actual grayscale value; Y i Represents the predicted grayscale value;
[0055] Using the TensorFlow framework, pre-selected raw MRI images are fed into the autoencoder network as both input and output for training. After passing through the encoding and decoding modules, the mean squared error (MSE) between the predicted and actual grayscale values is obtained. The MSE is then gradually reduced through backpropagation until it falls below a preset MSE threshold of 2*10⁻⁶. -4 Training is stopped at this point, and this autoencoder network is used as the obtained autoencoder network.
[0056] Step 3: Input the original MRI image and the preprocessed grayscale segmentation image into the general U-shaped network for training.
[0057] The embodiment employs a multi-layer output U-shaped network, including an encoding module, an intermediate module, a selection module, a decoding module, and an output module, and trains the model using the TensorFlow framework. Compared to traditional U-shaped networks, the multi-layer output U-shaped network adds a selection module, allowing MRI images from different sequences to enter corresponding different decoding and output modules, while sharing a single encoding and intermediate module. This improves the utilization rate of a single MRI image, alleviates the problem of insufficient data volume for various MRI sequences to some extent, and also improves the model's segmentation accuracy and slightly increases the fitting rate.
[0058] The encoding module of the U-shaped network includes n encoding sub-modules, each consisting of m convolutional layers and one max-pooling layer; the number of n and m is the same as that of the aforementioned autoencoder modules; the specific parameter settings in the architecture are also the same. Model-based transfer learning is used to transfer the specific parameter values of the downsampling modules in the trained autoencoder network to the encoding modules of the U-shaped network, allowing the U-shaped network to be pre-learned and improving the fitting rate. The encoding modules downsample the image to be processed layer by layer, halving the resolution and doubling the number of channels of the output feature map layer by layer, resulting in the feature map of the nth encoding module.
[0059] The feature map of the nth encoding module is then fed into the intermediate module. The intermediate module consists of two residual modules, each composed of a convolutional layer, a batch normalization layer, and an activation layer. The number of channels in the convolutional layer is the same as that in the nth encoding module. The batch normalization layer is set to axis=3, allowing it to select the axis index representing the channel. The activation layer uses 'ReLU'. The intermediate module serves as a connection between the encoding and decoding modules, and intermediate feature maps are obtained through it.
[0060] The output features of the intermediate module will be used in the selection module for MRI sequence selection. By extracting the loss function of each decoding channel and subsequent output channel in the network, and selecting the loss function corresponding to the sequence for training, while locking the hyperparameters of the other channels, the image of each sequence will enter the decoding module and output module corresponding to the sequence.
[0061] The decoding module comprises n decoding sub-modules, where n is the same as n in the encoding sub-modules. Each decoding module consists of an upsampling layer, a connection layer, and two residual modules. The upsampling layer size is set to 2; the connection layer axis is set to 3; the residual modules in the decoding module are configured the same as those in the intermediate modules. The connection layer concatenates the feature map of the nth decoding module with the feature map of the corresponding nth encoding module. By upsampling the feature maps layer by layer through the decoding module, the resolution doubles layer by layer, while the number of channels is halved layer by layer after merging with the encoding modules.
[0062] After the image is decoded, it enters the output module, which includes a convolutional layer and an activation layer. The number of channels in the convolutional layer is set to be the same as the number of categories in the MRI input image. "softmax" is used as the activation function of the final layer to obtain the predicted MRI segmentation result.
[0063] The predicted MRI segmentation results are compared with the actual preprocessed MRI segmentation results using a loss function calculation. The loss function, as a way to measure the error between the network training results and the actual results, has a significant impact on the network training effect. This invention, based on the characteristic that the gray values of the target region and the background region are relatively similar in actual MRI applications, uses the sum of two loss functions to improve the model's training effect. The loss function of the U-shaped network is defined as the sum of 1-Dice Loss and Focal Loss, with the specific formula as follows:
[0064]
[0065]
[0066] Wherein, TP represents the true positive rate, FP represents the false positive rate, and FN represents the false negative rate; g t Represents the fact value, p r α represents the predicted value, γ represents the weighting parameter, and γ represents the focusing parameter.
[0067] As can be seen from the formula, Dice Loss can be approximated as the sum of two functions, precision and recall. Therefore, adding beta as a preset coefficient determines the weight of the two functions, precision and recall, in Dice Loss, with a default value of 1.
[0068] As can be seen from the formula, Focal Loss is divided into binary focus loss and classification focus loss based on the number of indices in the input labeled image. When the input image has only two classes, binary focus loss is used; when the input image has more than two classes, classification focus loss is used.
[0069] Adding 1-Dice Loss and Focal Loss can make the loss function more consistent with the characteristics of MRI images;
[0070] The error between the predicted segmentation map and the actual segmentation map obtained from the forward propagation is calculated. Then, the partial derivatives of each parameter are calculated using backpropagation, and the network parameters are updated to reduce the value of the loss function. The above method of reducing the loss function through backpropagation is a conventional technique in existing segmentation networks.
[0071] The above process is iterated 50 times until convergence. The weight value with the minimum loss function is taken as the trained segmentation network model.
[0072] This invention addresses the challenges of multiple lesions and scarce data in existing brain disease studies. Through examples, its key advantages are: establishing a preprocessing workflow suitable for brain diseases, making the method more closely aligned with the characteristics of brain MRI data and improving the accuracy of subsequent processing; addressing the issue of insufficient brain MRI image data by using an unsupervised autoencoder network for pre-training before formal model training, and then using transfer learning to transfer the trained encoding module architecture and related hyperparameters to a U-shaped network, effectively reducing the need for labeled MRI data and enabling the U-shaped network to fit more quickly; simultaneously, it effectively improves the utilization rate of a single MRI image and enhances the accuracy of multi-lesion image recognition for brain diseases.
Claims
1. A method for multi-lesion recognition of brain disease MRI images based on deep learning self-encoding, characterized in that, The method comprises: Step S1. Obtain the multi-sequence MRI original image of a patient and the MRI lesion identification image corresponding to the doctor's annotation, and pre-process the MRI lesion identification image; Step S2. Pre-train the auto-encoding network using the multi-sequence MRI original image; Step S3. Input the MRI original image and the pre-processed MRI lesion identification image into the U-shaped network for training and segmentation processing, so as to obtain a lesion segmentation result, specifically comprising: using n encoding functions to down-sample the MRI original image dimension feature values, the hyperparameters of the encoding functions being migrated from the hyperparameters of the same layer of the pre-trained auto-encoding network, to obtain reduced dimension feature values; using a residual function as an intermediate module to connect the encoding function and the decoding function, to obtain the feature values of the intermediate module; using a selection function to open different decoding function channels according to the sequence of the input MRI original image, while locking the remaining decoding function channels, so that the loss function during training is only affected by the open decoding function channel; using a decoding function to up-sample the reduced dimension feature values, to obtain dimension feature values equal to the MRI original image dimension feature values; using an output function to determine the dimension feature values equal to the MRI original image dimension feature values as different index values, to obtain a predicted MRI segmentation result; putting the MRI original image and the pre-processed MRI lesion identification image into the network as the input end and the output end of the general U-shaped network, obtaining the loss function value of the predicted identification image and the actual identification image after the above steps, and gradually reducing the loss function through back propagation; iterate the above process 50 times, iterate to convergence, take the weight value at the minimum loss function as the trained segmentation network, complete the image segmentation training of the multi-sequence MRI, and obtain a segmentation prediction map of brain lesions. 2.The method of claim 1, wherein, The step S1. obtains the MRI original image of a patient and the MRI lesion identification image corresponding to the doctor's annotation, specifically: using a nuclear magnetic resonance machine to obtain the MRI original image of a patient; using ITK-SNAP for doctor annotation to obtain the corresponding MRI lesion identification image. 3.The method of claim 1, wherein, The step S1. pre-processes the MRI lesion identification image, specifically comprising: image segmentation processing, using a threshold algorithm to determine the lesion region, brain region and background region of the MRI lesion identification image, and converting the MRI original image into an MRI grayscale image of the lesion region, brain region and background region, wherein the lesion region is numbered according to different indexes index values according to different lesions; data pre-screening processing, obtaining the size of the brain region of the image by accumulating the pixels occupied by the brain in each MRI image, and deleting images that will cause ambiguity according to the lesion characteristics of the input image to obtain pre-screened MRI original images; data enhancement processing, respectively enhancing and transforming the pre-screened MRI original images and MRI grayscale images, so that the MRI original images and MRI grayscale images are increased by more than five times the original. 4.The method of claim 1, wherein, The step S2 pre-trains the auto-encoding network by using the multi-sequence MRI original image, and specifically includes the following steps: S2.
1. Dimensional characteristic values of the MRI original image are down-sampled by using an encoding function to obtain reduced-dimensional characteristic values; S2.
2. The reduced-dimensional characteristic values are up-sampled by using a decoding function to obtain dimensional characteristic values equal to the dimensional characteristic values of the MRI original image; S2.3 put the MRI original image as the input and output of the auto-encoding network into the network, get the mean square error value of the predicted gray value and the actual gray value after S2.1 and S2.2, gradually reduce the mean square error value through back propagation, stop training when the mean square error value is less than the preset mean square error threshold 2x10 -4 -6, and take it as the pre-training auto-encoding model of the MRI original image. 5.The method of claim 4, wherein, The loss function is a mean square error, and a specific formula is as follows: wherein n represents the number of pixels of the original image and the predicted image, X i represents the actual gray value; Y i represents the predicted gray value.
Citation Information
Patent Citations
Brain tumor self-supervision pre-training method and device based on attention symmetry self-coding
CN115035093A