CN114972382A - Brain tumor segmentation algorithm based on lightweight UNet + + network - Google Patents
Brain tumor segmentation algorithm based on lightweight UNet + + network Download PDFInfo
- Publication number
- CN114972382A CN114972382A CN202210613167.XA CN202210613167A CN114972382A CN 114972382 A CN114972382 A CN 114972382A CN 202210613167 A CN202210613167 A CN 202210613167A CN 114972382 A CN114972382 A CN 114972382A
- Authority
- CN
- China
- Prior art keywords
- lightweight
- convolution
- brain tumor
- network
- segmentation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10072—Tomographic images
- G06T2207/10088—Magnetic resonance imaging [MRI]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20112—Image segmentation details
- G06T2207/20132—Image cropping
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20221—Image fusion; Image merging
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30004—Biomedical image processing
- G06T2207/30016—Brain
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
Abstract
The invention provides a lightweight brain tumor segmentation algorithm improved based on a UNet + + network model. Aiming at multi-mode accurate segmentation of brain tumor Magnetic Resonance Imaging (MRI), a UNet + + network model enables network structure semantic connection to be tight through dense long and short connections, but the dense connections enable the UNet + + network to have the problems of increased calculated amount and increased parameter amount, so that the UNet + + network training time is slow, and higher requirements are provided for hardware equipment. The lightweight UNet + + network model uses a lightweight residual module to replace a dual-layer convolution structure of UNet + + series, so that the calculation complexity and the parameter quantity of the network are reduced. The number of the characteristic diagram channels obtained after splicing of each layer is large due to intensive connection in the network model, the characteristics of some channels have no practical significance for the segmentation task, a CBAM attention mechanism is added behind the characteristic diagram, parameters are learned and screened, useful information is concerned, and the network segmentation precision is improved. And the lightweight residual error module is applied in the last downsampling, and the deep effective characteristics are better stored and utilized through the channel splicing of the lightweight residual error module, so that the brain tumor segmentation precision is further improved while the training time is reduced.
Description
Technical Field
The invention provides a brain tumor segmentation algorithm based on deep learning, which adopts a lightweight brain tumor segmentation algorithm improved based on a UNet + + network model. The improved lightweight UNet + + network model is applied to brain tumor nuclear magnetic resonance image segmentation, the accuracy of brain tumor internal tissue segmentation is improved while the overall segmentation accuracy is guaranteed, the lightweight module is applied, the calculation complexity and the parameter quantity of the whole model are effectively reduced, the training speed of the model is improved, and the problem that the model training is slow due to the complex structure of the UNet + + network is solved.
Background
At present, brain tumors are common malignant tumors threatening human life safety, have high invasiveness and various different histology sub-regions, and due to the inherent spatial heterogeneity and invasive growth of the brain tumors, complex pathological changes may occur inside the tumors, so that the gray scale, the shape, the texture, the histology characteristics and the like of brain tumor MRI images are changed, the brain glioma MRI images with various modalities present diversity and complexity, and thus, radiologists and other clinicians are difficult to identify and segment the brain tumors. Manual brain tumor segmentation requires very professional prior knowledge, is time-consuming and labor-consuming, is prone to errors, depends on the experience of doctors, and is still one of the challenging tasks in medical image analysis.
Deep learning shows a rapid development trend in recent years, and is widely applied to image segmentation. UNet + + networks use a series of meshed dense hop paths and encoder-decoder end-to-end structures, which have a good effect on brain tumor segmentation tasks. However, due to the structure, the network has huge parameters, which brings great challenges to the segmentation speed and the device memory, and is difficult to implement into practical applications.
Disclosure of Invention
The invention mainly aims at the problem that the complexity of a model structure is large and the parameter quantity is large in a 3D brain tumor image segmentation task of a UNet + + network model in processing, so that model training is slow, and provides a light-weight 3D UNet + + network model.
In order to achieve the purpose, the technical scheme of the invention is as follows:
a lightweight brain tumor segmentation algorithm based on UNet + + network model improvement comprises the following steps:
the method comprises the following steps: data preprocessing, namely changing a data set formed by the brain tumor nuclear magnetic resonance images into a size which can be trained by a network according to requirements;
step two: establishing a lightweight 3D UNet + + network model, and applying a lightweight residual error module, a lightweight residual error module and a CBAM attention mechanism in the model;
step three: training by using a lightweight 3D UNet + + network model to obtain a brain tumor image segmentation result;
the specific process in the step one is as follows:
(1) performing cross blocking processing on brain tumor nuclear magnetic resonance image data, dividing a brain tumor image with the size of 155 multiplied by 160 into 7 pixel blocks with the size of 32 multiplied by 160 (filling the part which is not divided sufficiently with a background image);
(2) because the brain tumor patients can generate four-modality brain tumor images in different imaging modes at the same time, four modalities (t1, t2, flair and t1ce) exist in each case in the data sets of the BraTS2018 and the BraTS2019, and the contrast of the images is different due to the difference of the imaging modes of nuclear magnetic resonance images between the modalities. Firstly, extreme value suppression is adopted on data to prevent the picture from generating large influence on the whole picture due to a maximum value or a minimum value, and then a Z-score method is adopted to standardize the image of each mode (namely, the image subtracts a mean value divided by a standard deviation) so as to further solve the problem of contrast difference;
the Z-score normalization formula can be expressed as:
where X is the input sample, μ is the mean of all sample data, and σ is the standard deviation of all sample data;
(3) cutting the brain tumor nuclear magnetic resonance image data, adjusting the input to a proper scale through cutting, and determining the background area as an invalid area due to a large proportion of the background in the whole image and the fact that the background area is not a segmented target area, so that the target area is not reduced;
(4) and (3) cutting and splicing, namely splicing the 32 × 160 × 160 pixel blocks at the same positions of the four modes in a new dimension to obtain 4 × 32 × 160 × 160 pixel blocks as the final input of the network. The patient expert-labeled brain tumor image was cross-blocked, from an image of 155 × 160 × 160 size, into 7 image blocks of 32 × 160 × 160 size (the insufficiently blocked portions were filled with background images), with 8 cross-channels in two consecutive blocks. The following operations are performed for each 32 × 160 × 160 size image block in triplicate. Enhanced, peri-tumoral edema and non-enhanced tumors were set to 1, with the remainder being background 0. Enhanced and non-enhanced tumors were set to 1, with the remainder being background 0. The enhanced tumor was set to 1, with the remainder being background 0. Obtaining three image blocks with the size of 32 multiplied by 160 through the operations, connecting the three pixel blocks in a new dimension to obtain the image blocks with the size of 3 multiplied by 32 multiplied by 160, and finally taking the obtained image blocks as the label of the whole network;
(5) enhancing data, namely enhancing the data of the brain tumor image by adopting affine transformation methods such as random cutting, random rotation, scaling, translation, miscut and the like;
the concrete conditions in the step two are as follows:
(1) applying a lightweight residual module and a lightweight residual module to a 3D UNet + + network to form a brain tumor segmentation network model:
the method comprises the following steps of (1) lightweight improvement of a residual error module and a residual error module;
the specific process for realizing the lightweight residual module comprises the following steps:
when the convolution feature extraction is carried out, the loss of deep feature information is larger than that of shallow convolution feature extraction, and the feature information loss can be reduced by applying a similar residual error module in a deep network. The residual error-like module firstly uses convolution of 1 multiplied by 1 to expand the channel domain in the main branch, expands the channel domain to 2.5 times of the original one, then uses convolution of 3 multiplied by 3 to extract the characteristics, and finally uses convolution of 1 multiplied by 1 to fuse the channel domain information. The input is not the superposition of the pixel points of the feature graph but the splicing of the channel domain after passing through the shortcut branch, and the mode is used for fully utilizing the feature graphs before convolution and after convolution;
the lightweight class residual error module further lightens the weight while keeping the segmentation precision advantage of the class residual error module, changes the common convolution with the original convolution kernel size of 3 into the grouping convolution to keep the structure of the convolution, and the grouping number is the convolution input channel number with the convolution kernel size of 3. In order to solve the problem that channel domain information cannot be interacted, after the modules are subjected to channel domain splicing, the convolution with the convolution kernel of 1 is adopted for information interaction between channels, and the channel domains are reduced at the same time, so that the purpose of reducing network parameters and calculated amount is achieved;
the lightweight class residual module can be expressed as:
x m+1 =Cat(x m ,F(x m ;W m ))
wherein x m To map parts, F (x) m ;W m ) The residual error part is similar, and Cat is characteristic diagram channel domain splicing;
the specific process for realizing the lightweight residual error module comprises the following steps:
the lightweight residual error module changes the convolution of the input channel number with convolution kernel 1 into original 1/4, then uses the convolution of convolution kernel 3 to extract the characteristics, and finally uses the convolution of convolution kernel 1 to expand the channel number to 2 times of the original input channel number, thereby achieving the purpose of reducing network parameters and calculation amount;
the lightweight residual module can be expressed as:
x l+1 =x l +F(x l ;W l )
wherein x l For the direct mapping part, F (x) l ;W l ) Is a residual error part;
in the training process, in order to reduce the influence of the class imbalance problem on the segmentation accuracy, the training adopts a mixed Loss function BCEDiceLoss formed by combining binary _ cross _ entropy and medical image Loss Dice Loss of two classes:
the specific process of calculating the cross entropy of the second classification comprises the following steps:
firstly, judging the output of model training, wherein the target area is marked as 1 and the non-target area is marked as 0 because a brain tumor segmentation picture marked by a doctor is preprocessed, so that the judgment that the loss input is a binary classification problem is judged, each point is a node in the training output of the network model, and judging and classifying whether the node is more than 0.5;
the specific process of calculating the cross entropy comprises the following steps:
L(p,t)=[-plog(t)+(1-p)log(1-t)]
p is the expected output of the preprocessed doctor labeling segmentation picture, and t is the output of the actual network model training;
the specific process of calculating the medical image loss DiceLoss comprises the following steps:
first, understanding the definition of the Dice coefficient, the Dice coefficient is a measurement function for measuring the similarity of a set, and is usually used for calculating the similarity of two samples, and finally, the value range of s is [0,1 ]:
x represents a segmented image, and Y represents a predicted segmented image, wherein | X ≧ Y | is the intersection between X and Y, and the coefficient 2 in the numerator is because X and Y are repeatedly calculated in the denominator;
the DiceLoss formula is defined as:
laplace smoothing (Laplace smoothing) is added to the Dice Loss, and since the Laplace smoothing is a modified value, the value is defined as 1e-5, namely, 1e-5 is added to the denominator of the Dice Loss:
laplacian smoothing can reduce overfitting, avoiding the problem of dividing the molecule by 0 when | X | and | Y | are both 0;
the final mixing loss is defined as:
in conclusion, after the mixed loss function BCEDiceLoss is used, the performance of a network model is improved, the precision of the Dice coefficient is ensured, the error of the model segmentation result and the result sketched by an expert is reduced, and the segmentation precision is improved;
thirdly, the constructed network model uses 3 times of down-sampling and 6 times of up-sampling, and a lightweight residual module is adopted to replace a UNet + + series double-layer convolution structure, so that the aim of lightening the network can be achieved, but compared with the original double-layer convolution structure, the residual structure only uses one convolution layer with a convolution kernel size of 3, and the rest is replaced by the convolution kernel with a convolution kernel size of 1, so that the feature extraction is insufficient, the segmentation precision is possibly reduced, a CBAM attention mechanism is added in the improvement process and is applied to the outermost layer of the U-shaped structure, namely a feature map obtained by splicing the channel domain after up-sampling, at the moment, the feature map is obtained by a series of long and short connections, although the sense ditch of the feature map is relatively small due to the series of long and short connections, the number of channels is large due to the multi-time splicing, and the features of some channels have no practical significance for the segmentation task, therefore, the CBAM attention module is used for learning and screening parameters, paying attention to useful information and improving the network segmentation precision. Because a certain semantic gap exists between the output characteristic diagram and the input characteristic diagram after convolution characteristic extraction, the lightweight residual error module is applied in the last downsampling, deep effective characteristics can be better stored and utilized through channel splicing of the lightweight residual error module, and the brain tumor segmentation precision is further improved.
(2) And adding a 3D convolution after the lightweight UNet + + network model, wherein the size of a convolution kernel is 1, and the number of channels is changed into 3, so that the output is consistent with the number of channels of the patient label marked by the preprocessed expert.
The concrete conditions in the third step are as follows:
(1) training by using a lightweight 3D UNet + + network model to obtain a brain tumor image segmentation result, performing sigmoid on the segmentation result once, judging whether the segmentation result is greater than 0.5, changing the result into 0 and 1, splicing, and reducing the result into a single channel according to three-channel definition to obtain a brain tumor segmentation result graph.
Compared with the prior art, the technical scheme of the invention has the beneficial effects that:
(1) the invention improves the UNet + + network model in a light weight way, improves the accuracy of segmenting the internal tissues of the brain tumor while ensuring the overall segmentation accuracy, and improves the training speed of the model by applying the light weight module, thereby effectively reducing the calculation complexity and the parameter quantity of the whole model, and solving the problem of slow network training speed of the UNet + + model caused by the complex network.
Drawings
FIG. 1 is a flow chart of the method of the present invention.
FIG. 2 is a lightweight class residual module of the present invention.
FIG. 3 is a lightweight residual module of the present invention.
Fig. 4 is a network model of lightweight UNet + + improved by the present invention.
Detailed Description
It will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted. The technical solution of the present invention is further described with reference to the drawings and the embodiments.
The invention provides a lightweight brain tumor segmentation algorithm improved based on a UNet + + network model, which can realize the segmentation of the whole brain tumor, the brain tumor core and the enhanced brain tumor core, efficiently obtain a high-precision brain tumor image segmentation map and be applied to the repeated measurement and evaluation of brain tumor nuclear magnetic resonance images.
Fig. 1 is a flow chart of the method of the invention, and the method comprises the steps of preprocessing a brain tumor nuclear magnetic resonance image, changing BraTS2018 and BraTS2019 into inputs required by a network, then constructing a lightweight UNet + + network model, training data by using the lightweight UNet + + network model, storing the network weight with the best effect, and realizing a segmentation task.
The specific implementation steps are as follows:
step1.1, carrying out cross blocking processing on the input brain tumor nuclear magnetic resonance image data;
step1.2, carrying out standardization treatment on the data after extreme value inhibition, respectively standardizing the image of each mode by adopting a Z-score method, and subtracting the mean value from the image and dividing the mean value by the standard deviation;
normalization using Z-score:
wherein μ is the mean of all sample data and σ is the standard deviation of all sample data;
step1.3 cutting the nuclear magnetic resonance image of the brain tumor to a proper scale, and removing an invalid region;
and step1.4, splicing blocks, namely splicing 32 × 160 × 160 pixel blocks at the same positions of four modes in a new dimension to obtain 4 × 32 × 160 × 160 pixel blocks as the final input of the network. The patient expert-labeled brain tumor image was cross-blocked, from an image of 155 × 160 × 160 size, into 7 image blocks of 32 × 160 × 160 size (the insufficiently blocked portions were filled with background images), with 8 cross-channels in two consecutive blocks. The following operations are performed for each 32 × 160 × 160 size image block in triplicate. Enhanced, peri-tumoral edema and non-enhanced tumors were set to 1, with the remainder being background 0. Enhanced and non-enhanced tumors were set to 1, with the remainder being background 0. The enhanced tumor was set to 1, with the remainder being background 0. Obtaining three image blocks with the size of 32 multiplied by 160 through the operations, connecting the three pixel blocks in a new dimension to obtain the image blocks with the size of 3 multiplied by 32 multiplied by 160, and finally taking the obtained image blocks as the label of the whole network;
enhancing Step1.5 data, and performing data enhancement on the brain tumor image by adopting affine transformation methods such as random cutting, random rotation, scaling, translation, miscut and the like;
step2.1 applies a lightweight residual module and a lightweight residual module to a 3D UNet + + network to form a brain tumor segmentation network model;
the network model constructed by Step2.1.1 uses 3 times of down sampling and 6 times of up sampling, and adopts a lightweight residual module to replace a UNet + + series double-layer convolution structure, so that the aim of lightening the network can be achieved, but compared with the original double-layer convolution structure, the residual structure only uses a convolution layer with a convolution kernel size of 3 once, and the rest is replaced by a convolution kernel with a convolution kernel size of 1, so that the feature extraction is insufficient, the segmentation precision is possibly reduced, a CBAM attention mechanism is added in the improvement process, and the method is applied to a feature map obtained by splicing channel domains after the up sampling of a U-shaped structure, at the moment, the feature map is obtained by a series of long and short connections, although the sense ditches of the feature map are relatively small due to the series of long and short connections, but the number of channels is large due to the multi-time splicing, and the features of some channels have no practical significance for the segmentation task, therefore, the CBAM attention module is used for learning and screening parameters, paying attention to useful information and improving the network segmentation precision, and meanwhile, the lightweight class residual error module is applied in the last downsampling, because certain semantic gaps exist between the output feature map and the input feature map after the convolution feature extraction, deep effective features can be better stored and utilized through the channel splicing of the lightweight class residual error module, and the brain tumor segmentation precision is further improved;
the specific process for realizing the lightweight residual module comprises the following steps:
when the convolution feature extraction is carried out, the loss of deep feature information is larger than that of shallow convolution feature extraction, and the feature information loss can be reduced by applying a similar residual error module in a deep network. The original residual module firstly uses convolution of 1 multiplied by 1 to expand the channel domain in the main branch, the channel domain is expanded to 2.5 times of the original domain, then uses convolution of 3 multiplied by 3 to extract the characteristics, and finally uses convolution of 1 multiplied by 1 to fuse the channel domain information. The input is not the superposition of the pixel points of the feature graph but the splicing of the channel domain after passing through the shortcut branch, and the mode is used for fully utilizing the feature graphs before convolution and after convolution;
the lightweight residual error module is further lightweight while retaining the advantage of segmentation precision of the original residual error module, the structure of the lightweight residual error module is retained by changing the common convolution with the original convolution kernel size of 3 into the grouped convolution, and the number of the grouped convolution is the number of convolution input channels with the convolution kernel size of 3. In order to solve the problem that channel domain information cannot be interacted, after the modules are subjected to channel domain splicing, the convolution with the convolution kernel of 1 is adopted for information interaction between channels, and the channel domains are reduced at the same time, so that the purpose of reducing network parameters and calculated amount is achieved;
the lightweight class residual module can be expressed as:
x m+1 =Cat(x m ,F(x m ;W m ))
wherein x m For the direct mapping part, F (x) m ;W m ) Splicing the residual error part and the Cat is a characteristic diagram channel domain;
the specific process for realizing the lightweight residual error module comprises the following steps:
the lightweight residual error module changes the convolution of the input channel number with convolution kernel 1 into original 1/4, then uses the convolution of convolution kernel 3 to extract the characteristics, and finally uses the convolution of convolution kernel 1 to expand the channel number to 2 times of the original input channel number, thereby achieving the purpose of reducing network parameters and calculation amount;
the lightweight residual module can be expressed as:
x l+1 =x l +F(x l ;W l )
wherein x l For the direct mapping part, F (x) l ;W l ) Is a residual error part;
in the training process of Step2.2, in order to reduce the influence of the class imbalance problem on the segmentation accuracy, the training adopts the cross entropy (binary _ cross _ entropy) of the two classes and the medical image Loss Dice Loss to be combined into a mixed Loss function BCEDiceloss;
the specific process of calculating the cross entropy of the second classification comprises the following steps:
firstly, judging the output of model training, wherein the target area is marked as 1 and the non-target area is marked as 0 because the brain tumor segmentation picture marked by a doctor is preprocessed, judging that the loss input is a binary classification problem, outputting the training of the network model, wherein each point is a node, and judging whether the node is more than 0.5 or not.
The specific process of calculating the cross entropy is as follows:
L(p,t)=[-plog(t)+(1-p)log(1-t)]
p is the expected output of the preprocessed doctor labeling segmentation picture, and t is the output of the actual network model training;
the specific process of calculating the Loss Dice Loss of the medical image comprises the following steps:
first, understanding the definition of the Dice coefficient, the Dice coefficient is a measurement function for measuring the similarity of a set, and is usually used for calculating the similarity of two samples, and finally, the value range of s is [0,1 ]:
x denotes a segmented image, and Y denotes a predicted segmented image, where | X ^ Y | is an intersection between X and Y, and the coefficient 2 in the numerator is because X and Y are repeatedly calculated in the denominator;
the Dice Loss formula is defined as:
laplace smoothing (Laplace smoothing) is added to the Dice Loss, and since the Laplace smoothing is a modified value, the value is defined as 1e-5, namely, 1e-5 is added to the denominator of the Dice Loss:
laplacian smoothing can reduce overfitting, avoiding the problem of dividing the molecule by 0 when | X | and | Y | are both 0;
the final mixing loss is defined as:
in conclusion, after the mixed loss function BCEDiceLoss is used, the performance of a network model is improved, the precision of the Dice coefficient is ensured, the error of the model segmentation result and the result sketched by an expert is reduced, and the segmentation precision is improved;
adding a 3D convolution after the network model on the Step2.3 to change the number of channels into 3, so that the output is consistent with the processed doctor labeling picture;
step3.1 training by using a lightweight 3D UNet + + network model to obtain a brain tumor image segmentation result, performing sigmoid on the segmentation result once, judging whether the segmentation result is greater than 0.5, changing the result into 0 and 1, splicing, and restoring to a single channel according to three-channel definition to obtain a brain tumor segmentation result graph.
Claims (4)
1. A lightweight brain tumor segmentation algorithm based on UNet + + network model improvement is characterized by comprising the following steps:
step 1: data preprocessing, namely changing a data set formed by the brain tumor nuclear magnetic resonance images into a size which can be trained by a network according to requirements;
step 2: establishing a lightweight 3D UNet + + network model, and applying a lightweight residual error module, a lightweight residual error module and a CBAM attention mechanism in the model;
step 3: and training by using a lightweight 3D UNet + + network model to obtain a brain tumor image segmentation result.
2. The UNet + + network model-based improved lightweight brain tumor segmentation algorithm according to claim 1, wherein the specific process in Step1 is as follows:
step1.1, performing cross blocking processing on input brain tumor nuclear magnetic resonance image data;
step1.2, carrying out standardization treatment on the data after extreme value inhibition, respectively standardizing the image of each mode by adopting a Z-score method, and subtracting the mean value from the image and dividing the mean value by the standard deviation;
normalization using Z-score:
wherein μ is the mean of all sample data and σ is the standard deviation of all sample data;
step1.3 cutting the nuclear magnetic resonance image of the brain tumor to a proper scale, and removing an invalid region;
and step1.4, splicing blocks, namely splicing 32 × 160 × 160 pixel blocks at the same positions of four modes in a new dimension to obtain 4 × 32 × 160 × 160 pixel blocks as the final input of the network. The patient expert-labeled brain tumor image was cross-blocked, from an image of 155 × 160 × 160 size, into 7 image blocks of 32 × 160 × 160 size (the insufficiently blocked portions were filled with background images), with 8 cross-channels in two consecutive blocks. The following operations are performed for each 32 × 160 × 160 size image block in triplicate. Enhanced tumors, peritumoral edema, and non-enhanced tumors were set to 1, with the remainder being background 0. Enhanced and non-enhanced tumors were set to 1, with the remainder being background 0. The enhanced tumor was set to 1, with the remainder being background 0. Obtaining three image blocks with the size of 32 multiplied by 160 through the operations, connecting the three pixel blocks in a new dimension to obtain the image blocks with the size of 3 multiplied by 32 multiplied by 160, and finally taking the obtained image blocks as the label of the whole network;
and (3) data enhancement is carried out on the brain tumor image by adopting affine transformation methods such as random cutting, random rotation, scaling, translation, miscut and the like.
3. The UNet + + network model-based improved lightweight brain tumor segmentation algorithm according to claim 1, wherein the specific process in Step2 is as follows:
step2.1 applies a lightweight residual module and a lightweight residual module to a 3D UNet + + network to form a brain tumor segmentation network model;
the network model constructed by Step2.1.1 uses 3 times of down sampling and 6 times of up sampling, and adopts a lightweight residual module to replace a UNet + + series double-layer convolution structure, so that the aim of lightening the network can be achieved, but compared with the original double-layer convolution structure, the residual structure only uses a convolution layer with a convolution kernel size of 3 once, and the rest is replaced by a convolution kernel with a convolution kernel size of 1, so that the feature extraction is insufficient, the segmentation precision is possibly reduced, a CBAM attention mechanism is added in the improvement process, and the method is applied to a feature map obtained by splicing channel domains after the up sampling of a U-shaped structure, at the moment, the feature map is obtained by a series of long and short connections, although the sense ditches of the feature map are relatively small due to the series of long and short connections, but the number of channels is large due to the multi-time splicing, and the features of some channels have no practical significance for the segmentation task, therefore, the CBAM attention module is used for learning and screening parameters, paying attention to useful information and improving the network segmentation precision, and meanwhile, the lightweight class residual error module is applied in the last downsampling, because certain semantic gaps exist between the output feature map and the input feature map after the convolution feature extraction, deep effective features can be better stored and utilized through the channel splicing of the lightweight class residual error module, and the brain tumor segmentation precision is further improved;
the specific process for realizing the lightweight residual module comprises the following steps:
when the convolution feature extraction is carried out, the loss of deep feature information is larger than that of shallow convolution feature extraction, and the feature information loss can be reduced by applying a similar residual error module in a deep network. The original residual module firstly uses convolution of 1 multiplied by 1 to expand the channel domain in the main branch, the channel domain is expanded to 2.5 times of the original domain, then uses convolution of 3 multiplied by 3 to extract the characteristics, and finally uses convolution of 1 multiplied by 1 to fuse the channel domain information. The input is not the superposition of the pixel points of the feature graph but the splicing of the channel domain after passing through the shortcut branch, and the mode is used for fully utilizing the feature graphs before convolution and after convolution;
the lightweight residual error module is further lightweight while retaining the advantage of segmentation precision of the original residual error module, the structure of the lightweight residual error module is retained by changing the common convolution with the original convolution kernel size of 3 into the grouped convolution, and the number of the grouped convolution is the number of convolution input channels with the convolution kernel size of 3. And then, in order to solve the problem that channel domain information cannot be interacted, after the modules are spliced, the modules adopt convolution with convolution kernel of 1 to carry out information interaction between channels, and simultaneously reduce the channel domain, thereby achieving the purpose of reducing network parameters and calculation amount. The lightweight class residual module can be expressed as:
x m+1 =Cat(x m ,F(x m ;W m ))
wherein x is m For the direct mapping part, F (x) m ;W m ) Splicing the residual error part and the Cat is a characteristic diagram channel domain;
the specific process for realizing the lightweight residual module comprises the following steps:
the lightweight residual error module changes the convolution of the input channel number with convolution kernel 1 into original 1/4, then uses the convolution of convolution kernel 3 to extract the characteristics, and finally uses the convolution of convolution kernel 1 to expand the channel number to 2 times of the original input channel number, thereby achieving the purpose of reducing network parameters and calculation amount;
the lightweight residual module can be expressed as:
x l+1 =x l +F(x l ;W l )
wherein x l For the direct mapping part, F (x) l ;W l ) Is a residual error part;
in the training process of Step2.2, in order to reduce the influence of the class imbalance problem on the segmentation accuracy, the training adopts the cross entropy (binary _ cross _ entropy) of the two classes and the medical image Loss Dice Loss to be combined into a mixed Loss function BCEDiceloss;
the specific process of calculating the cross entropy of the second classification comprises the following steps:
firstly, judging the output of model training, wherein the target area is marked as 1 and the non-target area is marked as 0 because a brain tumor segmentation picture marked by a doctor is preprocessed, so that the judgment that the loss input is a binary classification problem is judged, each point is a node in the training output of the network model, and judging and classifying whether the node is more than 0.5;
the specific process of calculating the cross entropy is as follows:
L(p,t)=[-plog(t)+(1-p)log(1-t)]
p is the expected output of the preprocessed doctor labeling segmentation picture, and t is the output of the actual network model training;
the specific process of calculating the Loss Dice Loss of the medical image comprises the following steps:
first, understanding the definition of the Dice coefficient, the Dice coefficient is a measurement function for measuring the similarity of a set, and is usually used for calculating the similarity of two samples, and finally, the value range of s is [0,1 ]:
x represents a segmented image, and Y represents a predicted segmented image, wherein | X ≧ Y | is the intersection between X and Y, and the coefficient 2 in the numerator is because X and Y are repeatedly calculated in the denominator;
the Dice Loss formula is defined as:
laplace smoothing (Laplace smoothing) is added to the Dice Loss, and since the Laplace smoothing is a modified value, the value is defined as 1e-5, namely, 1e-5 is added to the denominator of the Dice Loss:
laplacian smoothing can reduce overfitting, avoiding the problem of dividing the molecule by 0 when | X | and | Y | are both 0;
the final mixing loss is defined as:
in conclusion, after the mixed loss function BCEDiceLoss is used, the performance of a network model is improved, the precision of the Dice coefficient is ensured, the error of the model segmentation result and the result sketched by an expert is reduced, and the segmentation precision is improved;
and adding a 3D convolution after the network model on the Step2.3 to change the number of channels into 3, so that the output is consistent with the processed doctor labeling picture.
4. The UNet + + network model-based improved lightweight brain tumor segmentation algorithm according to claim 1, wherein the specific process in Step3 is as follows:
step3.1 training by using a lightweight 3D UNet + + network model to obtain a brain tumor image segmentation result, performing sigmoid on the segmentation result once, judging whether the segmentation result is greater than 0.5, changing the result into 0 and 1, splicing, and restoring to a single channel according to three-channel definition to obtain a brain tumor segmentation result graph.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210613167.XA CN114972382A (en) | 2022-06-01 | 2022-06-01 | Brain tumor segmentation algorithm based on lightweight UNet + + network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210613167.XA CN114972382A (en) | 2022-06-01 | 2022-06-01 | Brain tumor segmentation algorithm based on lightweight UNet + + network |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114972382A true CN114972382A (en) | 2022-08-30 |
Family
ID=82958396
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210613167.XA Pending CN114972382A (en) | 2022-06-01 | 2022-06-01 | Brain tumor segmentation algorithm based on lightweight UNet + + network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114972382A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117274184A (en) * | 2023-09-19 | 2023-12-22 | 河北大学 | Kidney cancer PET-CT image-specific prediction ki-67 expression method |
CN117893499A (en) * | 2024-01-15 | 2024-04-16 | 北京弗莱特智能软件开发有限公司 | Training method of medical image segmentation model and computer equipment |
-
2022
- 2022-06-01 CN CN202210613167.XA patent/CN114972382A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117274184A (en) * | 2023-09-19 | 2023-12-22 | 河北大学 | Kidney cancer PET-CT image-specific prediction ki-67 expression method |
CN117274184B (en) * | 2023-09-19 | 2024-05-28 | 河北大学 | Kidney cancer PET-CT image-specific prediction ki-67 expression method |
CN117893499A (en) * | 2024-01-15 | 2024-04-16 | 北京弗莱特智能软件开发有限公司 | Training method of medical image segmentation model and computer equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11488021B2 (en) | Systems and methods for image segmentation | |
Oskal et al. | A U-net based approach to epidermal tissue segmentation in whole slide histopathological images | |
Lee et al. | Mu-net: Multi-scale U-net for two-photon microscopy image denoising and restoration | |
Liu et al. | Robust color guided depth map restoration | |
CN111640120A (en) | Pancreas CT automatic segmentation method based on significance dense connection expansion convolution network | |
US20060214932A1 (en) | Fast graph cuts: a weak shape assumption provides a fast exact method for graph cuts segmentation | |
US20070223815A1 (en) | Feature Weighted Medical Object Contouring Using Distance Coordinates | |
CN112132959A (en) | Digital rock core image processing method and device, computer equipment and storage medium | |
CN115170582A (en) | Liver image segmentation method based on multi-scale feature fusion and grid attention mechanism | |
CN112598656A (en) | Brain tumor segmentation algorithm based on UNet + + optimization and weight budget | |
CN114972382A (en) | Brain tumor segmentation algorithm based on lightweight UNet + + network | |
CN115546270A (en) | Image registration method, model training method and equipment for multi-scale feature fusion | |
CN114119525A (en) | Method and system for segmenting cell medical image | |
CN112330701A (en) | Tissue pathology image cell nucleus segmentation method and system based on polar coordinate representation | |
Zhang et al. | LiteEnhanceNet: A lightweight network for real-time single underwater image enhancement | |
CN117437423A (en) | Weak supervision medical image segmentation method and device based on SAM collaborative learning and cross-layer feature aggregation enhancement | |
CN117115184A (en) | Training method and segmentation method of medical image segmentation model and related products | |
CN107516314B (en) | Medical image hyper-voxel segmentation method and device | |
Lee et al. | Speckle reduction via deep content-aware image prior for precise breast tumor segmentation in an ultrasound image | |
CN112348818A (en) | Image segmentation method, device, equipment and storage medium | |
CN115861250A (en) | Self-adaptive data set semi-supervised medical image organ segmentation method and system | |
Dinh et al. | Medical image fusion based on transfer learning techniques and coupled neural P systems | |
CN115239655A (en) | Thyroid ultrasonic image tumor segmentation and classification method and device | |
Li et al. | Unsupervised cross-modality domain adaptation for segmenting vestibular schwannoma and cochlea with data augmentation and model ensemble | |
Mansour et al. | Kidney segmentations using cnn models |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |