Abstract
Weakly Supervised Semantic Segmentation (WSSS) with image-level labels aims to achieve pixel-level predictions using Class Activation Maps (CAMs). Recently, Contrastive Language-Image Pre-training (CLIP) has been introduced in WSSS. However, recent methods primarily focus on image-text alignment for CAM generation, while CLIP's potential in patch-text alignment remains unexplored. In this work, we propose ExCEL to explore CLIP's dense knowledge via a novel patch-text alignment paradigm for WSSS. Specifically, we propose Text Semantic Enrichment (TSE) and Visual Calibration (VC) modules to improve the dense alignment across both text and vision modalities. To make text embeddings semantically informative, our TSE module applies Large Language Models (LLMs) to build a dataset-wide knowledge base and enriches the text representations with an implicit attribute-hunting process. To mine fine-grained knowledge from visual features, our VC module first proposes Static Visual Calibration (SVC) to propagate fine-grained knowledge in a non-parametric manner. Then Learnable Visual Calibration (LVC) is further proposed to dynamically shift the frozen features towards distributions with diverse semantics. With these enhancements, ExCEL not only retains CLIP's training-free advantages but also significantly outperforms other state-of-the-art methods with much less training cost on PASCAL VOC and MS COCO.
Introduction
Weakly Supervised Semantic Segmentation (WSSS) represents a significant challenge in computer vision: achieving pixel-level accuracy using only image-level labels. Traditionally, this relies on Class Activation Maps (CAMs) to identify object regions. However, standard CAMs often suffer from the "discriminative part" problem, where the model focuses only on the most salient features (e.g., a bird's head) rather than the entire object.
While the Contrastive Language-Image Pre-training (CLIP) model has shown promise in this area, most existing methods treat it as a global classifier. This approach relies on global image-text alignment, which fails to leverage the dense, patch-level knowledge that CLIP inherently possesses.
Methodology
To address these limitations, we introduce ExCEL, a framework designed to explore CLIP's dense knowledge through a novel patch-text alignment paradigm. ExCEL moves beyond global representations to align specific image patches with descriptive textual attributes.
Text Semantic Enrichment (TSE)
Standard prompts (e.g., "a photo of a car") are often too sparse to guide dense segmentation. The TSE module utilizes Large Language Models (LLMs) like GPT-4 to generate detailed visual descriptions for every class in the dataset. These descriptions form a dataset-wide knowledge base. During inference, the model performs "implicit attribute hunting," selecting the most relevant descriptors to create semantically rich text embeddings that better match local image patches.
Visual Calibration (VC)
CLIP’s native attention mechanism is optimized for global classification, which tends to homogenize features and smooth out spatial details necessary for segmentation. ExCEL introduces two calibration components:
- Static Visual Calibration (SVC): A non-parametric module that uses intra-correlation across intermediate layers to preserve and propagate fine-grained spatial knowledge.
- Learnable Visual Calibration (LVC): A lightweight, trainable adapter that learns to shift frozen visual features toward a distribution better suited for dense semantic tasks, without requiring full fine-tuning of the CLIP backbone.
Experimental Results
ExCEL was evaluated on the PASCAL VOC 2012 and MS COCO 2014 benchmarks. The results demonstrate that the patch-text alignment paradigm significantly outperforms traditional image-text alignment methods.
- Performance: On PASCAL VOC, ExCEL achieved 78.4% mIoU, surpassing previous state-of-the-art methods like WeCLIP (76.4%).
- Efficiency: The model is remarkably efficient, requiring only 3.2 GB of VRAM and approximately 90 minutes of training on a single RTX 3090. This is a substantial improvement over competing methods that often require over 20 hours of training.
- Training-Free Capability: Even in a training-free configuration (using only TSE and SVC), ExCEL achieves 74.6% mIoU on VOC, outperforming many fully-trained legacy models.
Conclusion
ExCEL demonstrates that the key to advancing WSSS lies in unlocking the dense, patch-level knowledge already present in foundation models like CLIP. By enriching text semantics with LLMs and calibrating visual features to maintain spatial granularity, ExCEL provides a highly efficient and accurate solution for weakly supervised tasks. Future work will explore extending this dense alignment paradigm to other large-scale foundation models and addressing common challenges like object co-occurrence.
Summary updated