Magnetic resonance image segmentation method based on dense-unet and superpixels

By introducing dense modules and the Swish activation function into the U-Net network and combining them with a superpixel segmentation algorithm, the problems of reduced resolution and information loss in magnetic resonance image segmentation of the U-Net network are solved, achieving higher segmentation accuracy and precise segmentation of edge details.

CN116958555BActive Publication Date: 2026-02-06GUILIN UNIV OF ELECTRONIC TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310962110.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-02
Publication Date
2026-02-06
Estimated Expiration
2043-08-02

AI Technical Summary

Technical Problem

In existing technologies, U-Net-based networks suffer from reduced resolution and loss of spatial information in magnetic resonance image segmentation, resulting in low segmentation accuracy.

Method used

We employ a method that combines Dense-UNet with superpixels. By inserting dense modules into the U-Net network and using the Swish activation function, combined with a scale-adaptive superpixel segmentation algorithm, we can extract richer semantic features and preserve detailed information. Finally, we perform feature fusion to improve segmentation accuracy.

Benefits of technology

It improves the segmentation accuracy of magnetic resonance images, especially the segmentation effect on edge details is more accurate, and it shows better semantic segmentation performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116958555B_ABST
    Figure CN116958555B_ABST
Patent Text Reader

Abstract

The application discloses a magnetic resonance image segmentation method based on Dense-Unet and superpixels, and is characterized in that the method comprises the following steps: 1) data preprocessing; 2) improved UNet network; 3) superpixel segmentation; 4) result fusion; and 5) testing. The method has better semantic segmentation performance, can improve segmentation precision, and can segment more accurately in edge details.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of image segmentation, and particularly relates to a magnetic resonance image segmentation method based on Dense-Unet and superpixels. BACKGROUND

[0002] Up to now, there is no general theory for image segmentation. With the proposal of many new theories and new methods in various disciplines, many image segmentation methods combined with some specific theories and methods appear. The methods include feature space clustering analysis, fuzzy segmentation technology and wavelet transform segmentation method. The feature space clustering method for image segmentation is to express pixels in an image space with corresponding feature space points, to divide the feature space according to the clustering of the feature space points, and then to map them back to the original image space to obtain the segmentation result. However, the algorithm needs manual intervention for parameter setting to improve the segmentation speed, and does not consider the spatial information and is sensitive to noise and uneven gray scale. The fuzzy segmentation technology can be combined with many existing theories. The fuzzy segmentation technology is to define a fuzzy target by using different S-type membership functions, to select an S function with minimum uncertainty through an optimization process, and to enhance the relationship between the target and the pixels belonging to the target by using the function. However, the method is difficult in the selection of the membership function. The basic idea of the threshold image segmentation method based on wavelet transform is to first decompose the histogram of an image into wavelet coefficients at different levels by two-dimensional wavelet transform, to select a threshold according to a given segmentation criterion and the wavelet coefficients, and finally to mark the image segmentation region by using the threshold. The calculation of the segmentation algorithm is linearly changed with the size of the image. However, with the increase of the number of processed images, the segmentation time is long, and the under-segmentation or over-segmentation is prone to occur.

[0003] With the development of computer vision and image processing technology, using deep learning method to process MRI image has become a popular means. Since Hilton et al. proposed deep learning in 2006, deep learning has developed rapidly in the field of image processing, and the combination of disciplines has become closer according to the improvement of artificial intelligence, thus producing batch after batch of excellent research. In 2015, Long et al. proposed a fully convolutional network FCN (FCN for short) for image segmentation. The network replaces the fully connected layer with a convolutional layer and uses an upsampling operation to restore the dimension of the image. In order to let the filtered input data retain the spatial context information in the image when it is pushed to the deep network, it is proposed to fuse the output with the output of the shallower layer; Ronneberger et al. proposed U-Net, which adopts a symmetrical structure of encoder-decoder, and also uses skip connection between the down-sampling path and the up-sampling path for semantic information transmission; Gu et al. proposed CE-Net network, which uses ResNet as a feature extractor, introduces dense atrous convolution and residual multi-scale pooling to help information fusion, and effectively improves the segmentation effect; Su et al. proposed a multi-scale U-Net (MSU-Net) for medical image segmentation. The network adjusts the convolution block of the U-Net network, and forms a multi-scale block by combining multiple convolution sequences with different receptive fields, so that the network can obtain more diversified feature information and better feature maps from the image; Sinha et al. proposed to use a guided self-attention mechanism to obtain richer context-dependent relationships. This method can combine local features with their corresponding global features, and display mutual dependence channel mapping in an adaptive manner.

