## 3 Proposed Method
By incorporating an attention mechanism, LAFM dynamically computes weights during feature fusion to emphasize key regions. The operations LAFM (Feat32_up, Feat32) and LAFM (Feat16_up, Feat16) in the pseudocode exemplify how the feature maps are dynamically adjusted across different layers, ensuring the effective integration of low-level details and high-level semantics. This weighting mechanism allows the model to adaptively focus on different feature regions depending on the complexity of the image being processed. Finally, the segmentation head (ConvOut (Feat16_up)) generates the final segmentation result, which is then upsampled using the Interpolate (O, (H, W)) operation to match the input image's resolution. Figure 3 illustrates the collaborative interaction of various modules within the DriveSegNet architecture, emphasizing the fusion of features across spatial and semantic dimensions at each stage to ensure an efficient image processing pipeline. This structured design not only optimizes multi-scale feature fusion in semantic segmentation but also enhances boundary recognition, object localization, and detail preservation. Additionally, the encoder specifications are provided in Table 1, where ConvX indicates the conv-bn-relu operation, OPR represents the type of operation, and K refers to the kernel size. In this table, S, R, and C denote stride, repetitions, and output channels, respectively. Notably, Stages 3, 4, and 5 are the foundational elements of the STDC module. ### Positional Convolutional Attention Module (PCAM)

Traditional deep convolutional neural networks typically capture long-range dependencies by stacking multiple convolutional layers. To address this limitation, [PERSON] et al. [25] proposed the ASPP module, which integrates multi-scale dilated convolutions to capture contextual information, while [PERSON] et al. finished thinking. In [23], PSPNet was introduced, incorporating a pyramid pooling module to effectively capture contextual information. However, methods based on dilated convolutions are constrained in their ability to aggregate information, as they can only extract features from a limited set of surrounding points, ultimately hindering the construction of comprehensive semantic contexts. Simultaneously, pooling-based approaches aggregate contextual information in a consistent manner, applying the same strategy to all pixels within the image. This approach cannot satisfy the specific needs of diverse contextual dependencies for different pixels in varying scenarios. To overcome these challenges, we propose the PCAM module (Figure 4) that innovatively combines convolutional operations with self-attention mechanisms. Unlike conventional hybrid architectures like TopFormer's CNN-Transformer pyramid [7], which faces scalability limitations with high-resolution images, or SegFormer's pure Transformer approach [6] that lacks local feature refinement, PCAM introduces a novel convolution-position encoding synergy. This architecture embeds learnable positional encodings within convolutional layers while leveraging self-attention for explicit global dependency modeling. The convolutional component preserves crucial local details for boundary extraction, while the enhanced positional awareness enables dynamic semantic fusion across scales. First, the input feature map X is processed through a convolution operation to extract local features. This convolution employs a 3\(\times\)3 kernel combined with batch normalization and a ReLU activation function, implemented via the Convolution-Batch Normalization-ReLU (ConvBNReLU) module for initial feature processing. The operation preserves the input resolution while effectively capturing both spatial and semantic information. To ensure computational efficiency in real-time segmentation tasks, this module utilizes a single 3 \(\times\) 3 convolutional layer rather than stacking multiple deep convolutional layers.