Attention-based medical image segmentation method
By combining a multi-dimensional attention module and a multi-scale hollow fusion attention module, the problem of tissue similarity and boundary ambiguity in medical image segmentation is solved, achieving high-precision feature extraction and segmentation, which is applicable to image segmentation of knee joints, breast tumors and skin lesions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FUJIAN UNIV OF TECH
- Filing Date
- 2026-02-26
- Publication Date
- 2026-07-10
AI Technical Summary
Existing medical image segmentation models struggle to effectively capture weakly discriminative features when faced with high tissue similarity, blurred boundaries, and noise interference, leading to discontinuous segmentation and information loss, thus failing to meet high-precision requirements.
We employ an attention-enhanced medical image segmentation method that combines a multi-dimensional attention module and a multi-scale dilated fusion attention module with an encoder and decoder structure. By utilizing dual-path convolution and attention recalibration mechanisms, we optimize feature extraction and fusion while preserving the boundaries of subtle lesions.
It significantly improves the ability to capture weakly discriminative features, ensures the continuity of cartilage boundaries, reduces information loss, and improves the accuracy and robustness of medical image segmentation. It is suitable for image segmentation tasks such as knee joints, breast tumors, and skin lesions.
Smart Images

Figure CN122368451A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of neural networks and image segmentation technology, and in particular to a medical image segmentation method based on enhanced attention. Background Technology
[0002] Medical image segmentation is a key branch of computer vision and neural network technology, and is widely used in medical scenarios such as disease diagnosis and surgical planning.
[0003] However, medical images often suffer from problems such as high tissue similarity, blurred boundaries, and noise interference, posing a serious challenge to the feature extraction capabilities and robustness of segmentation models. In recent years, deep learning-based U-shaped networks (such as UNet) and their variants have become mainstream solutions, but existing technologies still have limitations and urgently need improvement.
[0004] The existing patent CNI18334064A describes a knee cartilage image segmentation method based on a hybrid attention mechanism. This mechanism includes an edge attention module and a self-attention module: the edge attention module specifically extracts cartilage boundary information to alleviate segmentation discontinuities caused by the limited receptive field of convolution; the self-attention module enhances global context awareness, ultimately optimizing the segmentation result through attention weights. However, this method overly relies on the locality of convolution operations, making it difficult to effectively capture the weak discriminative features between diseased and normal tissues in medical images, resulting in low sensitivity to low-contrast regions. Furthermore, this method is susceptible to background noise or image artifacts and cannot simultaneously and accurately balance channel semantic information and spatial details, easily leading to missegmentation or boundary breaks in complex lesion areas.
[0005] Furthermore, an improved ResU-Net architecture based on a knee joint MRI image segmentation method using fusion-guided attention (patent number: CN118608535A) introduces spatial attention and contextual attention mechanisms to form a fusion-guided attention module. The encoder extracts features through multi-level convolutions, and the attention module selectively aggregates these features to enrich contextual information. The decoder uses skip connections to concatenate the fused features with the decoded features, ultimately outputting a segmentation mask. Its advantage lies in improving the robustness of feature representation through a dual attention mechanism. However, in this method, resolution differences between different levels of feature maps during feature propagation lead to information redundancy or misalignment, and fine-grained spatial information is easily lost, thus weakening boundary segmentation accuracy. While the attention mechanism enhances contextual capture, it does not effectively integrate multi-scale receptive fields, making it difficult to simultaneously balance local details and global semantics, resulting in decreased generalization ability when lesion morphology varies.
[0006] In summary, the field of medical image segmentation still faces the following key challenges, which directly affect the clinical usability of the segmentation results: 1) Traditional convolutional networks have limited ability to capture low-contrast features between tissues, failing to effectively distinguish similar tissue regions (such as cartilage and surrounding muscle), leading to missed detection of early lesions. 2) During multi-level feature fusion, redundancy, misalignment, or loss of information during information transmission is prominent, especially when using skip connections or attention mechanisms, making it difficult to preserve fine-grained spatial information (such as tumor edges). 3) Existing attention mechanisms often focus on a single dimension (such as space or channel), lacking multi-mechanism collaborative optimization, resulting in discontinuous or blurred boundary segmentation, failing to meet the high-precision requirements of surgical navigation. The root cause of these problems lies in the fact that existing models do not fully consider the special characteristics of medical images (such as tissue similarity and noise interference), urgently requiring an innovative solution that can simultaneously optimize feature extraction, fusion, and boundary preservation. Summary of the Invention
[0007] The purpose of this invention is to address the core pain point of high tissue similarity and easy loss of boundaries in the field of medical image segmentation by providing an attention-enhanced medical image segmentation method. By integrating an attention enhancement module and a multi-scale fusion mechanism, significant improvements are achieved in multiple medical image segmentation tasks.
[0008] The technical solution adopted in this invention is:
[0009] The medical image segmentation method based on enhanced attention includes the following steps:
[0010] The target medical images are acquired, preprocessed, and then integrated with their corresponding labels into a training dataset. Medical images include knee MRI images, breast tumor images, or skin lesion images. Preprocessing includes image resampling to unify resolution and image enhancement to improve contrast.
[0011] The preprocessed medical image is input into the encoder, which outputs a multi-scale feature map of the medical image. The encoder includes N cascaded multi-dimensional attention modules. Each multi-dimensional attention module extracts multi-scale features through dual-channel convolution and residual connections, and integrates an attention enhancement module to recalibrate the features to focus on the weakly discriminative features between diseased and normal tissues. The multi-scale feature maps output by each multi-dimensional attention module are fused by a multi-scale dilated fusion attention module to obtain the feature map output by the encoder. The multi-scale dilated fusion attention module captures features from different receptive fields through multi-scale dilated convolution and fuses channel attention and spatial attention mechanisms to redistribute feature importance and reduce information redundancy and loss in cross-scale fusion.
[0012] The feature map output by the encoder is input to the decoder. Combined with the high-resolution feature map of the corresponding level passed from the encoder by skip connections, the reconstructed feature map is obtained through progressive upsampling and feature fusion. The decoder includes N-1 cascaded multi-dimensional attention modules. Each multi-dimensional attention module of the decoder is configured with a transposed convolution for upsampling. Each transposed convolution doubles the resolution of the feature map to progressively restore the spatial resolution of the feature map. At the same time, the first N-1 multi-dimensional attention modules of the encoder and the N-1 multi-dimensional attention modules of the decoder are connected in reverse order and one-to-one by skip connections. The high-resolution features of the encoder (such as the features passed from multi-dimensional attention 3) are cascaded with the feature map of the corresponding level of the decoder to preserve the boundaries of subtle lesions in medical images.
[0013] Finally, the reconstructed feature map output by the decoder is used to generate a medical image segmentation mask through 1×1 convolution and a sigmoid activation function to complete the segmentation of diseased tissues.
[0014] Furthermore, the operation of the encoder's multi-dimensional attention module includes:
[0015] The input feature map is processed through two independent series of convolutional and residual paths. The features extracted by the first path are weighted by channel attention using the SE (Squeeze-and-Excitation) module, and the features extracted by the second path are weighted by spatial attention using the SA (Squeeze-and-Adaptive) module. The outputs of the two paths are added and fused to serve as the output feature map of the corresponding multi-dimensional attention module.
[0016] Furthermore, the encoder has 5 multi-dimensional attention modules; the number of output channels of each multi-dimensional attention module increases progressively; the output feature map of the previous multi-dimensional attention module is used as the input feature map of the next multi-dimensional attention module; the 5 multi-dimensional attention modules output feature maps with 128, 256, 512, 1024 and 2048 channels respectively.
[0017] Specifically, the input medical image is first passed through a 3x3 convolutional layer using the ReLU activation function with a stride of 1 and 64 output channels; then the image size is halved by a 2x2 max pooling layer.
[0018] The medical image is processed by the first multi-dimensional attention module, which contains a neural network with dual-channel operations. Each channel contains a series of convolution and residual operations. Finally, the feature is fused and enhanced through the attention mechanism, and the output feature map of the first multi-dimensional attention module with 128 channels is output. Subsequently, multi-scale feature fusion is performed through the multi-scale dilated fusion attention module MDFA.
[0019] The output feature map of the first multi-dimensional attention module is then further processed by the second multi-dimensional attention module to extract features, and the output feature map of the second multi-dimensional attention module with 256 output channels is then fused again through the multi-scale dilated fusion attention module MDFA.
[0020] The output feature map of the second multi-dimensional attention module is processed by the third multi-dimensional attention module to extract deeper features, resulting in an output channel count of 512. Feature fusion is then performed using the multi-scale dilated fusion attention module (MDFA).
[0021] The output feature map of the third multi-dimensional attention module is processed by the fourth multi-dimensional attention module to further extract features, resulting in an output channel count of 1024. Feature fusion is then performed using the multi-scale dilated fusion attention module (MDFA).
[0022] The output feature map of the fourth multi-dimensional attention module is processed by the fifth multi-dimensional attention module, which is the final feature extraction step of the encoder, with an output channel count of 2048. Feature fusion is then performed using the multi-scale dilated fusion attention module (MDFA) to obtain the final output of the encoder.
[0023] Furthermore, the decoder has four multi-dimensional attention modules; the output feature map of the previous multi-dimensional attention module serves as the input feature map of the next multi-dimensional attention module; the four multi-dimensional attention modules of the decoder output feature maps with 1024, 512, 256 and 128 channels respectively.
[0024] Specifically, the feature map output from the last module of the encoder, the multi-dimensional attention module, is input into the sixth multi-dimensional attention module of the decoder. The sixth multi-dimensional attention module receives the corresponding feature map from the fourth multi-dimensional attention module of the encoder through skip connections. After a 2x2 transposed convolution, the spatial resolution of the feature map is restored to the output size of the fourth multi-dimensional attention module. The number of output channels is adjusted to 1024 through a 3x3 convolutional layer. Multi-scale feature fusion is performed using the ReLU activation function through the multi-scale dilated fusion attention module MDFA.
[0025] The feature map output from the sixth multi-dimensional attention module is input into the seventh multi-dimensional attention module of the decoder. The seventh multi-dimensional attention module receives the corresponding feature map from the third multi-dimensional attention module of the encoder through skip connections. After a 2x2 transposed convolution, the spatial resolution of the feature map is restored to the output size of the third multi-dimensional attention module. The number of output channels is adjusted to 512 through a 3x3 convolutional layer. Multi-scale feature fusion is performed using the ReLU activation function through the multi-scale dilated fusion attention module MDFA.
[0026] The feature map output from the seventh multi-dimensional attention module is input into the eighth multi-dimensional attention module of the decoder. The eighth multi-dimensional attention module receives the corresponding feature map from the second multi-dimensional attention module of the encoder through skip connections. After a 2x2 transposed convolution, the spatial resolution of the feature map is restored to the output size of the second multi-dimensional attention module. The number of output channels is adjusted to 256 through a 3x3 convolutional layer. Multi-scale feature fusion is performed using the ReLU activation function through the multi-scale dilated fusion attention module MDFA.
[0027] The feature map output from the eighth multi-dimensional attention module is input into the ninth multi-dimensional attention module of the decoder. The ninth multi-dimensional attention module receives the corresponding feature map from the first multi-dimensional attention module of the encoder through skip connections. After a 2x2 transposed convolution, the spatial resolution of the feature map is restored to the output size of the first multi-dimensional attention module. The number of output channels is adjusted to 128 through a 3x3 convolutional layer. The ReLU activation function is used to perform multi-scale feature fusion through the multi-scale dilated fusion attention module MDFA to obtain the final output of the decoder.
[0028] Furthermore, the attention enhancement module includes an SE module and an SA module, which are used to optimize feature weights in the channel dimension and spatial dimension, respectively.
[0029] Furthermore, the generated segmentation mask is quantitatively evaluated using standard medical image segmentation metrics, including Dice coefficient, IoU, and Recall, to validate the model's accuracy and robustness on datasets of knee cartilage, breast tumors, or skin lesions.
[0030] Furthermore, the operation of the multi-scale hole fusion attention module includes:
[0031] The input feature map is processed in parallel by applying 1×1 convolution, three 3×3 dilated convolutions with different dilation rates (6, 12 and 18 respectively), and average pooling, and then stitched together in the channel dimension to form a multi-scale stitched feature map.
[0032] Global average pooling is performed on the concatenated feature map to obtain channel descriptors; the channel descriptors are then passed through a fully connected layer and a sigmoid function to generate channel attention weights, which are then multiplied channel by channel with the concatenated feature map to obtain the channel attention recalibration features;
[0033] The Sigmoid function is applied to the concatenated feature map to generate spatial attention weights, which are then multiplied element-wise with the feature map to obtain a spatial attention recalibrated feature map.
[0034] Finally, the feature maps after channel recalibration and spatial recalibration are added element by element to obtain the final output feature map.
[0035] Specifically, the multi-scale dilated fusion attention module includes a multi-scale dilated convolution part and a channel and spatial attention fusion part. The multi-scale dilated convolution part extracts features of different scales from its input feature map through four different convolutions and one pooling operation, and concatenates them in the channel dimension (Cat) to form a concatenated feature map that integrates multi-scale information. Specifically, the multi-scale dilated convolution part includes a 1x1 convolution, three 3x3 convolutions with different dilation rates (rate=6, 12, 18) and an average pooling (AvgPool2d).
[0036] The implementation of the multi-scale dilated convolution part includes the implementation of the channel attention mechanism in the channel and spatial attention fusion part: First, global pooling is performed on the concatenated feature map to obtain a channel descriptor; the channel descriptor is then passed through a 1x1 convolutional layer (C / 2 output channels), a ReLU activation function, a 1x1 convolutional layer (restored to C output channels), and a Sigmoid function to generate channel attention weights; the channel attention weights are multiplied with the concatenated feature map channel-wise recalibrated to obtain a channel attention recalibrated feature map.
[0037] The spatial attention mechanism in the channel and spatial attention fusion part is implemented as follows: a sigmoid activation function is applied to the stitched feature map to generate spatial attention weights. The spatial attention weights are then multiplied element-wise with the original feature map (spatial recalibration) to obtain a spatially attention-recalibrated feature map.
[0038] Finally, the feature maps recalibrated by channel attention and spatial attention are added element-wise to obtain the final output feature map.
[0039] This invention, employing the above technical solutions, offers the following beneficial effects: First, addressing the core challenge of high tissue similarity and blurred boundaries in medical images, the model utilizes dual-path convolution and attention recalibration mechanisms in a multi-dimensional attention module, effectively enhancing the capture of weakly discriminative features and ensuring the continuity of cartilage boundaries. Second, by fusing multi-scale dilated convolution with channel-spatial attention, the problem of information loss in cross-scale feature fusion is resolved, effectively suppressing false positives and providing a reliable basis for early diagnosis. Third, through the deep integration of the encoder-decoder structure and skip connections, this invention effectively preserves subtle features of lesion edges in skin lesion segmentation. Finally, this invention demonstrates superior performance on medical image segmentation tasks. Attached Figure Description
[0040] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments;
[0041] Figure 1 This is a schematic diagram of the model architecture of the medical image segmentation method based on enhanced attention of the present invention;
[0042] Figure 2 This is a schematic diagram of the structure of the multi-dimensional attention module (MDA_Block) of the present invention;
[0043] Figure 3 This is a schematic diagram of the structure of the Multi-Scale Hollow Fusion Attention Module (MDFA) of the present invention;
[0044] Figure 4 This is a schematic diagram showing the qualitative comparison results of the present invention and other existing solutions in medical image segmentation. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0046] like Figures 1 to 4 As shown in one example, this invention discloses a medical image segmentation method based on enhanced attention, comprising the following steps:
[0047] The target medical images are acquired, preprocessed, and then integrated with their corresponding labels into a training dataset. Medical images include knee MRI images, breast tumor images, or skin lesion images. Preprocessing includes image resampling to unify resolution and image enhancement to improve contrast.
[0048] The preprocessed medical image is input into the encoder, which outputs a multi-scale feature map of the medical image. The encoder includes N cascaded multi-dimensional attention modules. Each multi-dimensional attention module extracts multi-scale features through dual-channel convolution operations and residual connections, and integrates an attention enhancement module to recalibrate the features to focus on the weakly discriminative features between diseased and normal tissues. The multi-scale feature map output by each multi-dimensional attention module is then processed by a multi-scale dilated fusion attention module (i.e., Figure 1 The multi-dimensional feature aggregation in the encoder is used to perform feature fusion to obtain the feature map output by the encoder; the multi-scale dilated fusion attention module captures features of different receptive fields through multi-scale dilated convolution operations, and fuses channel attention mechanism and spatial attention mechanism to redistribute feature importance and reduce information redundancy and loss in cross-scale fusion.
[0049] The feature map output by the encoder is input to the decoder. Combined with the high-resolution feature map of the corresponding level passed from the encoder by skip connections, the reconstructed feature map is obtained through progressive upsampling and feature fusion. The decoder includes N-1 cascaded multi-dimensional attention modules. Each multi-dimensional attention module of the decoder is configured with a transposed convolution for upsampling. Each transposed convolution doubles the resolution of the feature map to progressively restore the spatial resolution of the feature map. At the same time, the first N-1 multi-dimensional attention modules of the encoder and the N-1 multi-dimensional attention modules of the decoder are connected in reverse order and one-to-one by skip connections. The high-resolution features of the encoder (such as the features passed from multi-dimensional attention 3) are cascaded with the feature map of the corresponding level of the decoder to preserve the boundaries of subtle lesions in medical images.
[0050] Finally, the reconstructed feature map output by the decoder is used to generate a medical image segmentation mask through 1×1 convolution and a sigmoid activation function to complete the segmentation of diseased tissues.
[0051] Furthermore, the operation of the encoder's multi-dimensional attention module includes:
[0052] The input feature map is processed through two independent series of convolutional and residual paths. The features extracted by the first path are weighted by channel attention through the SE module, and the features extracted by the second path are weighted by spatial attention through the SA module. The outputs of the two paths are added and fused to serve as the output feature map of the corresponding multi-dimensional attention module.
[0053] Furthermore, such as Figure 2 As shown, the feature encoder adopts a U-shaped structure, and the encoder has 5 multi-dimensional attention modules; the number of output channels of each multi-dimensional attention module increases progressively; the output feature map of the previous multi-dimensional attention module is used as the input feature map of the next multi-dimensional attention module; the 5 multi-dimensional attention modules output feature maps with 128, 256, 512, 1024 and 2048 channels respectively.
[0054] Specifically, the input medical image is first passed through a 3x3 convolutional layer using the ReLU activation function with a stride of 1 and 64 output channels; then the image size is halved by a 2x2 max pooling layer.
[0055] Specifically, the medical image is processed by a first multi-dimensional attention module, which contains a neural network with dual-channel operations. Each channel contains a series of convolution and residual operations. Finally, feature fusion and enhancement are performed through an attention mechanism, and the output feature map of the first multi-dimensional attention module with 128 channels is output. Subsequently, multi-scale feature fusion is performed through the multi-scale dilated fusion attention module MDFA.
[0056] The output feature map of the first multi-dimensional attention module is then further processed by the second multi-dimensional attention module to extract features, and the output feature map of the second multi-dimensional attention module with 256 output channels is then fused again through the multi-scale dilated fusion attention module MDFA.
[0057] The output feature map of the second multi-dimensional attention module is processed by the third multi-dimensional attention module to extract deeper features, resulting in an output channel count of 512. Feature fusion is then performed using the multi-scale dilated fusion attention module (MDFA).
[0058] The output feature map of the third multi-dimensional attention module is processed by the fourth multi-dimensional attention module to further extract features, resulting in an output channel count of 1024. Feature fusion is then performed using the multi-scale dilated fusion attention module (MDFA).
[0059] The output feature map of the fourth multi-dimensional attention module is processed by the fifth multi-dimensional attention module, which is the final feature extraction step of the encoder, with an output channel count of 2048. Feature fusion is then performed using the multi-scale dilated fusion attention module (MDFA) to obtain the final output of the encoder.
[0060] Furthermore, such as Figure 2 As shown, the feature decoder section adopts the lower half of a U-shaped structure, combining multi-scale feature fusion and upsampling techniques to achieve efficient feature reconstruction. The decoder has four multi-dimensional attention modules; the output feature map of the preceding multi-dimensional attention module serves as the input feature map of the following multi-dimensional attention module; the four multi-dimensional attention modules of the decoder output feature maps with 1024, 512, 256, and 128 channels respectively.
[0061] Specifically, the specific operation steps of the decoder are as follows:
[0062] The feature map output from the last module of the encoder, the multi-dimensional attention module, is input into the sixth multi-dimensional attention module of the decoder. The sixth multi-dimensional attention module receives the corresponding feature map from the fourth multi-dimensional attention module of the encoder through skip connections. After a 2x2 transposed convolution, the spatial resolution of the feature map is restored to the output size of the fourth multi-dimensional attention module. The number of output channels is adjusted to 1024 through a 3x3 convolutional layer. Multi-scale feature fusion is performed using the ReLU activation function through the multi-scale dilated fusion attention module MDFA.
[0063] The feature map output from the sixth multi-dimensional attention module is input into the seventh multi-dimensional attention module of the decoder. The seventh multi-dimensional attention module receives the corresponding feature map from the third multi-dimensional attention module of the encoder through skip connections. After a 2x2 transposed convolution, the spatial resolution of the feature map is restored to the output size of the third multi-dimensional attention module. The number of output channels is adjusted to 512 through a 3x3 convolutional layer. Multi-scale feature fusion is performed using the ReLU activation function through the multi-scale dilated fusion attention module (MDFA).
[0064] The feature map output from the seventh multi-dimensional attention module is input into the eighth multi-dimensional attention module of the decoder. The eighth multi-dimensional attention module receives the corresponding feature map from the second multi-dimensional attention module of the encoder through skip connections. After a 2x2 transposed convolution, the spatial resolution of the feature map is restored to the output size of the second multi-dimensional attention module. The number of output channels is adjusted to 256 through a 3x3 convolutional layer. Multi-scale feature fusion is performed using the ReLU activation function through the multi-scale dilated fusion attention module MDFA.
[0065] The feature map output from the eighth multi-dimensional attention module is input into the ninth multi-dimensional attention module of the decoder. The ninth multi-dimensional attention module receives the corresponding feature map from the first multi-dimensional attention module of the encoder through skip connections. After a 2x2 transposed convolution, the spatial resolution of the feature map is restored to the output size of the first multi-dimensional attention module. The number of output channels is adjusted to 128 through a 3x3 convolutional layer. The ReLU activation function is used to perform multi-scale feature fusion through the multi-scale dilated fusion attention module MDFA to obtain the final output of the decoder.
[0066] The decoder section achieves efficient feature reconstruction by progressive upsampling and feature fusion, combined with high-resolution feature maps passed from the encoder section via skip connections. This design not only preserves the image's detailed information but also improves the model's robustness and accuracy through multi-scale feature fusion, making it suitable for image processing tasks requiring high precision and detail preservation.
[0067] Furthermore, the attention enhancement module includes an SE module and an SA module, which are used to optimize feature weights in the channel dimension and spatial dimension, respectively.
[0068] Furthermore, the generated segmentation mask is quantitatively evaluated using standard medical image segmentation metrics, including Dice coefficient, IoU, and Recall, to validate the model's accuracy and robustness on datasets of knee cartilage, breast tumors, or skin lesions.
[0069] Furthermore, the operation of the multi-scale hole fusion attention module includes:
[0070] The input feature map is processed in parallel by applying 1×1 convolution, three 3×3 dilated convolutions with different dilation rates (6, 12 and 18 respectively), and average pooling, and then stitched together in the channel dimension to form a multi-scale stitched feature map.
[0071] Global average pooling is performed on the concatenated feature map to obtain channel descriptors; the channel descriptors are then passed through a fully connected layer and a sigmoid function to generate channel attention weights, which are then multiplied channel by channel with the concatenated feature map to obtain the channel attention recalibration features;
[0072] The Sigmoid function is applied to the concatenated feature map to generate spatial attention weights, which are then multiplied element-wise with the feature map to obtain a spatial attention recalibrated feature map.
[0073] Finally, the feature maps after channel recalibration and spatial recalibration are added element by element to obtain the final output feature map.
[0074] Specifically, such as Figure 3 As shown, the Multi-Scale Dilated Fusion Attention Module (MDFA) aims to enhance feature representation by utilizing multiple dilation rates and integrating channel and spatial attention mechanisms. This design meets the need to simultaneously capture detailed information and extensive contextual information in an image. The MDFA consists of a multi-scale dilated convolution part and a channel and spatial attention fusion part. The multi-scale dilated convolution part extracts features at different scales from its input feature map through four different convolutions and a pooling operation, and concatenates them (Cat) along the channel dimension to form a concatenated feature map that integrates multi-scale information. Specifically, the multi-scale dilated convolution part includes a 1x1 convolution, three 3x3 convolutions with different dilation rates (rate=6, 12, 18), and an average pooling (AvgPool2d).
[0075] The implementation of the multi-scale dilated convolution part includes the implementation of the channel attention mechanism in the channel and spatial attention fusion part: First, global pooling is performed on the concatenated feature map to obtain a channel descriptor; the channel descriptor is then passed through a 1x1 convolutional layer (C / 2 output channels), a ReLU activation function, a 1x1 convolutional layer (restored to C output channels), and a Sigmoid function to generate channel attention weights; the channel attention weights are multiplied with the concatenated feature map channel-wise recalibrated to obtain a channel attention recalibrated feature map.
[0076] The spatial attention mechanism in the channel and spatial attention fusion part is implemented as follows: a sigmoid activation function is applied to the stitched feature map to generate spatial attention weights. The spatial attention weights are then multiplied element-wise with the original feature map (spatial recalibration) to obtain a spatially attention-recalibrated feature map.
[0077] Finally, the feature maps recalibrated by channel attention and spatial attention are added element-wise to obtain the final output feature map.
[0078] Results: The MDA_Block Unet model of this invention was applied to two-dimensional medical image segmentation tasks using a self-made knee joint image dataset, a publicly available breast tumor dataset, and a publicly available skin lesion dataset. It was compared with the benchmark model DC_UNet and other advanced networks such as SegNet, UNet, CeNet, DeepLabv3, U²Ne, and TransUNet. The classic deep learning network UNet was also included in the comparative analysis. Figure 4 As shown in the figure, the experimental results intuitively demonstrate the superiority of MDA_BlockUnet. In the knee cartilage segmentation task, compared with UNet and TransUNet, MDA_BlockUnet generates smoother and more continuous cartilage boundaries, and its preservation effect on the fine structure of cartilage is significantly better than other comparative models. It can still maintain accurate segmentation contours under complex background interference.
[0079] Table 1 - Comparison of evaluation metrics for different models on the breast dataset
[0080] Model Dice PA IoU Recall <![CDATA[DSC1]]> <![CDATA[CPA1]]> SegNet 0.6312 89.54 52.67 69.86 69.00 68.16 UNet 0.6476 89.73 53.72 71.54 69.89 68.32 CeNet 0.6761 90.27 55.91 74.02 71.72 69.56 DeepLabv3 0.6540 89.49 55.30 78.06 71.22 65.48 <![CDATA[U 2 Net]]> 0.6853 90.96 58.32 75.90 73.67 71.58 TransUNet 0.6844 89.90 57.60 82.32 73.10 65.73 DC-UNet 0.6494 90.38 55.59 72.28 71.46 70.66 MDA_BlockUnet 0.6827 90.99 59.48 79.34 74.60 70.38
[0081] As can be seen from the quantitative results in Table 1, MDA_Block Unet performs excellently in breast tumor segmentation. It exhibits significant advantages in boundary segmentation, with an IoU (Intersection over Union) of 59.48%, significantly higher than the comparative models (U2Net 58.32%, TransUNet 57.60%). Its overall performance is balanced; the Dice coefficient is 0.6827, slightly lower than U2Net's 0.6853, but it achieves a Recall of 79.34%, outperforming most of the comparative models. The high Recall value indicates that the model of this invention has good sensitivity to weakly discriminative features of tumors, reducing the risk of missed detections.
[0082] Table 2 - Comparison of evaluation metrics for different models on the ISIC-2016 dataset
[0083] Model Dice PA IoU Recall <![CDATA[DSC1]]> <![CDATA[CPA1]]> SegNet 0.8991 93.65 81.82 87.33 90.00 92.84 UNet 0.9056 93.94 83.45 93.45 90.98 88.63 CeNet 0.9196 95.40 86.60 90.97 92.82 94.75 DeepLabv3 0.9172 95.10 85.76 90.30 92.34 94.46 <![CDATA[U 2 Net]]> 0.9265 95.21 86.23 91.68 92.61 93.56 TransUNet 0.9273 95.74 87.57 91.65 93.37 95.16 DC-UNet 0.9176 95.19 86.09 91.11 92.53 93.98 MDA_BlockUnet 0.9335 95.91 87.96 91.41 93.59 95.88
[0084] As shown in Table 2, on the ISIC-2016 skin lesion dataset, the MDA_BlockUnet of this invention demonstrates comprehensive superiority. It leads in overall metrics: the Dice coefficient reaches 0.9335, and the IoU is 87.96%, both optimal among all models; it has strong detail preservation ability: the PA index reaches 95.91%, indicating that the model has the best effect in preserving lesion details; and it has high boundary segmentation accuracy: the DSC1 index is 93.59%, significantly better than TransUNet's 93.37%.
[0085] Table 3 - Comparison of evaluation metrics for different models on the Knee dataset
[0086] Model Dice PA IoU Recall <![CDATA[DSC1]]> <![CDATA[CPA1]]> SegNet 0.9248 88.62 85.93 93.06 92.43 91.81 UNet 0.9298 89.19 86.80 95.18 92.93 90.79 CeNet 0.9298 89.25 86.78 94.42 92.92 91.47 DeepLabv3 0.9305 89.32 86.91 94.95 93.00 91.12 <![CDATA[U 2 Net]]> 0.9295 89.27 86.74 93.94 92.90 91.88 TransUNet 0.9323 89.62 87.25 95.17 93.19 91.30 DC-UNet 0.9313 89.47 87.06 94.81 93.08 91.42 MDA_BlockUnet 0.9332 89.78 87.42 95.02 93.29 91.61
[0087] The superiority of MDA_BlockUnet can be seen from the specific data in Table 3. In terms of Dice coefficient comparison, MDA_BlockUnet reaches 0.9332, outperforming other comparative models. Although the advantage is not significant (only 0.0009 higher than the second-place TransUNet), this subtle difference has important clinical significance in medical image segmentation, especially in maintaining the continuity of cartilage edges. The model of this invention leads with an IoU value of 87.42%, an improvement over TransUNet's 87.25% and DC-UNet's 87.06%. This indicates that the model has a stronger ability to distinguish cartilage regions from the background, reducing false positives. In terms of PA (pixel accuracy), MDA_BlockUnet reaches 89.78%. Although the advantage over other models is not significant, combined with its excellent IoU performance, it shows that the model better balances recall and precision while maintaining overall accuracy.
[0088] The MDA_BlockUnet model of this invention adopts an encoder-decoupled structure, presenting an overall U-shaped architecture. This invention achieves efficient feature extraction through an encoder and accurate feature reconstruction through a decoder. Skip connections are used to pass the high-resolution features extracted by the encoder to the decoder, effectively maintaining the integrity and accuracy of information throughout the feature extraction and reconstruction process, adapting to the requirements of detail preservation and accuracy in medical image segmentation. The MDA_BlockUnet model constructs the core of feature extraction through multiple multi-dimensional attention modules (such as dimensional attention module 1 to multi-dimensional attention module 5). Each block has a built-in dual-channel convolutional layer, which fuses feature information from different paths using residual connections, significantly enhancing the model's feature learning ability. Simultaneously, SE and SA modules are embedded to further enhance feature representation, achieving accurate capture of image features at different scales. Furthermore, the Multi-Scale Dilated Fusion Attention (MDFA) module combines multi-scale dilated convolution with channel-space attention mechanisms. By using convolutional kernels with varying dilation rates to simultaneously capture image details and broad contextual information, optimizing feature weight allocation through channel and spatial attention mechanisms, and combining this with concatenation techniques to achieve deep fusion of features at different scales, the robustness and segmentation accuracy of the model are effectively improved, while reducing information loss during feature transfer.
[0089] This invention, employing the above technical solutions, offers the following beneficial effects: First, addressing the core challenge of high tissue similarity and blurred boundaries in medical images, the model utilizes dual-path convolution and attention recalibration mechanisms in a multi-dimensional attention module, effectively enhancing the capture of weakly discriminative features and ensuring the continuity of cartilage boundaries. Second, by fusing multi-scale dilated convolution with channel-spatial attention, the problem of information loss in cross-scale feature fusion is resolved, effectively suppressing false positives and providing a reliable basis for early diagnosis. Third, through the deep integration of the encoder-decoder structure and skip connections, this invention effectively preserves subtle features of lesion edges in skin lesion segmentation. Finally, this invention demonstrates superior performance on medical image segmentation tasks.
[0090] Obviously, the described embodiments are only a part of the embodiments of this application, not all of them. Without conflict, the embodiments and features in the embodiments of this application can be combined with each other. The components of the embodiments of this application described and illustrated herein can generally be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of this application is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
Claims
1. A medical image segmentation method based on enhanced attention, characterized in that: Includes the following steps: The target medical images are acquired, preprocessed, and then integrated with their corresponding labels into a training dataset. Medical images include knee MRI images, breast tumor images, or skin lesion images. Preprocessing includes image resampling to unify resolution and image enhancement to improve contrast. The preprocessed medical image is input into the encoder, which outputs a multi-scale feature map of the medical image. The encoder includes N cascaded multi-dimensional attention modules. Each multi-dimensional attention module extracts multi-scale features through dual-channel convolution and residual connections, and integrates an attention enhancement module to recalibrate the features to focus on the weakly discriminative features between diseased tissues and normal tissues. The multi-scale feature maps output by each multi-dimensional attention module are fused by a multi-scale dilated fusion attention module to obtain the feature map output by the encoder. The feature map output by the encoder is input to the decoder. Combined with the high-resolution feature map of the corresponding level passed from the encoder through skip connections, the reconstructed feature map is obtained through progressive upsampling and feature fusion. The decoder includes N-1 cascaded multi-dimensional attention modules. Each multi-dimensional attention module of the decoder is configured with a transposed convolution for upsampling. Each transposed convolution doubles the resolution of the feature map to progressively restore the spatial resolution of the feature map. At the same time, the first N-1 multi-dimensional attention modules of the encoder and the N-1 multi-dimensional attention modules of the decoder are connected in reverse order and one-to-one to cascade the high-resolution features of the encoder with the corresponding level feature map of the decoder to preserve the boundaries of subtle lesions in medical images. Finally, the reconstructed feature map output by the decoder is used to generate a medical image segmentation mask through 1×1 convolution and a sigmoid activation function to complete the segmentation of diseased tissues.
2. The medical image segmentation method based on enhanced attention according to claim 1, characterized in that: The operation of the encoder's multi-dimensional attention module includes: The input feature map is processed through two independent series of convolutional and residual paths. The features extracted by the first path are weighted by channel attention through the SE module, and the features extracted by the second path are weighted by spatial attention through the SA module. The outputs of the two paths are added and fused to serve as the output feature map of the corresponding multi-dimensional attention module.
3. The medical image segmentation method based on enhanced attention according to claim 1, characterized in that: The encoder has 5 multi-dimensional attention modules; the number of output channels of each multi-dimensional attention module increases progressively; the output feature map of the previous multi-dimensional attention module is used as the input feature map of the next multi-dimensional attention module; the 5 multi-dimensional attention modules output feature maps with 128, 256, 512, 1024 and 2048 channels respectively.
4. The medical image segmentation method based on enhanced attention according to claim 3, characterized in that: The decoder has four multi-dimensional attention modules; The output feature map of the preceding multi-dimensional attention module serves as the input feature map of the following multi-dimensional attention module; the four multi-dimensional attention modules of the decoder output feature maps with 1024, 512, 256 and 128 channels respectively.
5. The medical image segmentation method based on enhanced attention according to claim 1, characterized in that: The operation of the multi-scale hole fusion attention module includes: The input feature map is applied in parallel with 1×1 convolution, three 3×3 dilated convolutions with different dilation rates, and average pooling operations, and then stitched together in the channel dimension to form a multi-scale stitched feature map. Global average pooling is performed on the concatenated feature map to obtain channel descriptors; the channel descriptors are then passed through a fully connected layer and a sigmoid function to generate channel attention weights, which are then multiplied channel by channel with the concatenated feature map to obtain the channel attention recalibration features; The Sigmoid function is applied to the concatenated feature map to generate spatial attention weights, which are then multiplied element-wise with the feature map to obtain a spatial attention recalibrated feature map. Finally, the feature maps after channel recalibration and spatial recalibration are added element by element to obtain the final output feature map.
6. The medical image segmentation method based on enhanced attention according to claim 5, characterized in that: The three different expansion rates are 6, 12 and 18.
7. The medical image segmentation method based on enhanced attention according to claim 1, characterized in that: The generated segmentation mask was quantitatively evaluated using standard medical image segmentation metrics, including Dice coefficient, IoU, and Recall, to validate the model's accuracy and robustness on datasets of knee cartilage, breast tumors, or skin lesions.