[0004] The continuous pooling and convolution of the network based on U-Net will reduce the resolution of the image, causing part of the spatial information to be lost, and it is difficult to extract more features, resulting in low segmentation accuracy. SUMMARY

[0005] The purpose of the present application is to overcome the shortcomings of the prior art and provide a magnetic resonance image segmentation method based on Dense-Unet and superpixels. This method has better semantic segmentation performance, can improve segmentation accuracy, and can segment more accurately in edge details.

[0006] The technical solution to achieve the purpose of the present application is:

[0007] A magnetic resonance image segmentation method based on Dense-Unet and superpixels, comprising the following steps:

[0008] 1) Data preprocessing: PASCAL VOC 2012 is used as the dataset, the size of the images in the dataset is set to 240*240, and the dataset is divided into training set and test set, and data augmentation is performed on the dataset, including horizontal mirror, Gaussian noise, Gaussian blur, changing contrast and size scaling, wherein:

[0009] 1-1) Horizontal mirror: horizontal mirror is realized by using the function provided by the image processing library or programming language, that is, the image is flipped from left to right, and MATLAB tool is used for image processing library;

[0010] 1-2) Gaussian noise: Gaussian noise is introduced by adding a random value obeying Gaussian distribution to each pixel of the image, and a random number generator is used to generate a random number obeying Gaussian distribution, and the random number is added to each pixel of the image;

[0011] 1-3) Gaussian blur: Gaussian blur is a commonly used image blurring technique, and Gaussian blur is realized by using Gaussian filter, which is a weight matrix used for convolution operation on the image, and the convolution operation is realized by weighted average of each pixel and its surrounding pixels;

[0012] 1-4) Changing contrast: changing the contrast of the image is realized by adjusting the range of pixel values, that is, histogram equalization is used to map the pixel values of the image to a new range, including:

[0013] 1-4-1) Calculate the histogram of the image to obtain the frequency distribution of each pixel value;

[0014] 1-4-2) Calculate the cumulative distribution function CDF equalization histogram;

[0015] 1-4-3) Map each pixel value in the image to the corresponding CDF value;

[0016] 1-5) Size scaling: image size scaling is realized by using the function provided by the image processing library or programming language, that is, pixel values are redistributed by using interpolation algorithm, and the nearest neighbor interpolation algorithm is used, which sets the value of each pixel to the value of its nearest neighbor pixel, specifically:

[0017] 1-5-1) Reduce or enlarge the input image to the target size;

[0018] 1-5-2) For each target pixel, find the nearest input pixel, and set the value of the target pixel to the value of the input pixel;

[0019] 2) Improved UNet network: The network architecture of UNet consists of two parts. One is the down-sampling network, which reduces the spatial dimension of the feature map and expands the number of feature maps by using convolution and max-pooling operations. A dense module is added to the original UNet down-sampling network, and the swish activation function is used to replace the original relu activation function. The other is the up-sampling network or the expansion network, which is similar to the down-sampling network, but is symmetrical. In the up-sampling network, a dense module and a swish activation function are also used. The pre-processed picture is input into the improved network model to obtain the prediction map. The dense convolution module is inserted into the UNet module to replace a part of the convolution fast, the swish activation function is used to replace the relu activation function, and the skip connection is performed between the encoder and the decoder. The decoder receives the features from the encoder to alleviate the problem of gradient disappearance and effectively extract features. The dense convolution module is composed of multiple convolution layers and multiple connections. The dense convolution module contains multiple convolution layers, each of which is composed of a convolution operation and a nonlinear activation function. The convolution operation extracts features by sliding a small filter, i.e. a convolution kernel, on the input feature map. The output feature map of each convolution layer is used as the input of the next convolution layer. The output feature map of each convolution layer in the dense convolution module is concatenated with the output feature map of all previous layers along the depth dimension. The Swish function is: f(x) = x sigmoid(x), and the sigmoid(x) is a nonlinear activation function of neurons: when x tends to negative infinity, sigmoid(x) tends to 0; when x tends to positive infinity, sigmoid(x) tends to 1; when x = 0, sigmoid(x) is 1 / 2. The special feature of Swish is that it is not a monotonic function, and its first and second derivatives are smooth, unlike ReLu, which has a turning point, i.e. a point where the derivative does not exist. Because Swish has the advantages of high calculation efficiency, smoothness and non-monotonicity, it is commonly used in mobile neural network architectures. When performing multi-ruptured muscle segmentation tasks, the smoothness of Swish can reduce the probability of gradient disappearance or gradient explosion and speed up the convergence of the network;

