# A Medical Image Segmentation Network with Multi-Scale and Dual-Branch Attention
## 1 Introduction
Traditional neural networks use fixed-size convolutional kernels for single-scale feature extraction, which leads to insufficient feature representation and neglect of details at other scales. This method may result in poor processing effects on target areas of different sizes. Additionally, traditional neural networks treat all extracted features equally, making them susceptible to irrelevant information interference, which negatively impacts the final segmentation results. To capture features at various scales, fully utilize global and local important feature information, enhance the ability to segment objects of different sizes within the image, preserve feature details, and achieve clearer edges, in this paper, we propose a novel encoder-decoder architecture for medical image segmentation, named the multi-scale dual attention network (MSDA-Net). In the encoder extraction process, a convolutional neural network is utilized to capture intricate local details within the image. Subsequently, the resulting feature map undergoes expansion into a one-dimensional sequence at the pixel level, which is then inputted into the transformer block for further processing. In the decoder stage, a module that combines multi-receptive field densely connected is used in the decoding stage to integrate semantic feature information from different receptive fields. The parallel dual-branch attention module then processes the multi-scale data produced by the decoder and the low-frequency features obtained from the encoder. This dual-branch attention module primarily operates on feature information channels and spaces, utilizing a parallel dual-branch attention mechanism to guide context by identifying global or local important feature information to obtain prediction results. In summary, our main contributions are as follows:  
1. We proposed a novel module MRD, which introduced convolution operations with different dilation rates during upsampling and extracted features through three parallel branches. This module enables the simultaneous capture of global and local semantic information, enhancing the multi-scale feature representation capability of the network. Additionally, the extracted semantic information is fused through dense connections to reduce the risk of information loss, thereby enhancing the feature representation ability and improving segmentation accuracy. The MRD effectively addresses the shortcomings of traditional methods in feature extraction and fusion, significantly enhancing the overall performance and segmentation results of the network. 2. We propose a novel module PDA designed to process feature information in parallel from both channel and spatial dimensions. This module receives shallow semantic features from the encoder and multi-scale features from the decoder, effectively integrating features at different scales, emphasizing crucial global and local semantic information in each receptive field, suppressing noise, and enhancing the ability to segment target boundaries. The PDA allows for better integration of feature information and precise calculation of attention weights for the feature maps, thereby enhancing the overall performance of the network. 3. To assess the robustness and generalization of our network, we conduct experimental analyses on four distinct medical image datasets: 2018 Data Science Bowl [15], ISIC 2018 [16; 17], CVC-ClinicDB [18], and colon cancer slices dataset(images provided with authorization from the collaborating hospital). The assessment findings underscore notable advancements attained with our proposed model in contrast to medical image segmentation methods such as UNet and UNet++, thereby providing additional affirmation of the effectiveness of our approach.