Three-dimensional brain tumor MRI image segmentation method based on self-adjustment strategy
By adopting a self-adjusting strategy in brain tumor MRI image segmentation and using shallow and deep features to supervise each other, the problem of low segmentation accuracy in the core area of the tumor caused by data imbalance is solved, and the segmentation accuracy and understanding of the internal structure of the tumor are improved. Recognition ability.
Patent Information
- Application Number
- CN202210444054.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-04-25
AI Technical Summary
Existing technology is difficult to effectively handle the data imbalance problem in brain tumor MRI image segmentation, resulting in low segmentation accuracy in the core tumor area, especially due to the limited improvement in the enhanced tumor area with the smallest amount of data, and the tendency of deep neural networks to learn dominant category features. Smaller tumor core areas were ignored.
A three-dimensional brain tumor MRI image segmentation method based on a self-adjusting strategy is used to extract shallow features through the pixel-level segmentation network to guide the training of deeper networks. The deep features obtained from the image-level classification network are used to guide the training of shallow networks, and through segmentation Supervise each other with the features of the classification network to improve the segmentation accuracy of the tumor core area.
It improves the segmentation accuracy of the core area of brain tumors, overcomes the problem caused by data imbalance that the network tends to learn large category features and ignores the core area of smaller tumors, and enhances the acquisition of detailed information on the internal structure of the tumor and the acquisition of advanced semantic information. reserve.
Smart Images