[0020] 3) Superpixel segmentation: In addition to the network, a scale-adaptive superpixel segmentation network is used, which is trained using the same data set. Specifically:

[0021] In the scale-adjustable superpixel segmentation algorithm, superpixels are generated sequentially, and for a single superpixel, a single pixel grows into a superpixel region according to the breadth-first search and greedy shortest path strategy, and a path distance threshold T is set in advance to limit the growth of the superpixel, and superpixels of different sizes are generated according to the image content, the growth of the superpixel region starts from a seed pixel, which is any pixel in the image, and then the adjacent pixels that meet the conditions are added to grow a superpixel, and superpixels of different sizes are generated on the image according to the complexity of the image, including:

[0022] 3-1) Add the seed s to the superpixel S K , and the path distance D K =0, (s, D s ) is added to the distance minimum priority queue Q;

[0023] 3-2) The superpixel P with the minimum path distance D p is popped out of the distance minimum priority queue Q (p, D p );

[0024] 3-2-1) If D p <T, the neighbors of p meet condition (1) or condition (2), and are added to the superpixel S k and the priority queue Q: for the adjacent pixel p nb , condition (1) p nb is not assigned to any superpixel; condition (2) p nb is not assigned to the superpixel S K , and the new path distance is less than the old path distance p nb , and the new path distance is calculated as

[0025] 3-2-2) If D p >=T, p is considered as a boundary pixel of the superpixel S K , and the neighbor pixels of p that are not assigned to any superpixel are added to the seed set X, and step 3-2) is executed in a loop until the priority queue Q is empty;

[0026] 3-3) Then a new seed is selected from the seed set X, and the seed is not assigned to any superpixel, and a new superpixel is generated from the seed, and steps 3-1) to 3-3) are executed in a loop;

[0027] 4) Result fusion: the results of step 2) and step 3) are fused, that is, the DenseUNet feature map is spliced with the superpixel segmentation result pixel by pixel, then the fused feature is globally pooled to obtain the final result;

[0028] 5) Test: input the training set in the data set PASCAL VOC 2012 into step 2) and step 3), fuse the results, compare the final segmentation result with the real label value, and obtain three parameter values, Dice coefficient DSC (Dice Similarity coefficient, referred to as DSC), JAC (Jaccard Index, referred to as JAC) and HD (Hausdorff Distance, referred to as HD), DSC measures the degree of overlap, HD represents the maximum distance of all minimum distances between the ground truth and the segmentation boundary, the larger the DSC and JAC values, the better the network performance; the smaller the HD value, the better the network performance, and the calculation method of the evaluation index is as follows, p is the pixel set of the predicted segmentation, g is the pixel set of the ground truth:

[0029] The calculation formula of DSC is:

[0030]

[0031] The relationship between JAC and DSC is as follows:

[0032]

[0033] The calculation formula of HD is:

[0034] HD (p,g) = max (h (p, g), h (g, p)),

[0035] h (p,g) = max min |a-b|,

[0036] h (g,p) = max min |b-a|,

[0037] The obtained result is compared with the results segmented by other models, if it is better than other models, the desired result is achieved, if it does not achieve the desired result, the unet network is retrained until the desired result output model is achieved.

[0038] Semantic segmentation is an important task in the field of computer vision, which aims to label each pixel in an image as a specific semantic class. However, traditional UNet semantic segmentation algorithms are insufficient in processing detailed information during the encoding feature extraction process, resulting in poor segmentation results in detail parts such as object edges. The technical solution inserts a dense block into the UNet network and uses a Swish activation function for training. By introducing the Dense-UNet model, the semantic features of the image are better extracted, and a rough semantic segmentation result is obtained. The technical solution uses a superpixel segmentation algorithm to divide the input image into a superpixel image. Superpixel segmentation divides the image into more continuous regions with certain semantic information, thereby retaining more detailed information. Finally, the technical solution fuses the high-level abstract semantic features with the detailed information of the superpixels to obtain an edge-optimized semantic segmentation result.

