TL;DR
Diffuse2Seg is a novel, training-free method that repurposes frozen text-to-image diffusion models to automatically generate high-quality, multi-granularity segmentation masks without any manual supervision. By propagating a grid of point prompts through the model's internal self-attention representations, it creates dense pseudo-labels that significantly outperform prior unsupervised state-of-the-art methods and provide an exceptionally strong initialization for data-efficient semi-supervised learning.
What Problem Does This Paper Address?
Models like Meta's Segment Anything Model (SAM) have revolutionized computer vision by demonstrating remarkable zero-shot capabilities in segmenting any object. However, training SAM required the SA-1B dataset, which contains over 1 billion manually annotated masks across 11 million images. Collecting such dense, hierarchical labels (spanning whole objects, amorphous backgrounds, and fine-grained parts) is incredibly expensive and time-consuming.
Previous attempts to generate segmentation labels without human intervention typically relied on self-supervised learning (SSL) representations, such as DINO. While effective, these SSL-based methods suffer from a major limitation: they are heavily biased toward distinct foreground objects ("things") and struggle to accurately segment amorphous background regions ("stuff" like sky, roads, or water) or hierarchical sub-parts.
Diffuse2Seg addresses this gap by leveraging text-to-image diffusion models, which naturally encode global scene composition, contextual relationships, and fine-grained spatial layouts as they denoise random samples into coherent images.
Methods
Diffuse2Seg operates in three main steps without retraining the underlying diffusion model:
- Self-Attention Extraction: The authors pass an input image through a frozen Stable Diffusion 2 (SD2) model for a single denoising step ($t=150$). They extract high-resolution self-attention matrices from the final layers of the UNet decoder and aggregate them into a single token-to-token affinity matrix.
- Prompt-Based Segment Generation: To segment the entire image automatically, the method initializes a dense, equidistant grid of point prompts. These prompts are propagated across the self-attention affinity graph using an edge-preserving, non-linear $p$-Laplacian regularized propagation algorithm. This step converts sparse attention maps into dense, spatially coherent soft object masks.
- Map Merging and Post-Processing: The soft masks are clustered using agglomerative average linkage clustering based on symmetric Kullback-Leibler (KL) divergence. By cutting the clustering tree at multiple thresholds, the method extracts masks at various granularities (from tiny parts to entire objects). Redundant masks are filtered out using area-descending non-maximum suppression (NMS).
Finally, these generated pseudo-labels are distilled into a lightweight, standard instance segmentation model (Mask2Former) using a two-round training procedure. The second round employs a "predict-and-conquer" strategy, running inference on image crops to recover fine details missed due to the diffusion model's lower latent resolution.
Datasets
The authors evaluated Diffuse2Seg across several diverse benchmarks to test its open-world generalization:
- SA-1B (validation split): For core pseudo-label and zero-shot mask evaluation.
- ADE20K: For scene parsing, which heavily features "stuff" regions.
- EntitySeg: For high-quality, dense open-world entity segmentation.
- UVO: For open-world video object segmentation.
- PACO: For detailed part-level segmentation.
- COCO & LVIS: For standard "things"-only instance segmentation benchmarks.
Key Insights and Ideas
- Generative Priors Excel at "Stuff": Unlike discriminative models (like DINO) that focus primarily on object boundaries, generative diffusion models must model the entire scene to synthesize realistic images. This makes their internal features uniquely capable of capturing amorphous background "stuff" alongside foreground "things."
- Non-Linear Propagation is Crucial: Standard linear graph propagation ($p=2$) tends to bleed across object boundaries. Utilizing non-linear $p$-Laplacian propagation ($p < 2$, specifically $p=1.6$) acts as an edge-stopping mechanism, significantly boosting mask precision.
- Data-Efficient Bootstrapping: Zero-shot pseudo-labels can serve as an incredibly powerful pre-training signal. A model trained purely on Diffuse2Seg's unsupervised labels provides a better starting point for semi-supervised fine-tuning than starting from scratch or using prior SSL baselines.
Key Results
- Superior Pseudo-Labels: Diffuse2Seg outperforms the previous DINO-based state-of-the-art (UnSAM) in pseudo-label average recall ($AR_{1000}$) by 4.3 to 7.1 percentage points (p.p.) across five distinct evaluation domains.
- State-of-the-Art Detector-Free Training: When training a segmentation model without any auxiliary object detectors, Diffuse2Seg beats the strongest baseline (SOHES) by +7.7 p.p. on "stuff+things" datasets and +10.0 p.p. on part segmentation (PACO), despite using half the training images and a smaller backbone.
- Remarkable Semi-Supervised Efficiency: When fine-tuned with human annotations, a model initialized with Diffuse2Seg requires only 5,000 labeled images to match the performance of a reference model trained on 100,000 ground-truth images from scratch.
Limitations and Future Work
Despite its strong performance, Diffuse2Seg has a few notable limitations:
- Resolution Bottleneck: Because it relies on the latent space of Stable Diffusion, the resolution is inherently limited by the VAE downsampling factor. Consequently, the model struggles to capture exceptionally small objects or ultra-fine details during the initial pseudo-label generation step.
- Texture-Driven Oversegmentation: Because diffusion features encode rich texture information, the method can occasionally oversegment large, uniform regions that contain subtle texture variations (such as gradients in a clear sky).
The authors suggest that future extensions could integrate class-conditioned cross-attention prompting or leverage features from generative video models to enforce temporal consistency across frames.
Summary updated