# A Medical Image Segmentation Network with Multi-Scale and Dual-Branch Attention
## 1 Introduction  
Previously, medical image labeling relied on manual analysis and annotation by experienced physicians. However, manual annotation is susceptible to both objective factors and subjective opinions, resulting in lower accuracy of annotated data. Currently, CAD is widely utilized, which mostly uses the results of medical image segmentation to make diagnoses [1]. Existing classic segmentation algorithms encompass edge detection [2], region-base [3], threshold segmentation [4], watershed algorithm [5], etc. While each algorithm offers its advantages, the performance of these algorithms on complex data sets is unsatisfactory. In addition to these methods, there are other methods that can be used for medical image segmentation. For example, cellular automaton-based segmentation [6] uses a discrete model composed of a grid of cells, where each cell is in one of a finite number of states. The Optimal Cellular Automata Technique for Image Segmentation [7] uses particle swarm optimization with the gravitational search algorithm to find the optimal value of active cells, which is then input into the meta-cellular automata model for segmenting blood smear images. Ant Colony Optimization (ACO) [8] is a metaheuristic-based segmentation method. Ant Colony Optimization for Image Segmentation [9] introduces an ACO algorithm based on the boundary search process of the ant colony algorithm, which searches for the optimal path within constrained regions. ACO simulates the foraging behavior of ants in nature to find the optimal path corresponding to the image boundary. However, these techniques have difficulty handling noise in image data, which can leadto incorrect segmentation boundaries. Common problems with medical imaging include overall image blur, uneven lighting, and unclear boundaries between foreground and background [10]. Consequently, achieving high-precision segmentation for various types of medical images poses a significant challenge. Convolutional neural networks have advanced significantly in the field of image segmentation due to the rapid growth of deep learning. Among these, the encoder-decoder network structure has made important achievements in medical image segmentation. This type of network structure provides powerful capabilities for image segmentation tasks through its unique feature-extraction and restoration mechanisms. The encoder extracts feature information layer by layer, effectively capturing the complex semantic information of the input data and providing rich semantic information for the subsequent decoder. The decoder then gradually restores the resolution of the feature maps, maximizing the retention and recovery of the input data's detailed information. Additionally, the encoder-decoder structure is highly flexible and can adapt to different types of inputs and outputs. The classic U-Net [11] model is a typical encoder-decoder structure. It is widely used in the field of image segmentation and has achieved remarkable results. Following the development of U-Net [11], many U-shaped architectures in the form of encoder-decoders, such as Attention-UNet [12] and Res-UNet [13], have emerged and achieved excellent results. However, these networks often fall short of effectively extracting and utilizing multi-scale contextual feature information. Despite CNNs' robust feature learning capabilities, they often lack sensitivity to variations in input image resolution. This limitation arises from the fixed size of the convolution kernel, which remains unchanged regardless of shifts in input image resolution, resulting in suboptimal extraction of global contextual features. The transformer [14] from the domain of natural language processing has been adopted into the field of visual processing to compensate for the shortcomings of convolution. In contrast to convolutional neural networks, transformers are less effective at extracting fine-grained details.