[0039] This method has better semantic segmentation performance, can improve segmentation accuracy, and can segment more accurately in edge details. BRIEF DESCRIPTION OF DRAWINGS

[0040] Figure 1 The method flowchart of the embodiment is shown in the figure.

[0041] Figure 2 The segmentation model structure diagram of the embodiment is shown in the figure.

[0042] Figure 3 The dense network module diagram of the embodiment is shown in the figure.

[0043] Figure 4 The activation function diagram of the embodiment is shown in the figure.

[0044] Figure 5 The superpixel segmentation algorithm flowchart of the embodiment is shown in the figure. DETAILED DESCRIPTION

[0045] The content of the present application will be further described below in combination with the drawings and embodiments, but is not limited to the present application.

[0046] Embodiment:

[0047] Reference Figure 1 A magnetic resonance image segmentation method based on Dense-Unet and superpixels, comprising the following steps:

[0048] 1) Data preprocessing: PASCAL VOC 2012 is used as the data set, the size of the image in the data set is set to 240*240, and the data set is divided into a training set and a test set. Data augmentation is performed on the data set, including horizontal mirror image, Gaussian noise, Gaussian blur, contrast change and size scaling.

[0049] 1-1) Up-down horizontal mirror image: horizontal mirror image is realized by using the function provided by the image processing library or programming language, that is, the image is flipped from left to right, and the image processing library uses MATLAB tool;

[0050] 1-2) Gaussian noise: Gaussian noise is introduced by adding a random value obeying Gaussian distribution to each pixel of the image, and Gaussian distribution random number is generated by using random number generator, and the random number is added to each pixel of the image;

[0051] 1-3) Gaussian blur: Gaussian blur is a commonly used image blurring technique, and Gaussian blur is realized by using Gaussian filter, which is a weight matrix used for convolution operation on the image, and the convolution operation is realized by weighted average of each pixel and its surrounding pixels;

[0052] 1-4) Change contrast: changing the contrast of the image is realized by adjusting the range of pixel values, that is, histogram equalization is used to map the pixel values of the image to a new range, including:

[0053] 1-4-1) Calculate the histogram of the image to obtain the frequency distribution of each pixel value;

[0054] 1-4-2) Calculate the cumulative distribution function CDF equalization histogram;

[0055] 1-4-3) Map each pixel value in the image to the corresponding CDF value;

[0056] 1-5) Size scaling: image size scaling is realized by using the function provided by the image processing library or programming language, that is, pixel values are redistributed by using interpolation algorithm, and the interpolation algorithm is nearest neighbor interpolation, which sets the value of each pixel to the value of its nearest neighbor pixel, specifically:

[0057] 1-5-1) Reduce or enlarge the input image to the target size;

[0058] 1-5-2) For each target pixel, find the nearest input pixel, and set the value of the target pixel to the value of the input pixel;

