# A Multi-Path Semantic Segmentation Network Based on Convolutional Attention Guidance
## 3 Method
### Multi-Path and Attention-Guided Fusion Module  
The two paths of the MCAG, as illustrated in Figure 1, include the following:  
The detail path (DP) is the first path, which maintains a high resolution in earlier stages and selectively learns high-level semantic information, guided by the main path. It focuses on extracting detailed features. The boundary path (BP) is the second path, which sums with the main path at each stage, incorporating further fusion of global information and attention to boundary details. Both paths take the output from the first stage of the main path as input and consistently maintain the image resolution, aiming to fuse features at larger scales while preserving fine details. The two paths collectively undergo three stages, each consisting of stacked modules denoted as block_DP and block_BP, which are composed of convolutions followed by batch normalization and rectified linear unit (ReLU) activation, as depicted in Figures 3 and 4. Each stage of DP consists of k = 2 block_DP modules. The initial input is the output of the first stage of the main path (MP), and subsequently, the number of channels in the DP remains unchanged (except for the output channels in the fourth stage, which match those of the main path). The resolution is also consistently maintained, which better preserves the details. In each stage, the DP learns higher-level semantic information under the guidance of the main path to compensate for the loss of advanced information due to the lower number of channels and smaller convolutional kernels. In block_DP, the upper path employs a convolutional kernel with a size of 3 and a stride of 1, while the lower path uses a kernel of size 1. The primary purpose of the lower path is to adjust the number of channels (in the fourth stage) and add these to the original information from the upper path, preserving the original features as much as possible for subsequent stages. Thus, block_DP efficiently extracts features from high-resolution images with lower parameters (fewer channels and smaller convolutional kernels) and selectively learns advanced semantic information under the guidance of the main path. Each stage of the BP consists of k = 1 block_BP module. Similar to the DP, the initial input for the BP is the output of the first stage of the main path (MP). The number of channels and resolution remain consistent in the second and third stages, and in the last stage, the number of channels matches that of the main path's fourth stage, maintaining a lower parameter count (fewer channels and smaller convolutional kernels). In contrast to  
Figure 4: The structure diagram of block_BP. Figure 3: The structure diagram of block_DP. the DP, the upper path's first convolution block in block_BP doubles the feature channel count using a \(1\times 1\) convolutional kernel. The second convolutional block extracts features from the high channel count, allowing the model to better capture details and patterns in the input data, learn more types of features and improve the model's generalization ability to different samples, enhancing its robustness. The kernel size for the second block is \(3\times 3\). The third convolutional block then restores the channel count to its initial value using a \(1\times 1\) convolutional kernel. The lower path's convolutional block, similar to block_DP, primarily adjusts the number of channels (in the fourth stage) and adds the original information from the upper path. Therefore, the BP, composed of block_BP, effectively utilizes lower parameters (fewer channels and smaller convolutional kernels), relies on guidance from the main path, pays more attention to boundary information, and under the guidance of the main path, further integrates global information on a larger scale. At the end of each stage, the main path guides and provides information to both pathways.