Introduction
Weakly Supervised Semantic Segmentation (WSSS) has emerged as a critical field of research to mitigate the high costs associated with pixel-level annotations. By training models using only image-level labels, researchers aim to bridge the gap between classification and segmentation. The standard pipeline involves generating Class Activation Maps (CAMs) to identify object regions, which then serve as pseudo-labels for training segmentation networks.
The Partial Activation Problem
A persistent challenge in WSSS is the "partial activation" phenomenon inherent in Convolutional Neural Networks (CNNs). Due to their local receptive fields, CNNs tend to focus on the most discriminative features of an object—such as the head of a bird or the wheels of a bus—rather than capturing the entire object extent. This results in incomplete pseudo-labels that hinder the final segmentation performance.
Methodology: TransCAM
TransCAM addresses this limitation by leveraging the Conformer architecture, a hybrid model that integrates a CNN branch and a Transformer branch in parallel. The core innovation of TransCAM lies in its refinement process:
- Dual-Branch Synergy: The model generates a standard CAM from the CNN branch, capturing local spatial details.
- Attention-Based Refinement: It extracts multi-head self-attention weights from the Transformer branch. The authors employ an "All-Blocks" strategy, averaging attention weights across all transformer layers. This captures both low-level spatial similarities (shallow blocks) and high-level semantic context (deep blocks).
- Refinement via Dot Product: The CNN-based CAM is refined by the aggregated attention map through a dot product operation. This process effectively "spreads" the activation from discriminative regions to the entire object body by utilizing the global context inherent in the transformer's attention mechanism.
Experimental Setup and Results
The proposed method was evaluated on the PASCAL VOC 2012 benchmark, which includes 21 object categories. The backbone was pre-trained on ImageNet, and the segmentation model was trained on an augmented set of 10,582 images.
TransCAM demonstrates significant improvements over baseline methods:
- Pseudo-label Quality: The initial seed mIoU (mean Intersection-over-Union) improved from a baseline of 51.7% to 64.85% before post-processing.
- Final Segmentation Performance: On the PASCAL VOC 2012 validation and test sets, TransCAM achieved 69.3% and 69.6% mIoU, respectively.
- Efficiency: Despite its superior performance, the Conformer-S backbone used in TransCAM is more parameter-efficient (37.7M parameters) than standard ResNet-101 (44.5M parameters).
Discussion and Conclusion
The success of TransCAM highlights the complementary nature of CNNs and Transformers. While CNNs provide sharp boundaries, Transformers offer the global perspective necessary to overcome partial activation. By simply utilizing the internal attention weights of the backbone, TransCAM avoids the need for complex auxiliary modules or multi-stage training strategies common in previous state-of-the-art methods.
Future research directions include integrating the refinement process into an end-to-end training framework to eliminate offline pseudo-label generation and testing the scalability of the approach on larger datasets like MS COCO.
Summary updated