[0059] 2) Improved UNet network: the network architecture of UNet consists of two parts, one is the down-sampling network, which reduces the spatial dimension of the feature map and expands the number of feature maps by using convolution and max-pooling operation, and the dense module is added to the original UNet down-sampling network, and the swish activation function is used instead of the original relu activation function; The second is the up-sampling network or expansion network, which is similar to the down-sampling network operation, but is symmetrical, and the dense module and Swish activation function are also used in the up-sampling network, the preprocessed picture is input, and the prediction map is obtained through this improved network model, as shown in Figure 2As shown, the dense convolutional module is inserted into the Unet module, replacing a portion of the convolutional blocks, using swish activation function instead of relu activation function, and performing a skip connection between the encoder and the decoder, receiving features from the encoder on the decoder, while alleviating the problem of gradient vanishing and effectively extracting features, wherein, as shown Figure 3 As shown, the dense convolutional module is composed of multiple convolutional layers and multiple concatenations, the dense convolutional module contains multiple convolutional layers, each convolutional layer is composed of a convolution operation and a nonlinear activation function, the convolution operation extracts features by sliding a small filter, i.e. convolution kernel, on the input feature map, the output feature map of each convolutional layer is used as the input of the next convolutional layer, the output feature map of each convolutional layer in the dense convolutional module is concatenated with the output feature map of all previous layers, i.e. along the depth dimension, this connection method enables each convolutional layer to access information from all previous layers, thereby enhancing feature reuse and information flow, in order to maximize information flow between layers in the network, all layers (with matching feature map size) are directly connected to each other, in order to maintain the feedforward property, each layer obtains additional input from all previous layers and passes its own feature map to all subsequent layers, Figure 3 This layout is schematically illustrated, it is crucial to note that, compared with ResNets, this layout never combines features by summing them before passing them to a layer; instead, features are combined by concatenating them, thus, the 1th layer has 1 input, which is composed of the feature maps of all previous convolutional blocks, its own feature map is passed to all L-1 subsequent layers, which introduces L(L+1)) / 2 connections in an L-layer network, instead of just L in traditional architectures, due to its dense connection pattern, it is called dense convolutional network, DenseNet, DenseNet requires fewer parameters than traditional convolutional networks, because there is no need to relearn redundant feature maps, traditional feedforward architectures can be viewed as algorithms with a state that is passed from layer to layer, each layer reads the state from its previous layer and writes it to the subsequent layer, it changes the state, but also passes information that needs to be preserved, in addition to better parameter efficiency, one of the great advantages of DenseNets is that they improve the information flow and gradients throughout the network, which makes them easy to train, each layer has direct access to the gradients from the loss function and the original input signal, resulting in implicit deep supervision, which helps to train deeper network architectures, in addition, it is also observed that dense connections have a regularization effect, which reduces overfitting to tasks with small training set sizes;

[0060] The activation function graph in this example is as shown Figure 4As shown, the function is: f(x) = x sigmoid(x), sigmoid(x) is the nonlinear function of the neuron: when x tends to negative infinity, sigmoid(x) tends to 0; when x tends to positive infinity, sigmoid(x) tends to 1; when x = 0, sigmoid(x) is 1 / 2, the special of Swish is that it is not a monotonic function, its first and second derivatives are smooth, unlike ReLu, which has a turning point, that is, there is a point where the derivative does not exist, because Swish has the advantages of high calculation efficiency, smoothness and non-monotonicity, it is often used in mobile neural network architecture, when performing multi-split muscle segmentation task, the smoothness of Swish can reduce the probability of gradient vanishing or gradient explosion, and speed up the convergence of the network;

[0061] 3) superpixel segmentation: in addition to the network, a scale adaptive superpixel segmentation network is used, which is trained using the same data set, specifically:

[0062] In the scale-adjustable superpixel segmentation algorithm, superpixels are generated sequentially. For a single superpixel, a single pixel grows into a superpixel region according to the breadth-first search and greedy shortest path strategy, and the path distance threshold T is set in advance to limit the growth of superpixels. Different sizes of superpixels are generated according to the image content. The growth of the superpixel region starts from a seed pixel, which is any pixel in the image. Then, adjacent pixels that meet the conditions are added to grow a superpixel. According to the complexity of the image, superpixels of different sizes are generated on the image, including:

[0063] 3-1) Add seed s to superpixel S K and path distance D K = 0, (s, D s ) is added to the distance priority queue Q;

[0064] 3-2) Superpixel P with minimum path distance D p is popped out of the distance priority queue Q (p, D p );

[0065] 3-2-1) If D p <T, the neighbors of p meet condition (1) or condition (2), add to superpixel S k and priority queue Q: for adjacent pixel p nb , condition (1) p nb is not assigned to any superpixel; condition (2) p nb is not assigned to superpixel S K and the new path distance is less than the old path distance p nbnew path distance The calculation formula is

[0066] 3-2-2) If D p >=T, p is regarded as the boundary pixel of the superpixel S K and the neighbor pixels of p which are not assigned to any superpixel are added to the seed set X, step 3-2) is executed in a loop until the priority queue Q is empty;

[0067] 3-3) Then a new seed is selected from the seed set X, and the seed is not assigned to any superpixel, and then a new superpixel is generated starting from the seed, steps 3-1) to 3-3) are executed in a loop;