Figure CN114821052B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, and in particular relates to a three-dimensional brain tumor nuclear magnetic resonance image segmentation method based on a self-adjustment strategy, which can be applied to computer-aided detection of medical images. Background Art
[0002] Image segmentation is a technology that divides an image into different regions and extracts the target of interest based on certain similarity criteria. Traditional image segmentation methods mainly include threshold method, boundary detection method, region method, etc., which all use the low-level semantics of the image, including the color, texture and shape of the image pixels, and the segmentation effect is not good when encountering complex scenes. High-level semantic segmentation of images aims to identify the category of each region block and obtain a segmented image with pixel-by-pixel semantic annotations. The goal of the semantic segmentation algorithm of brain tumor images is to automatically segment different categories of tumor regions from magnetic resonance imaging (MRI) images. Due to the characteristics of brain tumors and the limitations of MRI imaging principles, there are many challenges in the brain tumor segmentation task, including position uncertainty, shape uncertainty, boundary ambiguity, annotation bias and data imbalance.
[0003] Deep learning methods have been widely used in brain tumor segmentation tasks and have significantly improved the overall segmentation effect of tumor areas. The deep learning-based 3D brain tumor MRI image segmentation method mainly focuses on designing effective architecture models, utilizing multimodal information, and dealing with data imbalance. In brain tumor image data processing, the problem of data imbalance is particularly prominent, mainly manifested in 1) the voxel data in different regions are different, especially the core area of the tumor is much smaller than other regions. 2) The number of high-grade glioma (HGG) cases is much greater than the number of low-grade glioma (LGG) cases. 3) The data set is manually annotated by experts, and there are annotation deviations between different experts. In summary, how to solve the problem of data imbalance has become the most challenging research direction.
[0004] In 2021, Liu et al. published a brain tumor MRI image segmentation method based on a context-aware network in the paper "CANet: Context Aware Network for Brain Glioma Segmentation" in the IEEE Transactions on Medical Imaging journal, Volume 40, Issue 7. This method combines deep convolution and graph convolution to extract hybrid context-aware features, and introduces a trainable conditional random field to learn the optimal feature fusion method. However, this method cannot effectively deal with the problem of data imbalance, and the enhancement of the tumor area with the least data volume is limited.
[0005] Wang et al. disclosed a brain tumor image segmentation method based on visual Transformer in the paper "TransBTS: Multimodal Brain Tumor Segmentation Using Transformer" published at the Medical Image Computing and Computer Assisted Intervention conference in 2021. This method introduced the visual Transformer as a self-attention module between the encoder and decoder structures into the brain tumor image segmentation task for the first time, but its architecture is relatively simple, with only one Transformer module used in the deepest layer. There is no connection between the module and other encoders and decoders of different resolutions, and the addition of the Transformer module greatly increases the computational complexity of training and inference.
[0006] The above method only designs effective network modules without considering the problem of data imbalance. Data imbalance will cause the deep neural network to tend to learn the features of the dominant category, such as learning malignant HGG and ignoring benign LGG or learning edema areas and ignoring the smaller tumor core area, resulting in low segmentation accuracy of the tumor core area. In addition, the tumor core area also has the characteristics of fuzzy boundaries or discontinuous regions, which is also the reason for its low segmentation accuracy. Therefore, it is very important to design an effective architecture model to solve the problem of data imbalance and thus improve the segmentation accuracy of the tumor core area. Summary of the invention
[0007] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and propose a three-dimensional brain tumor magnetic resonance image segmentation method based on a self-adjustment strategy, which aims to use the pixel-level segmentation network to extract shallow features to guide the training of deeper networks, so as to enable the deep network to obtain more detailed information of the internal area of the tumor, and use the deep features obtained by the image-level classification network to guide the training of the shallow network to retain more semantic information of the core area of the tumor. The features extracted by the segmentation and classification networks supervise each other without introducing additional supervision data, thereby further improving the segmentation accuracy of the core area of the tumor.
[0008] To achieve the above object, the technical solution adopted by the present invention includes the following steps:
[0009] (1) Obtain training sample set and test sample set:
[0010] Randomly select L three-dimensional brain tumor MRI images I with dimensions W×H×D×Q from the brain tumor MRI image segmentation dataset. l and the pixel-level segmentation mask S for each image l Composition of data set T a ={(Il ,S l )|1≤l≤L}, and for each 3D brain tumor MRI image I l After preprocessing, the preprocessed data set T a In the example, we randomly select M images I m and the corresponding pixel-level segmentation mask S m Composed of training sample set T r ={(I m ,S m )|1≤m≤M}, the remaining N images I n and the corresponding pixel-level segmentation mask S n Composed test sample set T e ={(I n ,S n )|1≤n≤N}, where L≥300, W, H, and D represent the width, height, and depth of the three-dimensional brain tumor MRI image, respectively, and Q is the number of data modes, that is, the number of channels, W≥100, H≥100, D≥100, and Q=4. M+N=L;
[0011] (2) Construct a brain tumor MRI image segmentation network model G based on a self-regulatory strategy, which includes an encoder E, a decoder D, and a prediction module Y. The network structure uses the classic 3D U-Net as the backbone network, and the encoder downsamples and expands the number of channels to extract high-level semantic features. The decoder upsamples and restores the spatial size, and the jump connection restores the structural details of the feature map.
[0012] (2a) Encoder E performs multi-scale feature extraction on the image, including K-level downsampling encoder sub-networks {E k |1≤k≤K}, K≥2, E k It consists of a 3D convolutional layer, an instance normalization layer, an activation function layer, and a pooling downsampling layer connected in sequence; the decoder D performs multi-scale feature recovery on the image, including a K+1-level upsampling encoder subnetwork {D k' |1≤k'≤K+1},D k' It consists of a 3D convolutional layer, an instance normalization layer, an activation function layer, and an upsampling layer connected in sequence, where the kth level E k After the 3D convolution layer, instance normalization layer, and activation function layer, the output is the same as the k'=K+1-k level D k' The output of is connected by skipping between channels;
[0013] (2b) Each level D k' The outputs of the 3D convolutional layer, instance normalization layer, and activation function layer are combined with a prediction submodule Y k' Connect, Yk' First, the pixel category probability {F_seg k' |1≤k'≤K+1}, and then obtain the classification probability {v_cls k' |1≤k'≤K+1};
[0014] (2c) Take the last level pixel category probability F_seg K+1 , calculate the category label through argmax and get the segmentation result map;
[0015] (3) Define the loss function L of the 3D brain tumor MRI image segmentation model G based on the self-adjustment strategy SR :
[0016] L SR =L seg +λ1L cls +λ2L SR_F +λ3L SR_V
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024] (3a) Segmentation loss function L seg
[0025] Segmentation loss function L seg Including the cross entropy loss function L ce_seg and Dice loss function L dice_seg :
[0026]
[0027]
[0028] Where S k′ It represents the difference between F_seg obtained by downsampling the segmentation label S k' The same size k'-level segmentation map, P k' F_seg k' The three-dimensional space, Indicates S k' The jth voxel in F_seg k' For the j-th voxel in , softmax(·) represents the softmax activation function;
[0029] Add the segmentation losses of multiple levels of output to get the total segmentation loss:
[0030]
[0031] where λ deep_i Indicates that different weights are assigned to the losses of different levels of output in deep supervision, and the segmentation losses of multiple levels of output are added together to obtain the total segmentation loss L seg ;
[0032] (3b) Segmentation self-regulating loss function L SR_F
[0033]
[0034] The highest level pixel category probability F_seg K+1 Perform argmax operation and then convert it into one-hot encoding form to obtain the converted feature map one-hot (argmax (F_seg K+1 ), low-level pixel category probability {F_seg k' |1≤k'≤K} and one-hot(argmax(F_seg K+1 )) Calculate the cross entropy loss function. The segmentation loss function of this calculation process comes from the prediction results of the network itself, which is called the segmentation self-regulation loss function;
[0035] (3c) Classification loss function L cls
[0036]
[0037] The multi-class classification task is used to determine whether each type of tumor area exists. This is used as an auxiliary task to supervise the training process of the network. The segmentation label S is globally pooled to obtain the global classification label Pool(S), which is combined with {v_cls k' |1≤k'≤K+1} calculate the classification loss and calculate L cls Using multi-category binary cross entropy loss function L bce_cls :
[0038]
[0039] Where C represents the total number of categories, S q represents the qth class segmentation label, Pool(Sq ) means to perform global pooling operation on the qth class segmentation label to obtain the qth class global classification label, v_cls q represents the classification probability of the qth category, σ(·) represents the sigmoid function; the classification losses of different categories are added together to obtain the multi-category binary cross entropy loss function L bce_cls ;
[0040] Then add the classification losses of multiple levels of output to get the total classification loss L cls ;
[0041] (3d) Classification self-regulating loss function L SR-V
[0042]
[0043] The lowest classification probability Obtained through the sigmoid function Advanced Classification Probability and Calculate the classification loss function. The classification loss function in this calculation process comes from the prediction results of the network itself, which is called the classification self-regulation loss function;
[0044] (3e) Overall loss function L SR
[0045] The overall loss function L SR Including multi-level classification loss function, segmentation loss and segmentation, classification self-adjustment loss, using several hyperparameters λ to balance the weights of different losses, L SR It is expressed as:
[0046] L SR =L seg +λ1L cls +λ2L SR_F +λ3L SR_V
[0047] (4) Iteratively train the three-dimensional brain tumor MRI image segmentation network model G based on the self-adjustment strategy:
[0048] (4a) The number of initial iterations is r, the maximum number of iterations is R, and the current brain tumor segmentation network model is G r , G r The weight parameter is θ r , and let r = 1, G r =G;
[0049] (4b) From the preprocessed training sample set T r Randomly select B training samples without replacement as the network model G rThe input is passed through the encoder E to obtain K downsampled feature maps {F k E ,1≤k≤K}; k E ,1≤k≤K} and the output of encoder E, after passing through decoder D and prediction module Y, we get K+1 level pixel category probabilities {F_seg k' |1≤k'≤K+1} and K+1 level classification probability {v_cls k' |1≤k'≤K+1}; where B≥1;
[0050] (4c) {F_seg k' |1≤k'≤K+1} and {v_cls k' |1≤k'≤K+1} into L SR , calculate the segmentation loss L for each training sample seg , segmentation self-regulation loss L SR_F , classification loss function L cls , classification self-adjustment loss L SR_V , and sum it up as the loss value d r , then through d r Calculate the G r The weight parameter θ r The partial derivative g r ; Then use the stochastic gradient descent method, through the partial derivative g r For G r The weight parameter θ r Update and get the network model G of this iteration r ;
[0051] (4d) Determine whether r = R. If so, obtain the trained brain tumor MRI image segmentation network model G based on the self-adjustment strategy. * , otherwise let r=r+1, G r = G, and execute step (4b);
[0052] (5) Obtain brain tumor segmentation results:
[0053] The preprocessed test sample set T e As the network model G r The input is forward inferred and post-processed to obtain the segmentation result of each test sample, and finally a semantically annotated segmented image with pixel-by-pixel category probability is obtained.
[0054] Compared with the prior art, the present invention has the following advantages:
[0055] 1. The loss function of the three-dimensional brain tumor magnetic resonance image segmentation model based on the self-regulation strategy defined in the present invention includes a segmentation self-regulation loss. In the process of training the network model, it overcomes the shortcomings of the prior art that the loss function is introduced to train the model at only one resolution and the structural information is not fully utilized. The shallow output features of the network itself are used to supervise the training of deep features to obtain more detailed information on the internal structure of the tumor, thereby improving the segmentation accuracy of the brain tumor.
[0056] 2. The loss function of the three-dimensional brain tumor MRI image segmentation model based on the self-regulation strategy defined in the present invention includes a classification self-regulation loss. In the process of training the network model, it overcomes the shortcomings of the prior art that the network tends to learn the features of large categories and ignores the two smaller tumor core areas due to data imbalance. The deep output classification probability of the network itself supervises the training of the shallow classification probability to retain more high-level semantic information, thereby improving the segmentation effect of brain tumors and having practical application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 It is a flow chart for implementing the present invention.
[0058] Figure 2 A schematic diagram of the structure of a brain tumor magnetic resonance image segmentation model based on a self-adjusting strategy constructed in the present invention. DETAILED DESCRIPTION
[0059] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the information obtained based on the medical knowledge in the prior art and the contents disclosed in the present invention is only an intermediate result and does not fall under the circumstances stipulated in Article 25, paragraph 1, item 3 of the Patent Law.
[0060] Reference Figure 1 , the present invention comprises the following steps:
[0061] Step 1) Obtain training sample set and test sample set:
[0062] L three-dimensional brain tumor MRI images I with dimensions W×H×D×Q are randomly selected from the brain tumor MRI image segmentation dataset. l and the pixel-level segmentation mask S for each image l Composition of data set T a ={(I l ,S l )|1≤l≤L}, and for each 3D brain tumor MRI image I l Preprocessing: For each image and the corresponding segmentation mask (I l ,S l ), firstly transform the image Il The pixel values of are normalized according to the overall mean variance; then in the mask S l Find the minimum bounding box of the tumor area and record the coordinates a of the bounding box l , and use the bounding box as the boundary to simultaneously crop the image and mask to obtain the preprocessed image and segmentation mask Thus, the preprocessed data set T is obtained a , in T a Randomly select M images I from m and the corresponding pixel-level segmentation mask S m Composed of training sample set T r ={(I m ,S m )|1≤m≤M}, the remaining N images I n and the corresponding pixel-level segmentation mask S n Composed test sample set T e ={(I n ,S n )|1≤n≤N}, where L≥300, W, H, and D represent the width, height, and depth of the three-dimensional brain tumor MRI image, respectively, and Q is the number of data modes, that is, the number of channels, W≥100, H≥100, D≥100, and Q=4. M+N=L;
[0063] In this example, the Brain Tumor Segmentation 2019 (BraTS2019) brain tumor segmentation dataset is used. The public part of the dataset is divided into a training set and a validation set. The training set contains 3D MRI scan data and segmentation annotations of 335 patients, and the validation set contains data of 125 patients, and the segmentation annotations are not public. W = 128, H = 128, D = 128, Q = 4, M = 335, N = 125, L = 460;
[0064] Step 2) Construct a brain tumor MRI image segmentation network model G based on a self-regulation strategy, whose structure is as follows: Figure 2 As shown:
[0065] (2a) Construct an encoder E to extract multi-scale features of the image. E contains K-level downsampling encoder sub-networks {E k |1≤k≤K}, there are 4 levels in total, that is, K=4; each level consists of two sets of 3D convolutional layers, instance normalization layers, activation function layers, and pooling downsampling layers connected in sequence; each level E kThe convolution kernel size of the two 3D convolutional layers in is 3×3×3, the stride is 1, the surrounding padding is 1, the maximum pooling size is 2×2×2, the number of convolution kernels from level 1 to level 4 is 64, 128, 256 and 512 respectively, and the activation function layer uses the RELU activation function;
[0066] The decoder D performs multi-scale feature recovery on the image. D contains K+1 levels of upsampling encoder sub-networks {D k' |1≤k'≤K+1},D k' There are 5 levels in total, each of which consists of two sets of 3D convolutional layers, instance normalization layers, activation function layers, and upsampling layers connected in sequence; each level D k' The convolution kernel size of the two 3D convolution layers in the network is 3×3×3, the stride is 1, the surrounding padding is 1, the upsampling size is 2×2×2, the upsampling method is trilinear filtering, the number of convolution kernels from level 1 to level 5 are 1024, 512, 256, 128 and 64 respectively, and the activation function layer uses the RELU activation function;
[0067] Level kE k The output after two sets of 3D convolutional layers, instance normalization layers and activation function layers is the same as the k'=K+1-k level D k' The output of is connected by skipping between channels;
[0068] Each level D k' The outputs of two sets of 3D convolutional layers, instance normalization layers, and activation function layers are combined with a prediction submodule Y k' There are 5 levels of prediction modules in total, each of which includes a 3D convolution layer with a convolution kernel size of 1×1×1, a step size of 1, and a number of convolution kernels of 4. The 1×1×1 convolution layer processing is equivalent to the fully connected layer processing. After convolution, the pixel category probabilities at each level are obtained. k' |1≤k'≤K+1}; the output after the convolution kernel is input into a global pooling layer to change the feature map size of each channel to 1×1×1; finally, the classification probability of each channel is obtained through the fully connected layer {v_cls k' |1≤k'≤K+1}; the length of the fully connected layer is 4;
[0069] (2b) Define the loss function L of the 3D brain tumor MRI image segmentation network model G based on the self-regulation strategy SR :
[0070] L SR =L seg +λ1L cls +λ2L SR_F +λ3L SR_V
[0071] Among them, λ1, λ2, λ3 represent weighting coefficients, L seg represents the segmentation loss function of multi-level output, L cls represents the classification loss function of multi-level output, L SR_F represents the segmentation self-regulating loss function, L SR_V represents the classification self-regulating loss function;
[0072] (2b1) Segmentation loss function L seg Including the cross entropy loss function L ce_seg and Dice loss function L dice_seg :
[0073]
[0074]
[0075] Where S k′ It represents the difference between F_seg obtained by downsampling the segmentation label S k' The same size k'-level segmentation map, P k' F_seg k' The three-dimensional space, Indicates S k' The jth voxel in F_seg k' For the j-th voxel in , softmax(·) represents the softmax activation function;
[0076] Add the segmentation losses of multiple levels of output to get the total segmentation loss:
[0077]
[0078] where λ deep_i Indicates that different weights are assigned to the losses of different levels of output in deep supervision, and the segmentation losses of multiple levels of output are added together to obtain the total segmentation loss L seg ;
[0079] In the network of this chapter, K=4, and the maximum downsampling is 1 / 16 of the original image size;
[0080] (2b2) Segmentation self-regulating loss function L SR_F
[0081]
[0082] The highest level pixel category probability F_seg K+1 Perform argmax operation and then convert it into one-hot encoding form to obtain the converted feature map one-hot (argmax (F_seg K+1), low-level pixel category probability {F_seg k' |1≤k'≤K} and one-hot(argmax(F_seg K+1 )) Calculate the cross entropy loss function. The segmentation loss function of this calculation process comes from the prediction results of the network itself, which is called the segmentation self-regulation loss function;
[0083] (2b3) Classification loss function L cls
[0084]
[0085] The multi-class classification task is used to determine whether each type of tumor area exists. This is used as an auxiliary task to supervise the training process of the network. The segmentation label S is globally pooled to obtain the global classification label Pool(S), which is combined with {v_cls k' |1≤k'≤K+1} calculate the classification loss and calculate L cls Using multi-category binary cross entropy loss function L bce_cls :
[0086]
[0087] Where C represents the total number of categories, S q represents the qth class segmentation label, Pool(S q ) indicates that the qth class segmentation label is globally pooled to obtain the qth class global classification label, v_cls q represents the classification probability of the qth category, σ(·) represents the sigmoid function; the classification losses of different categories are added together to obtain the multi-category binary cross entropy loss function L bce_cls ;
[0088] Then add the classification losses of multiple levels of output to get the total classification loss L cls ;
[0089] (2b4) Classification self-regulating loss function L SR-V
[0090]
[0091] The lowest classification probability Through the sigmoid function, we get High-level classification probability {v_cls k' |2≤k'≤K+1} and Calculate the classification loss function. The classification loss function of this calculation process comes from the prediction results of the network itself, which is called the classification self-regulation loss function;
[0092] In this example, the classification loss function Lcls Weight λ1, segmentation self-adjustment loss function L SR_F Weight λ2 and classification self-regulation loss function L SR_V The weight λ3 is set to 0.05, 0.35, and 0.25 respectively;
[0093] Step 3) Iteratively train the three-dimensional brain tumor MRI image segmentation network model G based on the self-regulation strategy:
[0094] (3a) Initialize the number of iterations to r, the maximum number of iterations to R, R = 20000, the network model G r The weight parameter is θ r , and let r = 1, G r =G;
[0095] From the preprocessed training sample set T r Randomly select B training samples without replacement as the network model G r The input is passed through the encoder E to obtain K downsampled feature maps {F k E ,1≤k≤K}; k E ,1≤k≤K} and the output of encoder E passes through decoder D and prediction module Y to obtain K+1 level pixel category probabilities {F_seg k' |1≤k'≤K+1} and K+1 level classification probability {v_cls k' |1≤k'≤K+1}; where B≥1;
[0096] In this example, B = 4;
[0097] (3b) During training, a preheating dynamic adjustment strategy is adopted for the weights of the two types of self-regulating losses. As the training progresses, the weights increase linearly from 0 to the preset value and then remain unchanged.
[0098] (3c) {F_seg k' |1≤k'≤K+1} and {v_cls k' |1≤k'≤K+1} into L SR , calculate the segmentation loss L for each training sample seg , segmentation self-regulation loss L SR_F , classification loss function L cls and classification self-regulation loss L SR_V , and sum it up as the loss value d r , then through d r Calculate the G r The weight parameter θ r The partial derivative g r ; Then use the stochastic gradient descent method, through the partial derivative gr For G r The weight parameter θ r Update and get the network model G of this iteration r ;
[0099] In this example, the current segmentation model G r The weight parameter θ r The formula for updating is:
[0100]
[0101]
[0102] in Represents the segmentation model G r The updated weight parameter, α r represents the learning rate of the rth iteration;
[0103] (3d) Determine whether r = R. If so, obtain the trained three-dimensional brain tumor MRI image segmentation network model G based on the self-adjustment strategy. * , otherwise let r=r+1, G r =G, and execute step (3b);
[0104] Step 4) Obtain brain tumor image segmentation results:
[0105] The preprocessed test sample set T e As the network model G r Forward reasoning and post-processing of the input: for the test sample image I n The segmentation result F n , according to the coordinates of the bounding box recorded by preprocessing a l Fill 0 around it to restore the spatial size of the segmentation result to the same size as the image before preprocessing. l The same is used to obtain the segmentation result of each test sample.
[0106] The following is a further description of the technical effects of the present invention in conjunction with simulation experiments:
[0107] 1. Experimental conditions:
[0108] The network model and training process of the experiment are implemented with the pytorch framework. The graphics card used is GeForce RTX2080Ti, with 11GB of video memory. Each training takes about 40 hours. The experiment uses the BraTS2019 brain tumor segmentation dataset. This dataset comes from the Multimodal Brain Tumor Segmentation Challenge. Its data contains preoperative multimodal MRI scan data of glioblastoma and low-grade glioma obtained from multiple clinical institutions, and is accompanied by real segmentation annotations provided by radiologists certified by the expert committee. All data are in NIFTI format, and the scan data contains four modalities: T1, T1ce, T2, and FLAIR. The three mutually inclusive tumor regions are: 1) the whole tumor region (whole tumor, WT), which includes three types of tumor regions: edema, non-enhanced tumor, and enhanced tumor core; 2) tumor core region (tumor core, TC), which includes two types of regions except edema; 3) enhancing tumor core (enhancing tumor, ET). After certain preprocessing, the dataset has been aligned to the same anatomical template and interpolated to the same 1mm 3 spatial resolution and removal of the skull.
[0109] 2. Experimental content and results analysis:
[0110] (1) Evaluation indicators:
[0111] The main calculated indicators are Dice score and Hausdorff distance (HD). The Dice score reflects the similarity of the two sets. When the Dice score is 1, the predicted and annotated tumor regions completely overlap. The HD distance measures the shape similarity of the two regions by the distance between the edges. When the HD is 0, the two regions completely overlap. This indicator is generally expressed as HD95.
[0112] (2) Experimental content:
[0113] Before training, the dataset was cropped in the nnU-Net way, retaining only the central area with lesions, and normalized. Due to the limitation of GPU memory, the network needs to take smaller image blocks as input. In this experiment, the input block size is set to 128×128×128. During training, the input image and mask are randomly cropped to the input block size, and a variety of data augmentation strategies are used, including: random scaling between 0.7 and 1.4 times, random rotation from -30° to 30° in three dimensions, random mirror flipping in three dimensions, adding Gaussian noise, Gaussian blur, random brightness and contrast adjustment between 0.75 and 1.25, downsampling to simulate low resolution, and random gamma transformation between 0.7 and 1.5.
[0114] During training, random gradient descent is used to learn the network weights. The initial learning rate is set to 0.005, the momentum parameter is 0.9, and the weight decay rate is 0.0001. The "poly" strategy is used to adjust the learning rate, and the power parameter is 0.9, that is, the learning rate of the nth round is reduced to (1-n / N) of the initial learning rate. 0.9 Each training batch contains 2 image patches, and the number of training iterations N is set to 20,000.
[0115] During the testing and reasoning process, image blocks are cropped from the original image using a sliding window method at a certain step length and input into the network. The output feature maps of multiple sliding windows are averaged to obtain the segmentation result of the whole image. During the testing phase, the program adopted a widely used enhancement scheme, and eight images obtained by mirroring the same three-dimensional image in three dimensions were input into the network, and then the output feature maps were flipped back and averaged to obtain the final output feature map to generate a more accurate segmentation result.
[0116] (3) Experimental results analysis:
[0117] The method proposed in the present invention is compared with other public brain tumor segmentation methods. Table 1 shows the Dice scores and Hausdorff distances HD of the segmentation results of different methods in three types of brain tumor regions.
[0118] Table 1
[0119]
[0120] It can be seen from the experimental results in Table 1 that the present invention has a higher accuracy rate of three-dimensional brain tumor image segmentation than the prior art.
[0121] In summary, the present invention has a higher accuracy rate in brain tumor segmentation than the prior art and has important practical significance. The above description is only a specific example of the present invention and does not constitute any limitation to the present invention. Obviously, for professionals in this field, after understanding the content and principles of the present invention, they may make various modifications and changes in form and details without departing from the principles and structures of the present invention. However, these modifications and changes based on the ideas of the present invention are still within the scope of protection of the claims of the present invention.
Claims
1. A 3D brain tumor MRI image segmentation method based on self-adjustment strategy. It is characterized in that The steps include: (1) Obtain training sample set and test sample set: Randomly select L three-dimensional brain tumor MRI images I with dimensions W×H×D×Q from the brain tumor MRI image segmentation dataset. l and the pixel-level segmentation mask S for each image l Composition of data set T a ={(I l ,S l )|1≤l≤L}, and for each 3D brain tumor MRI image I l After preprocessing, the preprocessed data set T a In the example, we randomly select M images I m and the corresponding pixel-level segmentation mask S m Composed of training sample set T r ={(I m ,S m )|1≤m≤M}, the remaining N images I n and the corresponding pixel-level segmentation mask S n Composed test sample set T e ={(I n ,S n )|1≤n≤N}, where L≥300, W, H, and D represent the width, height, and depth of the three-dimensional brain tumor MRI image, respectively, and Q is the number of data modes, that is, the number of channels, W≥100, H≥100, D≥100, and Q=4. M+N=L; (2) Construct a brain tumor MRI image segmentation network model G based on a self-regulatory strategy, which includes an encoder E, a decoder D, and a prediction module Y. The network structure uses the classic 3D U-Net as the backbone network, and the encoder downsamples and expands the number of channels to extract high-level semantic features. The decoder upsamples and restores the spatial size, and the jump connection restores the structural details of the feature map. (2a) Encoder E performs multi-scale feature extraction on the image, including K-level downsampling encoder sub-networks {E k |1≤k≤K}, K≥2, E k It consists of a 3D convolutional layer, an instance normalization layer, an activation function layer, and a pooling downsampling layer connected in sequence; the decoder D performs multi-scale feature recovery on the image, including a K+1-level upsampling encoder subnetwork {D k' |1≤k'≤K+1},D k' It consists of a 3D convolutional layer, an instance normalization layer, an activation function layer, and an upsampling layer connected in sequence, where the kth level E k After the 3D convolution layer, instance normalization layer, and activation function layer, the output is the same as the k'=K+1-k level D k' The output of is connected by skipping between channels; (2b) Each level D k' The outputs of the 3D convolutional layer, instance normalization layer, and activation function layer are combined with a prediction submodule Y k' Connect, Y k' First, the pixel category probability {F_seg k' |1≤k'≤K+1}, and then obtain the classification probability {v_cls k' |1≤k'≤K+1}; (2c) Take the last level pixel category probability F_seg K+1 , calculate the category label through argmax and get the segmentation result map; (3) Define the loss function L of the 3D brain tumor MRI image segmentation model G based on the self-adjustment strategy SR : L SR =L seg +λ 1 L cls +λ 2 L SR_F +λ 3 L SR_V (3a) Segmentation loss function L seg Segmentation loss function L seg Including the cross entropy loss function L ce_seg and Dice loss function L dice_seg : Where S k′ It represents the difference between F_seg obtained by downsampling the segmentation label S k' The same size k'-level segmentation map, P k' F_seg k' The three-dimensional space, Indicates S k' The jth voxel in F_seg k' For the j-th voxel in , softmax(·) represents the softmax activation function; Add the segmentation losses of multiple levels of output to get the total segmentation loss: where λ deep_i Indicates that different weights are assigned to the losses of different levels of output in deep supervision, and the segmentation losses of multiple levels of output are added together to obtain the total segmentation loss L seg ; (3b) Segmentation self-regulating loss function L SR_F The highest level pixel category probability F_seg K+1 Perform argmax operation and then convert it into one-hot encoding form to obtain the converted feature map one-hot (argmax (F_seg K+1 ), low-level pixel category probability {F_seg k' |1≤k'≤K} and one-hot(argmax(F_seg K+1 )) Calculate the cross entropy loss function. The segmentation loss function of this calculation process comes from the prediction results of the network itself, which is called the segmentation self-regulation loss function; (3c) Classification loss function L cls The multi-class classification task is used to determine whether each type of tumor area exists. This is used as an auxiliary task to supervise the training process of the network. The segmentation label S is globally pooled to obtain the global classification label Pool(S), which is combined with {v_cls k' |1≤k'≤K+1} calculate the classification loss and calculate L cls Using multi-category binary cross entropy loss function L bce_cls : Where C represents the total number of categories, S q represents the qth class segmentation label, Pool(S q ) means to perform global pooling operation on the qth class segmentation label to obtain the qth class global classification label, v_cls q represents the classification probability of the qth category, σ(·) represents the sigmoid function; the classification losses of different categories are added together to obtain the multi-category binary cross entropy loss function L bce_cls ; Then add the classification losses of multiple levels of output to get the total classification loss L cls ; (3d) Classification self-regulating loss function L SR-V The lowest classification probability Obtained through the sigmoid function Advanced Classification Probability and Calculate the classification loss function. The classification loss function in this calculation process comes from the prediction results of the network itself, which is called the classification self-regulation loss function; (3e) Overall loss function L SR The overall loss function L SR Including multi-level classification loss function, segmentation loss and segmentation, classification self-adjustment loss, using several hyperparameters λ to balance the weights of different losses, L SR It is expressed as: L SR =L seg +λ 1 L cls +λ 2 L SR_F +λ 3 L SR_V (4) Iteratively train the three-dimensional brain tumor MRI image segmentation network model G based on the self-adjustment strategy: (4a) The number of initial iterations is r, the maximum number of iterations is R, and the current brain tumor segmentation network model is G r , G r The weight parameter is θ r , and let r = 1, G r =G; (4b) From the preprocessed training sample set T r Randomly select B training samples without replacement as the network model G r The input is passed through the encoder E to obtain K downsampled feature maps Will And the output of encoder E, after passing through decoder D and prediction module Y, we get K+1 level pixel category probabilities {F_seg k' |1≤k'≤K+1} and K+1 level classification probability {v_cls k' |1≤k'≤K+1}; where B≥1; (4c) {F_seg k' |1≤k'≤K+1} and {v_cls k' |1≤k'≤K+1} into L SR , calculate the segmentation loss L for each training sample seg , segmentation self-regulation loss L SR_F , classification loss function L cls , classification self-adjustment loss L SR_V , and sum it up as the loss value d r , then through d r Calculate the G r The weight parameter θ r The partial derivative g r ; Then use the stochastic gradient descent method, through the partial derivative g r For G r The weight parameter θ r Update and get the network model G of this iteration r ; (4d) Determine whether r = R. If so, obtain the trained brain tumor MRI image segmentation network model G based on the self-adjustment strategy. * , otherwise let r=r+1, G r = G, and execute step (4b); (5) Obtain brain tumor segmentation results: The preprocessed test sample set T e As the network model G r The input is forward inferred and post-processed to obtain the segmentation result of each test sample, and finally a semantically annotated segmented image with pixel-by-pixel category probability is obtained.
2. The method for segmenting three-dimensional brain tumor magnetic resonance images based on a self-adjusting strategy according to claim 1, It is characterized in that For each brain tumor image I described in step (1) l For preprocessing, the implementation steps are: Each image and the corresponding segmentation mask (I l ,S l ), firstly transform the image I l The pixel values of are normalized according to the overall mean variance; then in the mask S l Find the minimum bounding box of the tumor area and record the coordinates a of the bounding box l , and use the bounding box as the boundary to simultaneously crop the image and mask to obtain the preprocessed image and segmentation mask 3. The three-dimensional brain tumor MRI image segmentation method based on the self-adjustment strategy according to claim 1, It is characterized in that The three-dimensional brain tumor MRI image segmentation network model G based on the self-adjustment strategy described in step (2a), wherein: K-level downsampling encoder subnetwork E k , there are 4 levels in total, namely K = 4, each of which is composed of a 3D convolutional layer, an instance normalization layer, an activation function layer, and a pooling downsampling layer connected in sequence; each level E k The convolution kernel size of the two 3D convolutional layers in is 3×3×3, the stride is 1, the surrounding padding is 1, the maximum pooling size is 2×2×2, the number of convolution kernels from level 1 to level 4 is 64, 128, 256 and 512 respectively, and the activation function layer uses the RELU activation function; K+1-level upsampling decoder subnetwork D k' , there are 5 levels in total, each of which is composed of a 3D convolution layer, an instance normalization layer, an activation function layer, and an upsampling layer connected in sequence; each level D k' The convolution kernel size of the two 3D convolution layers in the network is 3×3×3, the stride is 1, the surrounding padding is 1, the upsampling size is 2×2×2, the upsampling method is trilinear filtering, the number of convolution kernels from level 1 to level 5 are 1024, 512, 256, 128 and 64 respectively, and the activation function layer uses the RELU activation function; Each level D k' The outputs of the 3D convolutional layer, instance normalization layer, and activation function layer are combined with a prediction submodule Y k' There are 5 levels of prediction modules in total, each of which includes a 3D convolution layer with a convolution kernel size of 1×1×1, a step size of 1, and a number of convolution kernels of 4. The 1×1×1 convolution layer processing is equivalent to the fully connected layer processing. After convolution, the pixel category probability F_seg at each level is obtained. k' ; The output after the convolution kernel continues to be input into a global pooling layer, changing the feature map size of each channel to 1×1×1; finally, the classification probability v_cls of each channel is obtained through the fully connected layer k' ; The length of the fully connected layer is 4.
4. The method for segmenting three-dimensional brain tumor magnetic resonance images based on a self-adjusting strategy according to claim 1, It is characterized in that The loss function L of the brain tumor segmentation network model G based on the self-adjusting strategy is defined as described in step (3): SR : L SR =L seg +λ 1 L cls +λ 2 L SR_F +λ 3 L SR_V In actual training, a preheating dynamic adjustment strategy will be adopted for the weights of the two types of self-adjusting losses. The weights will increase linearly from 0 to the preset value as the training progresses, and then remain unchanged.
5. The method for segmenting three-dimensional brain tumor magnetic resonance images based on a self-adjusting strategy according to claim 1, It is characterized in that The stochastic gradient descent method described in step (4c) is used to adjust the current self-adjusting brain tumor segmentation network model G r The weight parameter θ r To update, the formula is: in, Represents the brain tumor segmentation network model G r The updated weight parameter, α r represents the learning rate of the rth iteration.
6. The method for segmenting three-dimensional brain tumor magnetic resonance images based on a self-adjusting strategy according to claim 1, It is characterized in that In step (5), the test sample set T e As the trained brain tumor segmentation network model G r The input is forward inferenced and post-processed, and the post-processing method is: For the test sample image I n The segmentation result F n , according to the coordinates of the bounding box recorded in the preprocessing l Fill 0 around it to restore the spatial size of the segmentation result to the same size as the image before preprocessing. l same.
