Introduction
Semantic segmentation is a fundamental task in computer vision that involves assigning a class label to every pixel in an image. Achieving high performance requires a delicate balance between extracting high-level semantic features and maintaining precise spatial localization. Traditional encoder-decoder architectures often struggle with two primary issues: boundary misalignment caused by simple upsampling and a lack of global context due to the limited receptive fields of standard convolutions.
This paper introduces two novel components—the Semantic Refinement Module (SRM) and the Contextual Refinement Module (CRM)—designed to address these challenges. By integrating these modules, the proposed network achieves state-of-the-art results across several benchmarks while maintaining high computational efficiency.
Methodology
Semantic Refinement Module (SRM)
The Semantic Refinement Module (SRM) is designed to mitigate the misalignment problem that occurs during the upsampling of low-resolution feature maps. Standard bilinear interpolation often leads to blurred or "smeared" object boundaries because it does not account for the underlying semantic structure.
Instead of static interpolation, the SRM learns a transformation offset for each pixel. A key innovation of this module is its consideration of neighboring pixels; it leverages a 3x3 grid of offsets and predicts a weight mask to aggregate them. This learnable process allows the network to "snap" features back to their correct high-resolution boundaries, resulting in significantly sharper edges for objects like pedestrians and traffic signs.
Contextual Refinement Module (CRM)
To address the "context gap," the Contextual Refinement Module (CRM) captures global dependencies across both spatial and channel dimensions. The CRM employs a multi-stage aggregation strategy, pulling features from all four stages of the backbone network to create a rich semantic representation.
The module utilizes a serial attention framework. It first applies Channel Attention to identify and emphasize the most informative feature maps. This is followed by Spatial Attention, implemented using Disentangled Non-Local blocks, to model long-range dependencies between distant pixels. By arranging these attention blocks serially, the gradient of one block can inform the other during training, leading to more effective interactive learning.
Hybrid Loss Function
The network is optimized using a hybrid loss function that combines standard Cross-Entropy Loss with Contrastive Loss. The Contrastive Loss encourages the model to learn an embedding space where pixels belonging to the same class are clustered together (intra-class compactness) while pixels of different classes are pushed apart (inter-class separation).
Experimental Results
The proposed model was evaluated on three major benchmarks: Cityscapes, BDD100K, and ADE20K.
Performance and Efficiency
On the Cityscapes dataset, the large-scale version of the model (using an MSCAN-L backbone) achieved a state-of-the-art 84.5% mIoU. Notably, a lightweight version reached 82.5% mIoU with only 137.9 GFLOPs, outperforming heavier models like OneFormer and CFT while using approximately one-fifth of the computational resources.
The model also demonstrated strong generalization across diverse datasets, setting new benchmarks on BDD100K (66.1% mIoU) and ADE20K (45.2% mIoU). Ablation studies confirmed the individual contributions of the modules, with the SRM and CRM providing incremental improvements of 0.7% and 0.6% mIoU over the baseline, respectively.
Conclusion
The proposed deep semantic segmentation network effectively addresses the dual challenges of boundary misalignment and global context through the SRM and CRM. By leveraging learnable offsets and serial attention, the model achieves a superior trade-off between accuracy and efficiency. Future work may explore extending these refinements to video segmentation and testing the modules on a broader range of transformer-based backbones.
Summary updated