[0068] 4) Result fusion: the results of steps 2) and 3) are fused, that is, the DenseUNet feature map is spliced with the superpixel segmentation result pixel by pixel, and then global pooling operation is performed on the fused features to obtain the final result;

[0069] 5) Test: input the training set in the data set PASCAL VOC 2012 into steps 2) and 3), fuse the results, compare the final segmentation result with the real label value, and obtain three parameter values, Dice coefficient DSC, JAC and HD, DSC measures the overlap degree, HD represents the maximum distance of all minimum distances between the ground truth and the segmentation boundary, the larger the DSC and JAC values, the better the network performance; the smaller the HD value, the better the network performance, and the calculation method of the evaluation index is as follows, p is the pixel set of the predicted segmentation, and g is the pixel set of the ground truth:

[0070] The calculation formula of DSC is:

[0071]

[0072] The relationship between JAC and DSC is as follows:

[0073]

[0074] The calculation formula of HD is:

[0075] HD (p,g) =max(h(p,g),h(g,p)),

[0076] h (p,g) =max min|a-b|,

[0077] h (g,p) =max min|b-a|,

[0078] The obtained result is compared with the results segmented by other models, if better than other models, the expected result is achieved, if not, the unet network is retrained until the expected result output model is achieved.

[0079] The segmentation results of the verification experiment are compared as shown in Table 1, which lists the quantitative results of DSC, JAC and HD, and compares and analyzes the Fcn, Unet, ResNet-34, CE-Net and MSU-Net models. Compared with U-Net, the method in this example improves DSC by 9.2%, JAC by 12.2%, and HD by 75.6%. Compared with CE-Net, the method in this example improves DSC by 11%, JAC by 14.1%, and HD by 72.6%. Compared with MSU-Net, the method in this example improves DSC by 2.6%, JAC by 2.3%, and HD by 35.7%. The experimental results show that the segmentation accuracy of the method in this example is better than most existing methods. Compared with other existing segmentation algorithms, the method in this example has better semantic segmentation performance in object edge details, and the performance of DSC and JAC is improved. This is because the dense convolution module is added to the network, which alleviates the gradient disappearance phenomenon to a certain extent, thereby increasing the depth of the network. The improved unet network module in step 2) has better performance with less parameters and less calculation amount, and the scale adaptive superpixel segmentation algorithm is fused, which can make the model more accurate in edge details. In addition, in the case of applying to the same image dataset and using the same network structure, the Swish function in the method in this example helps to improve the segmentation accuracy compared with the ReLU function,

[0080] Table 1:

[0081]

[0082]

Claims

