# Weak Edge Target Segmentation Network Based on Dual Attention Mechanism
## 3 Model Design and Optimization
### Multi-Scale Information Fusion Module  
The primary role of the EAEM module is to extract and preserve sufficient edge information, while the MIFM aims to efficiently acquire rich global feature information. Some existing methods, such as multi-scale image inputs, large convolutional kernels, and spatial pyramids, although effective in capturing multi-scale features, often significantly increase the network's complexity and computational load, rendering them unsuitable for real-time segmentation tasks. Additionally, the representation of convolutional features is not only related to the receptive field but also closely linked to the feature channels. Compared to enlarging the convolutional kernel size, adding more channels requires less computation. Therefore, utilizing a channel attention mechanism to extract multi-channel feature information may be a more optimal solution for real-time semantic segmentation tasks. The channel attention mechanism has been widely applied in semantic segmentation tasks, with SENet and FC attention mechanisms being two representative methods. SENet introduces the SE module to adaptively adjust the weights of each feature channel, enabling the network to automatically learn the importance of different channels and enhance the quality of feature representation. The design of the SE module is concise and efficient, significantly boosting network performance at a low computational cost and achieving outstanding results in tasks like image classification and object detection. However, the channel weights learned by the SE module are globally unique, neglecting differences in spatial dimensions and limiting its performance in dense prediction tasks such as semantic segmentation. To overcome this limitation, the FC attention mechanism employs fully connected layers to learn attention weights in both spatial and channel dimensions, enabling the network to adaptively adjust feature responses at different positions and channels. The FC attention mechanism outperforms the SE module in semantic segmentation tasks, demonstrating the importance of spatial attention for dense prediction tasks. Nevertheless, the FC attention mechanism introduces a large number of parameters and computational overhead, restricting its application in real-time semantic segmentation tasks. Therefore, finding ways to reduce the complexity of the channel attention mechanism while maintaining accuracy is a research direction worth further exploration. To address these limitations, this study proposes a novel Multi-Scale Information Fusion Module (MIFM) designed to efficiently and flexibly fuse and extract multi-scale feature information. MIFM utilizes a lightweight channel attention mechanism to adaptively adjust channel weights in different scale feature maps, facilitating feature fusion and optimization across scales, as depicted in Figure 5.  
In the structural design of MIFM, the input initially undergoes processing through a 3 \(\times\) 3 convolution layer, followed by a ReLU activation function layer, and another 3 \(\times\) 3 convolution layer. The number of channels is appropriately reduced to mitigate the computational burden. Subsequently, the feature map bifurcates into two parallel branches: the main path for generating the guidance vector, and the branch path. In the main path of the guidance vector, the feature map traverses a global average pooling layer to generate a global descriptor. Unlike SENet, MIFM eschews the use of a fully connected layer with large parameters, instead employing a 1 \(\times\) 1 pointwise convolution to process the global descriptor, thereby enhancing model efficiency. Pointwise convolution operates on the channel dimension, significantly reducing the number of parameters and improving computational efficiency. As pointwise convolution does not need to consider spatial information associations, it only processes information between channels, proving more efficient without capturing information from all channels.