An image automatic segmentation method based on a multi-level multi-attention MLMA-UNet network
By using a multi-level, multi-attention MLMA-UNet network, combined with SE and CA modules, feature extraction and recalibration are optimized, solving the problem of high computational complexity in liver tumor segmentation using deep learning, and achieving high-precision automatic segmentation of liver and tumors.
Patent Information
- Application Number
- CN202310277220.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-21
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2043-03-21
AI Technical Summary
Existing deep learning techniques suffer from high computational complexity and low segmentation performance in liver tumor segmentation, resulting in inaccurate and time-consuming segmentation results.
A multi-level multi-attention MLMA-UNet network is adopted. By constructing a multi-level feature recalibration network and combining SE and CA modules, the feature extraction and recalibration capabilities are enhanced. A hybrid loss function is used to optimize model training and improve segmentation accuracy.
It achieves high-precision automatic segmentation of liver and tumors, reduces segmentation errors, and improves segmentation performance and computational efficiency.
Smart Images

Figure CN116309640B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, specifically to an automatic image segmentation method based on a multi-level multi-attention MLMA-UNet network. Background Technology
[0002] Target segmentation is a crucial component of image processing, and automated segmentation of the liver and tumors is a vital step in liver diagnosis and treatment planning. Clinically, manual segmentation is considered the gold standard in medical practice and research, with medical experts manually delineating liver and tumor regions using CT images. However, manual segmentation of the liver and tumors is a laborious, error-prone, and time-consuming task, potentially delaying the diagnostic process. Segmentation relies heavily on the knowledge and experience of specialists, which can lead to erroneous results. For these reasons, it is necessary to provide a network framework capable of automatically segmenting the liver and tumors with clinically acceptable accuracy and offering physicians informed decisions to reach more accurate conclusions in a shorter time.
[0003] Current segmentation methods for CT images can be categorized into traditional methods and deep learning algorithms. Non-machine learning algorithms include thresholding, graph cut, edge segmentation, fuzzy clustering, and wavelet transform. The segmentation accuracy of these algorithms depends on the quality of hand-designed features; however, to date, no feature is simple enough to distinguish between healthy and diseased tissues. Deep learning has been successfully applied in several fields, including automatic segmentation of liver tumors. Li et al. explored intra-slice and inter-slice features by introducing a hybrid feature fusion layer using 2D and 3D Dense-UNet. Pereira et al. successfully used multiple small convolutional kernel layers instead of large convolutional kernel layers in a tumor segmentation neural network. However, current deep learning-based liver tumor segmentation techniques suffer from high computational complexity and low segmentation performance.
[0004] In view of this, there is a need to provide a new image segmentation method in order to solve at least some of the above problems. Summary of the Invention
[0005] To address the issues of high computational complexity and low segmentation performance in current deep learning technologies for liver tumor segmentation, this invention provides an automatic image segmentation method based on a multi-level multi-attention MLMA-UNet network. This method is applied to the automatic segmentation of the liver and tumors in CT images, and features multi-level feature extraction and relabeling capabilities, resulting in better segmentation performance. Its multi-level feature extraction can capture more detailed information about the liver and tumors, enabling the segmentation of complex liver parenchyma and tumors with minimal segmentation error.
[0006] This invention provides an automatic image segmentation method based on a multi-level multi-attention MLMA-UNet network, comprising the following steps:
[0007] Step 1: Obtain the liver CT image dataset, perform layer-by-layer preprocessing on the CT images, standardize the format of the CT images, and augment the CT image dataset through data augmentation. Divide the liver CT image dataset into training set and test set.
[0008] Step 2: Construct a multi-level feature recalibration network segmentation model for liver and tumor, train the model using the training set, including training for liver segmentation and training for tumor segmentation, extract global and local features through multi-level extraction, and recalibrate the channel response of the aggregated multi-level features;
[0009] Step 3: Adjust the parameters of the multi-level feature recalibration network segmentation model and train it multiple times. When the model's loss function converges stably, a stable converged model is obtained. Test the trained model using a test set, construct a liver and tumor detection network, obtain liver and tumor segmentation results, and evaluate the network performance using statistical metrics.
[0010] Furthermore, the specific steps of step one include:
[0011] Step 1.1: Downsample the 512×512 CT image to a 256×256 CT image to reduce computational load;
[0012] Step 1.2: Use a (100, 400) HU value window to remove irrelevant organs from the CT images processed in Step 1.1;
[0013] Step 1.3: Normalize the image at the [0,1] level after step 1.2 to provide an image that is more easily proportional as the input image;
[0014] Step 1.4: Enhance the CT images by performing image transformations such as rotation, scaling, translation, flipping, and elastic deformation on the CT images processed in Step 1.3.
[0015] Furthermore, step two introduces the SE module, which adaptively recalibrates channel-level feature responses to realize the interdependencies between modeling channels, enhancing the network's ability to capture key channel information. Specifically:
[0016] First, the 3×3 convolutions in UNet are replaced with Res2Net bottleneck modules. The n-channel 3×3 convolutional filters are replaced with n dilated convolutional filters and multi-scale pooling layers. The Res2Net bottleneck module adds two residual unit structures to the UNet module, increasing the network's receptive field to capture multi-scale information without reducing resolution, extracting finer-grained features, and improving segmentation accuracy.
[0017] Then, the SE module is embedded into the Res2Net bottleneck module to refine the features, including: converting the fused multi-level channels into one-dimensional vectors; refining the features through the SE module includes recalibrating the features through two dense layers and automatically calculating the weights of the input channels; and scaling the channel weights using the input multi-level features.
[0018] Preferably, the SE module converts the fused multi-level channels into a one-dimensional vector, specifically including the following steps:
[0019] Global average pooling is applied to input features of size W×H×C received from a 1×1 convolution in the Res2Net module, where W represents the length of the feature vector in the horizontal direction, H represents the length of the feature vector in the vertical direction, and C represents the number of feature vector channels. All channels are then converted into one-dimensional vectors, with the dimension of the one-dimensional vector equal to the number of channels C. The global average pooling representation has a size of R. c For a one-dimensional vector Z, for any one of the C channels, the elements of the one-dimensional vector Z are as follows:
[0020]
[0021] Z C The input CT image features M c The set of transformation features, M, is a cluster of local descriptors. c (a, b) represents the feature vector of the input CT image at coordinates (a, b) in channel c, where a and b are the corresponding coordinate points in the horizontal and vertical directions, respectively. sqe () indicates an SE network.
[0022] Furthermore, the weighting formulas for the input channels along the height and width directions are as follows:
[0023]
[0024] Among them, F h F w These are convolution transformations along the height h and width w directions, respectively, where σ represents the Sigmoid function, and g... h g w These are attention weights along the height and width directions, respectively, used to reflect whether the object of interest to each element exists in the corresponding row and column.
[0025] Furthermore, a CA module is introduced to refine the features, capturing long-range dependencies along one spatial direction while retaining precise location information along another, thus enhancing the network's ability to capture target features. Specifically:
[0026] Convolutional kernels (H, 1) and (1, W) with two spatial ranges (horizontal and vertical) are used to encode along the horizontal and vertical directions, respectively. Here, W represents the length of the feature vector in the horizontal direction of the input features, and H represents the length of the feature vector in the vertical direction of the input features. This allows for feature aggregation along the horizontal and vertical directions, obtaining precise location information. Furthermore, the activation function fully captures the relationships between channels and the long-distance dependencies in either the horizontal or vertical spatial direction. This helps the model to more accurately locate and identify objects of interest and enhances the network's ability to learn and express features.
[0027] Preferably, aggregated information is used to obtain channel-related dependencies, and a simple two-layer fully connected gate mechanism with ReLU and Sigmoid activation functions is used to isolate the channel, thereby improving the network's generalization ability.
[0028] Furthermore, step two employs a hybrid loss function to train the network, accelerating function convergence, reducing network overfitting, and achieving the optimal performance point. The formula for the hybrid loss function is:
[0029]
[0030] Where L represents the mixture loss function, p i Let g be the probability that the sample is predicted to be positive. i The label represents the sample, N is the number of voxels, 1 for positive class and 0 for negative class, and i represents any one of the N voxels in the CT image.
[0031] Furthermore, the specific steps for adjusting the parameters of the multi-level feature recalibration network segmentation model in step three include:
[0032] Step 3.1: Use an initial learning rate of 1×e -5 The Adam optimizer is used to train the network, employing 8 mini-batches for training, while using 1×e -4 The weight decay factor is used to regularize the network weights;
[0033] Step 3.2: Train the multi-level feature recalibration network segmentation model, save the model every 10 epochs, and save the current model after the curve has been stable for 20 epochs.
[0034] Preferably, the specific steps in step three for evaluating network performance using statistical metrics are as follows:
[0035] The statistical metrics are performance indicators based on volume size similarity and surface distance measurement, namely, Dice Similarity Coefficient (DSC), Volume Overlap Error (VOE), and Relative Absolute Volume Difference (RAVD).
[0036] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0037] To address the issues of high computational complexity and low segmentation performance in current deep learning technologies for liver tumor segmentation, this invention provides an automatic image segmentation method based on a multi-level multi-attention MLMA-UNet network. This method is applied to the automatic segmentation of the liver and tumors in CT images, and features multi-level feature extraction and relabeling capabilities, resulting in better segmentation performance. Its multi-level feature extraction can capture more detailed information about the liver and tumors, enabling the segmentation of complex liver parenchyma and tumors with minimal segmentation error.
[0038] 1. This invention preprocesses and augments liver CT image data. Preprocessing enhances the contrast and grayscale difference between liver tissue and surrounding tissues in CT images, facilitating network recognition and feature extraction of the liver region. Data augmentation significantly expands the training dataset, increasing both the training load and the network's accuracy and generalization ability.
[0039] 2. This invention replaces the 3×3 convolutions in UNet with the bottleneck module of Res2Net, constructing hierarchical residual connections within a single residual block. This allows changes in the receptive field at a finer granular level to capture details and global features, thereby improving the multi-scale representation capability of the neural network.
[0040] 3. This invention, through the SE module, enables adaptive recalibration of channel-level characteristic responses to model interdependencies, and enhances the network's ability to capture key channel information with a slight increase in computational cost, resulting in significant performance improvements to the network.
[0041] 4. This invention uses a CA module to decompose channel attention into two feature encoding processes, aggregating features along the horizontal and vertical spatial directions respectively. In this way, it achieves the ability to capture long-range dependencies along one spatial direction while retaining precise location information along the other, thus enhancing the network's ability to target the liver and tumors.
[0042] 5. The hybrid loss function designed in this invention achieves further optimization of the function, accelerates function convergence, reduces network overfitting, and reaches the optimal performance point. Attached Figure Description
[0043] Figure 1 A flowchart of the automatic image segmentation method based on a multi-level multi-attention MLMA-UNet network of the present invention is shown;
[0044] Figure 2 The diagram shows the multi-level multi-attention MLMA-UNet network framework of the automatic image segmentation method based on the multi-level multi-attention MLMA-UNet network of the present invention;
[0045] Figure 3 The image shows CT results of liver and tumor segmentation during test training according to an embodiment of the present invention;
[0046] Figure 4 The p-values of the automatic image segmentation method based on the multi-level multi-attention MLMA-UNet network of the present invention are shown for different models with different sample sizes and significance levels of 0.05. Detailed Implementation
[0047] The following description, in conjunction with the accompanying drawings and specific implementation methods, provides a more detailed explanation of the automatic image segmentation method based on a multi-level multi-attention MLMA-UNet network according to the present invention.
[0048] This invention presents an automatic image segmentation method based on a multi-level multi-attention MLMA-UNet network. The multi-level multi-attention refers to Multi-Level Multi-Attention, where ML stands for Multi-Level, corresponding to the UNet and Res2Net bottleneck modules in the MLMA-UNet network. These multi-level modules provide more segmentation-friendly information, expand the network's path count, and significantly improve performance; however, they inevitably introduce some invalid features, leading to segmentation errors. MA stands for Multi-Attention, corresponding to the SE and CA modules in the MLMA-UNet network. These two attention modules better help the network focus on the feature information of the liver and tumor from both channel and spatial perspectives, reducing feature redundancy caused by the multi-level approach.
[0049] Step 1: Obtain the publicly available liver medical image dataset (3Dircadb) and perform preprocessing and data augmentation operations on the entire CT data layer by layer.
[0050] The first step, medical image processing, will expose the liver CT dataset in a standardized format and augment the dataset through data enhancement. The process is designed as follows:
[0051] Step 1.1: Downsample the 512×512 CT image to 256×256 to reduce computational load;
[0052] Step 1.2: Use a (100, 400) HU value window to remove most of the irrelevant organs from the CT slices of the image obtained in Step 1.1;
[0053] Step 1.3: Normalize the dataset obtained in Step 1.2 on the same scale [0,1] to provide images that are more easily proportional as input images;
[0054] Step 1.4: Perform image transformations such as rotation, scaling, translation, flipping, and elastic deformation on the dataset obtained in Step 1.3 to enhance the training images;
[0055] Step 2: Construct a multi-scale feature recalibration network segmentation model for liver and tumors. This step improves the receptive field of the convolutional neural network using a multi-scale approach, extracting global and local features at a finer granular level. The channel responses of the aggregated multi-scale features are recalibrated, enhancing the network's high-level feature description capabilities.
[0056] Step two involves a multi-scale recalibration network segmentation model for liver and tumors. The SE and CA modules are embedded into the Res2Net bottleneck module, and the 3×3 convolutions in UNet are replaced with the Res2Net bottleneck module. The Res2Net bottleneck module adds two residual unit layers to the UNet module, increasing the network's receptive field size and extracting finer-grained features. By leveraging the multi-level feature extraction capabilities of the Res2Net bottleneck module and the improved receptive field of the SE module, segmentation performance is improved. Specifically, the process is designed as follows:
[0057] Step 2.1: Embed the SE module into the Res2Net bottleneck module and replace the convolution in UNet with the Res2Net bottleneck module to improve segmentation performance by leveraging multi-scale feature extraction capabilities and improved receptive fields.
[0058] Here, the Res2Net bottleneck module replaces the n-channel 3×3 convolutional filter with n dilated convolutional filters and multi-scale pooling layers. Since the liver and tumor subbands vary significantly among different patients, information at different scales is crucial for segmentation. Segmentation networks often employ a series of downsampling operations to obtain a larger receptive field, but this comes at the cost of reduced resolution. Therefore, the advantage of dilated convolutions and multi-scale pooling layers is that they can increase the network's receptive field to capture multi-scale information without reducing resolution, thus improving segmentation accuracy. The dilated convolutional filters and multi-scale pooling layers are connected in a hierarchical residual manner to increase the representation of output features at different scales.
[0059] All feature maps with different proportions are concatenated and then fused with complete information using a 1×1 filter.
[0060] After the input features are processed by a 1×1 convolution in the bottleneck module of Res2Net, they are divided into s subsets, such that each subset has the same spatial size and sum as the input features. The channel s is a positive integer.
[0061] Step 2.2 refines the features using the SE module. First, the fused multi-scale channels are converted into one-dimensional vectors. Second, the SE module recalibrates the features through two dense layers and automatically calculates the weights of the input channels. Then, the channel weights are scaled using the input multi-scale features to improve the network's feature representation capability. CT images of the liver and tumors contain a lot of abstract information that is difficult to understand, such as color, texture, and grain. The liver and tumors possess unique features compared to other tissues. Therefore, the channel information will inevitably include channels with high correlation to the liver and tumors, as well as channels with low correlation. The SE network, through feature map compression, activation, and reassignment of different channels, ensures that channels with strong correlation to the liver and tumors receive higher network attention.
[0062] Compared to ordinary images, medical CT images are limited by the structure of human bones and organs and the imaging method. CT images show many interconnected organs and tissues, including the liver and tumors, leading to detection bias in the network. The CA module focuses the network on the target location, strengthening the spatial information weights of the feature map and reducing the weights of irrelevant information. This improves the model's segmentation efficiency and accuracy.
[0063] Step 2.3 refines the features using the CA module. First, the input multi-scale features are aggregated along two directions, and the attention module captures long-term dependencies along one spatial direction while preserving precise location information along the other spatial direction. Then, the obtained feature information is concatenated and subjected to a feature transformation with shared weights to obtain attention weights for the two directions.
[0064] By embedding Coordinate information and encoding and feature aggregation along both the horizontal and vertical coordinate spaces, we can simultaneously obtain the target's cross-channel information and its position information in different directions.
[0065] Coordinate Attention uses convolutional kernels (H, 1) and (1, W) in two spatial ranges (horizontal and vertical) to encode along the horizontal and vertical directions, thereby aggregating features along the horizontal and vertical directions to obtain accurate location information. It also fully captures the relationships between channels and long-distance dependencies in either the horizontal or vertical spatial direction through the activation function. This helps the model to more accurately locate and identify objects of interest and enhances the network's ability to learn and express features.
[0066] Step 3: Adjust the model parameters from Step 2 and train the model multiple times until a stable and converged image segmentation model is obtained. This model can provide corresponding liver and tumor results based on the input liver CT image. Statistical metrics are used to evaluate the network performance.
[0067] The process of adjusting the model parameters and specific statistical measures in step two in step three is designed as follows:
[0068] Step 3.1, using an initial learning rate of 1×e -5 The Adam optimizer is used to train the network, employing 8 mini-batches. To avoid overfitting, 1×e2 is used. -4 The weight decay factor is used to regularize the network weights.
[0069] Step 3.2: Adjust the parameters of the model from Step 2 to ensure the stability of the model loss function curve. Save the model every 10 epochs. After the curve has been stable for 20 epochs, save the current model.
[0070] Step 3.3: Evaluate the similarity between the liver and tumor images segmented by the algorithm in this paper and their corresponding labels, compare the segmentation performance of the algorithm in this paper with that of other algorithms, and evaluate the network performance using statistical metrics;
[0071] In sub-step 2.1 of step two, the Res2Net module replaces the n-channel 3×3 convolutional filters with n dilated convolutional filters and multi-scale pooling. The dilated convolutional filters and multi-scale pooling are connected in a hierarchical residual manner to increase the representation of output features at different scales. The feature maps of all subsets are concatenated and fused using a 1×1 filter to achieve complete information fusion. After 1×1 convolution, the input features are divided into s subsets, ensuring that each subset has the same spatial size and depth as the input features. The passage.
[0072] The original U-Net network has a limited receptive field in its convolutions, resulting in insufficient extraction of high-resolution liver edge and complete tumor image features. To address this issue, dilated convolution modules are added to the residual U-Net network architecture, forming a dilated residual structure. Dilated convolutions can effectively expand the image receptive field without sacrificing image resolution. A larger receptive field allows the segmentation network to capture more information, enabling the systematic aggregation of multi-scale contextual information. This is particularly beneficial for improving the detection and segmentation accuracy of organs, especially tumors, that occupy only a small proportion of the overall image in medical images. The receptive field is the size of the region mapped to the pixels of the local feature map obtained after convolution operations with a specified kernel. The formula for the receptive field and the kernel is as follows:
[0073] r1=(ksize-1)×(d-1)+ksize
[0074] RF i+1 =RF i +(r1-1)×stride
[0075] Where ksize is the original kernel size, r1 is the receptive field size of the dilated kernel, d is the dilation ratio, (d-1) is the number of spaces to be filled, stride is the stride of the convolution operation, and RF... i For the next layer of sensory field, RF i+1 This represents the current size of the sensory field.
[0076] In sub-step 2.2 of step two, during the feature refinement operation of the SE network, the input features are transformed in the following way: global average pooling is applied to the input features of size W×H×C received from the 1×1 convolution in the Res2Net module, and all channels are converted into one-dimensional vectors. The dimension of the one-dimensional vector is equal to the number of channels C, where W represents the length of the feature vector in the horizontal direction, H represents the length of the feature vector in the vertical direction, and C represents the number of channels in the feature vector. The global average pooling representation is of size R. c A one-dimensional vector Z. For any one of the C channels, the elements of the one-dimensional vector Z are as follows:
[0077]
[0078] Z C The input CT image features M c The set of transformation features, M, is a cluster of local descriptors. c (a,b) represents the feature vector of the input CT image at coordinates (a,b) in channel c, F sqe () indicates an SE network.
[0079] In sub-step 2.3 of step two, during the feature refinement operation of the CA module, the given 2D feature image (C×H×W) is first adaptively pooled in the vertical (H) and horizontal (W) directions using three different convolutional kernels (1×H) and (1×W), respectively, where W represents the length of the feature vector in the horizontal direction and H represents the length of the feature vector in the vertical direction. This allows us to retain positional information in a specific direction instead of compressing global information onto a single channel. These two horizontal and vertical transformations also allow our module to perform non-linear activation along these two spatial directions to capture long-range dependencies, while retaining precise positional information along the other spatial direction.
[0080] Therefore, the output of the c-th channel at the vertical direction h and the horizontal direction w can be expressed as:
[0081]
[0082]
[0083] x c(h,i) represents the component of the input feature vector x at the vertical direction of h. c (w,i) is the component of the input feature vector x at the horizontal direction w, where W represents the pixel width of the input CT image, H represents the pixel length of the input CT image, and i and j represent any point on the width or length of the CT image, respectively.
[0084] The obtained components By applying two 1×1 convolution kernels and a sigmoid function, attention weights in two directions are obtained. The formulas for the attention weights along the height and width directions are as follows:
[0085] g h =σ(F h (z h ))
[0086] g w =σ(F w (z w ))
[0087] F h F w These are convolutional transformations in the height and width directions, respectively, where σ represents the Sigmoid function, and g... h g w These are the attention weights in two directions, reflecting whether the object of interest for each element exists in the corresponding row and column. Finally, the horizontal and vertical attention weights are multiplied by the input feature vector to obtain the final feature vector y. c (i,j)°y c (i,j) can be represented as:
[0088]
[0089] This encoding process enables our coordinate attention to more accurately locate the exact position of the object of interest, thereby helping the entire model to better identify objects.
[0090] In substep 2.2 of step two, aggregated information is used to obtain channel-related dependencies. To isolate channels and improve the network's generalization ability, a two-layer fully connected simple gate mechanism is adopted, which uses both ReLU and Sigmoid activation functions simultaneously.
[0091] In step two of network training, the cross-entropy loss function is often used to measure the performance of medical image segmentation and classification, while the Dice loss function is often used to measure the balance between positive and negative samples in medical images. In medical images, the liver, especially liver tumors, accounts for a particularly small proportion in CT images, easily causing the loss function to get trapped in a local minimum. To address the class imbalance problem, this invention uses the sum of the dice coefficient and the cross-entropy loss function. The dice loss function directly measures the similarity between two samples and accordingly optimizes the network weights by minimizing the loss. The formula for the dice loss function is:
[0092]
[0093] In the formula, p i Let g be the probability that the sample is predicted to be positive. i The label represents the sample, N is the number of voxels, and i is any one of the N voxels in the CT image.
[0094] The cross-entropy loss function is:
[0095]
[0096] In the formula, p i Let g be the probability that the sample is predicted to be positive. i The label represents the sample, N is the number of voxels, and i is any one of the N voxels in the CT image, with 1 for positive classes and 0 for negative classes. The closer the segmentation result of the liver and its tumor is to the true sample label value, the smaller the loss function L value and the better the robustness of the model; conversely, the greater the difference between the segmentation result of the liver and its tumor and the sample label, the larger the loss function L value and the worse the robustness of the model.
[0097] The statistical metrics in sub-step 3.3 of step three are performance indicators based on volume size similarity and surface distance metrics, namely, Dice Similarity Coefficient (DSC), Volume Overlap Error (VOE), and Relative Absolute Volume Difference (RAVD). Volume Overlap Error uses the Jaccard coefficient (JC) or Union-Intersection (IOU). The formulas for DSC, VOE, and RACD are as follows:
[0098]
[0099] In the formula, A is the actual label voxel, and B is the segmentation result voxel.
[0100] Table 1 Comparison of the present invention with other methods
[0101] method DSC (%) VOE (%) RAVD (%) UNet 51.0 62.55 38.42 ResNet 62.00 42.60 4.12 mU-Net 70.87 31.16 0.76 MLMA-UNet 84.15 27.76 0.22
[0102] As shown in the table, our invention (multi-level multi-attention MLMA-UNet method) achieved the best performance compared to other methods on the same dataset. Regarding the Dice Similarity Coefficient (DSC) metric, a higher metric indicates more accurate segmentation results.
[0103] This invention proposes an automatic image segmentation method based on a multi-level multi-attention MLMA-UNet network. The above embodiments are only for illustrating the technical concept and features of this invention, and are intended to enable those skilled in the art to understand the content of this invention and implement it accordingly. They should not be construed as limiting the scope of protection of this invention. All equivalent changes or modifications made in accordance with the spirit and essence of this invention should be covered within the scope of protection of this invention.
Claims
1. An automatic image segmentation method based on a multi-level multi-attention MLMA-UNet network, characterized in that, Includes the following steps: Step 1: Obtain the liver CT image dataset, perform layer-by-layer preprocessing on the CT images, standardize the format of the CT images, and augment the CT image dataset through data augmentation. Divide the liver CT image dataset into training set and test set. Step 2: Construct a multi-level feature recalibration network segmentation model for liver and tumor, train the model using the training set, including training for liver segmentation and training for tumor segmentation, extract global and local features through multi-level extraction, and recalibrate the channel response of the aggregated multi-level features; Step 3: Adjust the parameters of the multi-level feature recalibration network segmentation model and train it multiple times. When the model's loss function converges stably, a stable converged model is obtained. Test the trained model using the test set, construct the liver and tumor detection network, obtain the liver and tumor segmentation results, and evaluate the network performance using statistical metrics. Furthermore, embedding the CA module into the Res2Net bottleneck module refines the features, capturing long-range dependencies along one spatial direction while preserving precise location information along another, thus enhancing the network's ability to capture target features. Specifically: Convolutional kernels (H, 1) and (1, W) with two spatial ranges (horizontal and vertical) are used to encode along the horizontal and vertical directions, respectively. Here, W represents the length of the feature vector in the horizontal direction of the input features, and H represents the length of the feature vector in the vertical direction of the input features. This allows for feature aggregation along the horizontal and vertical directions, obtaining accurate location information. Furthermore, the activation function fully captures the relationships between channels and the long-distance dependencies in either the horizontal or vertical spatial direction. This helps the model to more accurately locate and identify objects of interest and enhances the network's ability to learn and express features. Step two introduces the SE module, which adaptively recalibrates channel-level feature responses to realize the interdependencies between modeling channels, enhancing the network's ability to capture key channel information. Specifically: First, the 3×3 convolutions in UNet are replaced with Res2Net bottleneck modules. The n-channel 3×3 convolutional filters are replaced with n dilated convolutional filters and multi-scale pooling layers. The Res2Net bottleneck module adds two residual unit structures to the UNet module, increasing the network's receptive field to capture multi-scale information without reducing resolution, extracting finer-grained features, and improving segmentation accuracy. Then, the SE module is embedded into the Res2Net bottleneck module to refine the features, including: converting the fused multi-level channels into one-dimensional vectors; refining the features through the SE module includes recalibrating the features through two dense layers and automatically calculating the weights of the input channels; and scaling the channel weights using the input multi-level features.
2. The automatic image segmentation method based on a multi-level multi-attention MLMA-UNet network according to claim 1, characterized in that, The specific steps in Step One include: Step 1.1: Downsample the 512×512 CT image to a 256×256 CT image to reduce computational load; Step 1.2: Use a (100, 400) HU value window to remove irrelevant organs from the CT images processed in Step 1.1; Step 1.3: Normalize the CT image processed in step 1.2 at the [0,1] level to provide an image that is easier to scale as the input image; Step 1.4: Enhance the CT images by rotating, scaling, translating, flipping, and elastic deformation image transformations on the CT images processed in Step 1.
3.
3. The automatic image segmentation method based on a multi-level multi-attention MLMA-UNet network according to claim 1, characterized in that, The SE module converts the fused multi-level channels into a one-dimensional vector, specifically including the following steps: Global average pooling is applied to input features of size W×H×C received from a 1×1 convolution in the Res2Net module, where W represents the length of the feature vector in the horizontal direction, H represents the length of the feature vector in the vertical direction, and C represents the number of feature vector channels. All channels are then converted into one-dimensional vectors, with the dimension of the one-dimensional vector equal to the number of channels C. The global average pooling representation has a size of R. c For a one-dimensional vector Z, for any one of the C channels, the elements of the one-dimensional vector Z are as follows: Z C The input CT image features M c The set of transformation features, M, is a cluster of local descriptors. c (a,b) represents the feature vector of the input CT image at coordinates (a,b) in channel c, where a and b are the corresponding coordinate points in the horizontal and vertical directions, respectively. sqe () indicates an SE network.
4. The automatic image segmentation method based on a multi-level multi-attention MLMA-UNet network according to claim 3, characterized in that, The weighting formulas for the input channels along the height and width directions are as follows: g h =σ(F h (z h )) g w =σ(F w (z w )) Among them, F h F w These are convolution transformations along the height h and width w directions, respectively, where σ represents the Sigmoid function, and g... h g w These are attention weights along the height and width directions, respectively, used to reflect whether the object of interest to each element exists in the corresponding row and column.
5. The automatic image segmentation method based on a multi-level multi-attention MLMA-UNet network according to claim 1, characterized in that, Aggregated information is used to obtain channel-related dependencies. A simple two-layer fully connected gate mechanism with ReLU and Sigmoid activation functions is used to isolate channels and improve the network's generalization ability.
6. The automatic image segmentation method based on a multi-level multi-attention MLMA-UNet network according to claim 1, characterized in that, Step two involves training the network using a hybrid loss function to accelerate function convergence, reduce network overfitting, and achieve the optimal performance point. The formula for the hybrid loss function is: Where L represents the mixture loss function, p i Let g be the probability that the sample is predicted to be positive. i The label represents the sample, with 1 for positive class and 0 for negative class. N is the number of voxels, and i represents any one of the N voxels in the CT image.
7. The automatic image segmentation method based on a multi-level multi-attention MLMA-UNet network according to claim 1, characterized in that, The specific steps for adjusting the parameters of the multi-level feature recalibration network segmentation model in step three include: Step 3.1: Use an initial learning rate of 1×e -5 The Adam optimizer is used to train the network, employing 8 mini-batches for training, while using 1×e -4 The weight decay factor is used to regularize the network weights; Step 3.2: Train the multi-level feature recalibration network segmentation model, save the model every 10 epochs, and save the current model after the curve has been stable for 20 epochs.
8. The automatic image segmentation method based on a multi-level multi-attention MLMA-UNet network according to claim 1, characterized in that, Step three involves evaluating network performance using statistical metrics, specifically as follows: The statistical metrics are performance indicators based on volume size similarity and surface distance measurement, namely, Dice Similarity Coefficient (DSC), Volume Overlap Error (VOE), and Relative Absolute Volume Difference (RAVD).
Citation Information
Patent Citations
Water tunnel crack detection method based on UNet network
CN117952898A