1.A method for magnetic resonance image segmentation based on Dense-Unet and superpixels, characterized in that, Comprising the following steps: 1) data preprocessing: taking PASCAL VOC 2012 as the data set, setting the size of the image in the data set to 240*240, dividing it into a training set and a test set, and performing data augmentation on the data set, including horizontal mirror, Gaussian noise, Gaussian blur, changing contrast and size scaling, wherein: 1-1) horizontal mirror: horizontal mirror is realized by using the function provided by the image processing library or programming language, that is, the image is flipped from left to right, and the image processing library uses MATLAB tool; 1-2) Gaussian noise: Gaussian noise is introduced by adding a random value obeying Gaussian distribution to each pixel of the image, and a random number generator is used to generate a random number obeying Gaussian distribution, and the random number is added to each pixel of the image; 1-3) Gaussian blur: Gaussian blur is realized by using Gaussian filter, which is a weight matrix used for convolution operation on the image, and the convolution operation is realized by weighted average of each pixel and its surrounding pixels; 1-4) changing contrast: changing the contrast of the image is realized by adjusting the range of pixel values, that is, histogram equalization is used to map the pixel values of the image to a new range, including: 1-4-1) calculating the histogram of the image to obtain the frequency distribution of each pixel value; 1-4-2) calculating the cumulative distribution function CDF equalization histogram; 1-4-3) mapping each pixel value in the image to the corresponding CDF value; 1-5) size scaling: image size scaling is realized by using the function provided by the image processing library or programming language, that is, the pixel values are redistributed by using interpolation algorithm, and the interpolation algorithm is nearest neighbor interpolation, which sets the value of each pixel to the value of its nearest neighbor pixel, specifically: 1-5-1) reducing or enlarging the input image to the target size; 1-5-2) for each target pixel, find the nearest input pixel, and set the value of the target pixel to the value of the input pixel; 2) Improved UNet network: insert a dense convolution module into the Unet module, replace a part of the convolution block, replace the relu activation function with the swish activation function, make a jump connection between the encoder and the decoder, receive the features from the encoder on the decoder, and perform effective feature extraction while alleviating the gradient disappearance problem, wherein the dense convolution module is composed of multiple convolution layers and multiple connections, the dense convolution module contains multiple convolution layers, each convolution layer is composed of a convolution operation and a nonlinear activation function, the convolution operation extracts features by sliding a small filter, i.e. convolution kernel, on the input feature map, the output feature map of each convolution layer is used as the input of the next convolution layer, and the output feature map of each convolution layer in the dense convolution module is concatenated with the output feature map of all previous layers, i.e. along the depth dimension, the Swish function is: f(x) = x sigmoid(x), sigmoid(x) is a nonlinear function of neurons: when x tends to negative infinity, sigmoid(x) tends to 0; when x tends to positive infinity, sigmoid(x) tends to 1; when x = 0, sigmoid(x) is 1 / 2; 3) Superpixel segmentation: in addition to the network, a scale adaptive superpixel segmentation network is used, which is trained with the same data set, specifically: In the scale-adjustable superpixel segmentation algorithm, superpixels are generated sequentially. For a single superpixel, a single pixel grows into a superpixel region according to the breadth-first search and greedy shortest path strategy, and the path distance threshold T is set in advance to limit the growth of superpixels. Different sizes of superpixels are generated according to the image content. The growth of the superpixel region starts from a seed pixel, which is any pixel in the image. Then, adjacent pixels that meet the conditions are added to grow a superpixel. Different sizes of superpixels are generated on the image according to the complexity of the image, including: 3-1) Add seed s to superpixel S K and path distance D K = 0, (s, D s to distance lowest priority queue Q; 3-2) has the minimum path distance D p The superpixel P with the lowest distance D is popped from the distance priority queue Q(P, D p ). 3-2-1) If D p A neighbor of T, p, satisfies condition (1) or condition (2), is added to superpixel S k and priority queue Q: for a neighbor pixel p nb , condition (1) p nb is not assigned to any superpixel; condition (2) p nb is not assigned to superpixel S K and new path distance is less than old path distance p nb , new path distance is calculated as 3-2-2) If D p >= T, p is considered a boundary pixel of superpixel S K and add the neighbor pixels of p that are not assigned to any superpixel to the seed set X, loop step 3-2) until the priority queue Q is empty; 3-3) Then a new seed is selected from the seed set X, and the seed is not assigned to any superpixel. Then a new superpixel is generated from the seed, and steps 3-1) to 3-3) are executed in a loop. 4) Result fusion: fuse the results of steps 2) and 3), i.e. perform a pixel-by-pixel splicing operation on the DenseUNet feature map and the superpixel segmentation result, then perform global pooling on the fused features to obtain the final result. 5) Test: input the training set in the data set PASCAL VOC 2012 into steps 2) and 3), fuse the results, compare the final segmentation result with the real label value, obtain three parameter values, Dice coefficient DSC, JAC and HD, DSC measures the degree of overlap, HD represents the maximum distance of all minimum distances between the ground truth and the segmentation boundary, the larger the DSC and JAC values, the better the network performance; the smaller the HD value, the better the network performance, the calculation method of the evaluation index is as follows, p is the pixel set of the predicted segmentation, g is the pixel set of the ground truth: The calculation formula of DSC is as follows: The calculation formula of JAC is as follows: The calculation formula of HD is as follows: HD (p,g) = max(h(p,g), h(g,p)), h (p,g) = max min |a - b|, h (g,p) = max min |b - a|, Compare the obtained result with the results segmented by other models, if it is better than other models, the desired result is achieved, if the desired result is not achieved, the unet network is retrained until the desired result output model is achieved.

Citation Information

Patent Citations

  • Magnetic resonance image segmentation method and device, terminal equipment and storage medium

    CN110930397A

  • Brain tissue segmentation method based on Unet and superpixels

    CN112785603A