Skip to main content
QUICK REVIEW

[Paper Review] Peekaboo: Text to Image Diffusion Models are Zero-Shot Segmentors

Ryan Burgert, Kanchana Ranasinghe|arXiv (Cornell University)|Nov 23, 2022
Multimodal Machine Learning ApplicationsComputer Science12 citations
TL;DR

This paper introduces Peekaboo, a novel zero-shot, open-vocabulary, unsupervised method that leverages pre-trained text-to-image diffusion models—specifically Stable Diffusion—without retraining to perform semantic and referring segmentation. By applying inference-time optimization with a novel alpha compositing-based loss, Peekaboo generates precise segmentation masks from natural language prompts, achieving competitive results on Pascal VOC-C and RefCOCO, and demonstrating the first end-to-end generation of RGBA images with transparency from a diffusion model trained only on RGB data.

ABSTRACT

Recently, text-to-image diffusion models have shown remarkable capabilities in creating realistic images from natural language prompts. However, few works have explored using these models for semantic localization or grounding. In this work, we explore how an off-the-shelf text-to-image diffusion model, trained without exposure to localization information, can ground various semantic phrases without segmentation-specific re-training. We introduce an inference time optimization process capable of generating segmentation masks conditioned on natural language prompts. Our proposal, Peekaboo, is a first-of-its-kind zero-shot, open-vocabulary, unsupervised semantic grounding technique leveraging diffusion models without any training. We evaluate Peekaboo on the Pascal VOC dataset for unsupervised semantic segmentation and the RefCOCO dataset for referring segmentation, showing results competitive with promising results. We also demonstrate how Peekaboo can be used to generate images with transparency, even though the underlying diffusion model was only trained on RGB images - which to our knowledge we are the first to attempt. Please see our project page, including our code: https://ryanndagreat.github.io/peekaboo

Motivation & Objective

  • To explore whether pre-trained text-to-image diffusion models inherently encode spatial localization information for semantic phrases.
  • To develop a zero-shot, open-vocabulary, unsupervised segmentation method that does not require segmentation-specific fine-tuning or annotations.
  • To demonstrate that diffusion models can be leveraged for pixel-level grounding of complex natural language prompts.
  • To enable end-to-end generation of RGBA images with transparency using a model trained exclusively on RGB images.

Proposed method

  • Peekaboo performs inference-time optimization on a pre-trained Stable Diffusion model to generate segmentation masks from text prompts.
  • It introduces a novel alpha compositing-based loss function to improve the learning of alpha masks during optimization.
  • The method optimizes a differentiable alpha mask that is composited with a fixed background image to generate a composite image.
  • Score Distillation Loss (SDL) is used as a cross-modal similarity objective between the text prompt and the generated image region.
  • The optimization process iteratively updates the alpha mask to maximize alignment between the text prompt and the generated image.
  • The approach is applied both to real images (for segmentation) and to synthetic image composites (for transparent image generation).

Experimental results

Research questions

  • RQ1Can pre-trained text-to-image diffusion models like Stable Diffusion be used for zero-shot semantic and referring segmentation without any retraining?
  • RQ2Does the internal representation of diffusion models contain implicit spatial localization information for natural language phrases?
  • RQ3Can a diffusion model trained only on RGB images be used to generate images with transparency (RGBA) through optimization?
  • RQ4How does the proposed alpha compositing-based loss compare to CLIP-based losses in segmentation performance?
  • RQ5What is the impact of prompt complexity and object position (e.g., center vs. edge) on segmentation accuracy?

Key findings

  • Peekaboo achieves competitive performance on the RefCOCO referring segmentation benchmark and the modified Pascal VOC-C unsupervised semantic segmentation benchmark without any model fine-tuning.
  • The method successfully segments complex, compound phrases such as 'a bald man wearing glasses with a white shirt and black pants' with high spatial accuracy.
  • Peekaboo demonstrates strong shape priors, correctly segmenting objects even when parts of them are occluded or not visible in the original image.
  • The model is capable of generating realistic RGBA images with transparency through end-to-end optimization, a first-of-its-kind result for diffusion models trained only on RGB data.
  • The alpha compositing-based loss outperforms previous CLIP-based optimization methods in segmentation quality and convergence speed.
  • Segmentation performance is highest for objects near the center of the image, indicating a bias in the model’s internal localization behavior.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.