Abstract
Semantic segmentation models often struggle with context bias—where objects are misclassified based on their surroundings—and error accumulation from inaccurate class-center estimations. We introduce Class-Aware Regularization (CAR), a universal training module that optimizes feature representations by enforcing intra-class compactness and inter-class separability using ground-truth labels. When paired with our efficient CARD decoder, which utilizes Enhanced Joint Pyramid Upsampling (EJPU) and Synced Axial Attention (SAA), the framework achieves state-of-the-art performance with zero additional inference overhead and up to an 82% reduction in computational costs compared to traditional dilated backbones.
Introduction
In semantic segmentation, the objective is to assign a category label to every pixel. Modern architectures like OCR and CPNet attempt to leverage "class-level" context by aggregating features into category-specific centers. However, these methods face two primary challenges: Context Bias and Error Accumulation. Context bias occurs when features of different classes become entangled due to frequent co-occurrence (e.g., cows always appearing on grass). Error accumulation arises because these models typically estimate class centers using predicted, often noisy, masks during training, creating a negative feedback loop.
Methodology
Class-Aware Regularization (CAR)
To address these limitations, we propose CAR, a training-only regularization strategy. Unlike previous methods that rely on predicted masks, CAR utilizes Ground Truth (GT) labels to define class centers, providing a stable "anchor" for the feature space. CAR optimizes the feature manifold through three novel loss functions:
- Intra-class center-to-pixel loss: Minimizes the distance between pixels and their respective class centers.
- Inter-class center-to-center loss: Maximizes the distance between different category centers.
- Inter-class center-to-pixel loss: Ensures pixels remain distant from the centers of categories they do not belong to.
The CARD Decoder
To maximize the efficiency of these learned representations, we designed the CARD decoder. It replaces heavy dilated convolutions with two lightweight components:
- Enhanced Joint Pyramid Upsampling (EJPU): Fuses multi-scale features more effectively than standard methods.
- Synced Axial Attention (SAA): A memory-efficient token mixer that captures long-range dependencies by sharing query/key sets across rows and columns, significantly reducing the GFLOPs required for high-resolution processing.
Experimental Results
We evaluated CARD across four major benchmarks: Pascal Context, COCOStuff-10K/164K, and Cityscapes.
- Performance Gains: CAR consistently improved baseline models. For a ResNet-50 backbone on Pascal Context, CAR provided a 2.18% mIOU boost. On Cityscapes, CARD reached 83.6% mIOU using a ConvNeXt-L backbone.
- Efficiency: The CARD decoder demonstrates massive computational savings. When paired with an EfficientNet-L2 backbone, it reduced GFLOPs by 82% compared to traditional dilated versions while simultaneously improving accuracy.
- Inference Overhead: Because CAR is a regularization technique applied only during training, it adds zero latency to the model during deployment.
Conclusion
CARD provides a robust solution to feature entanglement in semantic segmentation. By using ground-truth supervision to "sculpt" the feature space during training and employing an efficient axial-attention-based decoder, we achieve superior accuracy and efficiency. Future work will explore extending CAR principles to other dense prediction tasks such as instance segmentation and depth estimation.
Summary updated