Abstract
Aggregation of multi-stage features has been revealed to play a significant role in semantic segmentation. Unlike previous methods employing point-wise summation or concatenation for feature aggregation, this study proposes the Category Feature Transformer (CFT) that explores the flow of category embedding and transformation among multi-stage features through the prevalent multi-head attention mechanism. CFT learns unified feature embeddings for individual semantic categories from high-level features during each aggregation process and dynamically broadcasts them to high-resolution features. Integrating the proposed CFT into a typical feature pyramid structure exhibits superior performance over a broad range of backbone networks. We conduct extensive experiments on popular semantic segmentation benchmarks. Specifically, the proposed CFT obtains a compelling 55.1% mIoU with greatly reduced model parameters and computations on the challenging ADE20K dataset.
Introduction
In semantic segmentation, models must reconcile high-level semantic understanding with low-level spatial precision. Most modern architectures utilize a Feature Pyramid Network (FPN) to aggregate information across different stages. However, standard FPNs typically rely on simple point-wise summation or concatenation, which leads to two primary issues: context misalignment during upsampling and a "Minority Category Gap," where performance on rare object classes is sacrificed for overall accuracy.
The Category Feature Transformer (CFT) addresses these limitations by reimagining feature aggregation as a dynamic broadcasting problem. By replacing static mathematical operations with a category-aware attention mechanism, CFT achieves state-of-the-art results while maintaining computational efficiency.
The Category Feature Transformer (CFT)
The core of the proposed method is the CFT module, which replaces standard aggregation layers. The process is divided into two distinct stages:
- Category Feature Embedding: Instead of simple upsampling, the model predicts category masks (e.g., for 'car' or 'tree') from high-level features. It then calculates a unified embedding for each category by averaging features within these masks, creating a noise-free representation of each object class.
- Category Feature Transformation: Using a Multi-Head Attention (MHA) mechanism, the model treats high-resolution, low-level features as the Query and the learned category embeddings as the Key and Value. This allows the model to "broadcast" semantic information directly to the appropriate pixels in the high-resolution map.
Crucially, the authors employ explicit Mask Loss (combining Focal and Dice loss) during training to ensure the attention mechanism learns meaningful category patterns rather than arbitrary noise.
Key Insights and Results
A significant advantage of CFT is its robustness to minority classes. By creating unified embeddings for every category, the model ensures that rare classes maintain a distinct representation during fusion, preventing them from being overwhelmed by dominant classes like "sky" or "road."
Experimental Performance
The researchers evaluated CFT on the ADE20K, Cityscapes, and Pascal-Context benchmarks, yielding several key findings:
- State-of-the-Art Accuracy: CFT achieved 55.1% mIoU on ADE20K using a Swin-Large backbone, outperforming competitors like ViT-Adapter.
- Efficiency: Compared to methods like AlignSeg, CFT provides higher accuracy with fewer parameters and reduced FLOPs.
- Versatility: When integrated into the Mask2Former framework, CFT boosted performance from 57.3% to 58.5% mIoU, demonstrating its potential as a modular component for various architectures.
Conclusion
The Category Feature Transformer demonstrates that Transformer-style cross-attention is a naturally superior aggregator for multi-stage features in semantic segmentation. While the model occasionally faces challenges with visually similar objects (e.g., different types of indoor furniture), its ability to maintain sharp boundaries and consistent labeling across diverse categories marks a significant advancement. Future work may extend this framework to other dense prediction tasks like depth estimation or explore open-vocabulary segmentation through non-parametric clustering.
Summary updated