Table of Contents
Fetching ...

Diffusion Model is Secretly a Training-free Open Vocabulary Semantic Segmenter

Jinglong Wang, Xiawei Li, Jing Zhang, Qingyuan Xu, Qin Zhou, Qian Yu, Lu Sheng, Dong Xu

TL;DR

This work tackles open-vocabulary semantic segmentation by eliminating training requirements and leveraging pre-trained diffusion models. It shows that object shapes are captured by self-attention while semantics align with cross-attention in the denoising U-Net, enabling pixel-level segmentation via Bayes-inspired reasoning on $p(m{x}|m{c})$. The proposed DiffSegmenter fuses multi-layer cross-attention, completes score maps with self-attention, and uses BLIP-driven prompts and category filtering to boost performance without additional training. Empirical results on VOC, Pascal Context, and COCO demonstrate competitive zero-shot and strong weakly-supervised performance, with practical benefits for image editing and scalability to large vocabularies.

Abstract

The pre-trained text-image discriminative models, such as CLIP, has been explored for open-vocabulary semantic segmentation with unsatisfactory results due to the loss of crucial localization information and awareness of object shapes. Recently, there has been a growing interest in expanding the application of generative models from generation tasks to semantic segmentation. These approaches utilize generative models either for generating annotated data or extracting features to facilitate semantic segmentation. This typically involves generating a considerable amount of synthetic data or requiring additional mask annotations. To this end, we uncover the potential of generative text-to-image diffusion models (e.g., Stable Diffusion) as highly efficient open-vocabulary semantic segmenters, and introduce a novel training-free approach named DiffSegmenter. The insight is that to generate realistic objects that are semantically faithful to the input text, both the complete object shapes and the corresponding semantics are implicitly learned by diffusion models. We discover that the object shapes are characterized by the self-attention maps while the semantics are indicated through the cross-attention maps produced by the denoising U-Net, forming the basis of our segmentation results.Additionally, we carefully design effective textual prompts and a category filtering mechanism to further enhance the segmentation results. Extensive experiments on three benchmark datasets show that the proposed DiffSegmenter achieves impressive results for open-vocabulary semantic segmentation.

Diffusion Model is Secretly a Training-free Open Vocabulary Semantic Segmenter

TL;DR

This work tackles open-vocabulary semantic segmentation by eliminating training requirements and leveraging pre-trained diffusion models. It shows that object shapes are captured by self-attention while semantics align with cross-attention in the denoising U-Net, enabling pixel-level segmentation via Bayes-inspired reasoning on . The proposed DiffSegmenter fuses multi-layer cross-attention, completes score maps with self-attention, and uses BLIP-driven prompts and category filtering to boost performance without additional training. Empirical results on VOC, Pascal Context, and COCO demonstrate competitive zero-shot and strong weakly-supervised performance, with practical benefits for image editing and scalability to large vocabularies.

Abstract

The pre-trained text-image discriminative models, such as CLIP, has been explored for open-vocabulary semantic segmentation with unsatisfactory results due to the loss of crucial localization information and awareness of object shapes. Recently, there has been a growing interest in expanding the application of generative models from generation tasks to semantic segmentation. These approaches utilize generative models either for generating annotated data or extracting features to facilitate semantic segmentation. This typically involves generating a considerable amount of synthetic data or requiring additional mask annotations. To this end, we uncover the potential of generative text-to-image diffusion models (e.g., Stable Diffusion) as highly efficient open-vocabulary semantic segmenters, and introduce a novel training-free approach named DiffSegmenter. The insight is that to generate realistic objects that are semantically faithful to the input text, both the complete object shapes and the corresponding semantics are implicitly learned by diffusion models. We discover that the object shapes are characterized by the self-attention maps while the semantics are indicated through the cross-attention maps produced by the denoising U-Net, forming the basis of our segmentation results.Additionally, we carefully design effective textual prompts and a category filtering mechanism to further enhance the segmentation results. Extensive experiments on three benchmark datasets show that the proposed DiffSegmenter achieves impressive results for open-vocabulary semantic segmentation.
Paper Structure (25 sections, 7 equations, 7 figures, 5 tables)

This paper contains 25 sections, 7 equations, 7 figures, 5 tables.

Figures (7)

  • Figure 1: Segmentation score maps generated by our proposed DiffSegmenter and previous discriminative methods.
  • Figure 2: Overview of the proposed DiffSegmenter. An input image and enhanced candidate class tokens by the BLIP-based prompt design module are fed into an off-the-shelf pre-trained conditional latent diffusion model. The fused cross-attention maps produced by the denoising U-Net are treated as the initial segmentation score maps, which is further refined and completed by the fused self-attention maps of the U-Net. Note that the parameters of all the involved models are frozen without any tuning.
  • Figure 3: Cross-attention maps of different layers.
  • Figure 4: Qualitative results of DiffSegmenter and SegCLIP baseline for zero-shot open-vocabulary segmentation.
  • Figure 5: Comparison of different mask generation variants.
  • ...and 2 more figures