Abstract
iSeg is a training-free framework designed to extract high-quality semantic segmentation masks from pre-trained Stable Diffusion models. By leveraging internal attention maps and introducing an entropy-reduced self-attention mechanism, iSeg enables stable iterative refinement. This approach achieves state-of-the-art performance in unsupervised and open-vocabulary segmentation tasks without requiring manual pixel-level annotations.
Introduction
Semantic segmentation typically demands large-scale datasets with expensive pixel-level annotations. While vision-language models like CLIP offer zero-shot capabilities, they often lack the spatial precision required for segmentation. Recent research has identified that generative models, such as Stable Diffusion, contain rich semantic information within their internal cross-attention and self-attention maps. However, extracting clean masks from these maps is challenging; naive iterative refinement often leads to noise accumulation and signal degradation. iSeg addresses this by stabilizing the refinement process, allowing for multiple iterations that progressively sharpen the segmentation masks.
Methods
The iSeg framework consists of three key components:
- Category-Enhanced Cross-Attention (Cat-Cross): This module initializes the process by weighting text embeddings of target categories more heavily. This produces a cleaner starting cross-attention map focused on the relevant objects.
- Entropy-Reduced Self-Attention (Ent-Self): The core innovation of iSeg. Standard self-attention maps often aggregate irrelevant global information. Ent-Self applies a gradient descent scheme to minimize the entropy of these maps, effectively suppressing background noise and sharpening the object signal.
- Iterative Refinement Loop: iSeg uses the denoised Ent-Self maps to iteratively refine the cross-attention maps over multiple steps (typically $N=10$). This iterative process remains stable due to the entropy reduction, leading to high-quality final masks.
Key Insights
A critical observation in this work is that self-attention maps can be viewed as "noisy" versions of ideal ground-truth masks. By treating refinement as an entropy-reduction problem, the authors transform what was previously a destructive iterative process into a constructive one. Furthermore, iSeg's reliance on internal attention allows it to support various user prompts, including text, points, lines, and bounding boxes, enhancing its utility for interactive segmentation.
Results
iSeg was evaluated across multiple benchmarks, including PASCAL VOC, MS COCO, Cityscapes, and DomainNet.
- Unsupervised Segmentation: On Cityscapes, iSeg achieved a 3.8% mIoU improvement over the previous state-of-the-art training-free method, DiffSeg.
- Weakly-supervised Segmentation: It reached 75.2% mIoU on PASCAL VOC, outperforming several training-based methods.
- Open-Vocabulary Segmentation: iSeg achieved 68.2% mIoU on VOC, surpassing CLIP-based and other training-free approaches.
- Efficiency: The framework is computationally efficient, with an inference time of approximately 0.16 seconds per image on an RTX 3090.
Conclusion and Future Work
iSeg demonstrates that high-quality segmentation can be achieved without explicit training by refining the internal knowledge of generative models. While currently using a fixed iteration count, future developments could include adaptive refinement strategies that dynamically adjust iterations based on image complexity. Additionally, distilling iSeg's capabilities into more lightweight architectures remains a promising direction for real-time deployment.
Summary updated