Skip to main content
QUICK REVIEW

[Paper Review] Prompting Diffusion Representations for Cross-Domain Semantic Segmentation

Rui Gong, Martin Danelljan|arXiv (Cornell University)|Jul 5, 2023
Domain Adaptation and Few-Shot LearningComputer Science8 citations
TL;DR

The paper shows diffusion-pretrained representations offer exceptional cross-domain generalization for semantic segmentation and introduces prompt-based strategies (scene and category prompts, prompt randomization) plus test-time prompt tuning to further boost DG and TTDA performance.

ABSTRACT

While originally designed for image generation, diffusion models have recently shown to provide excellent pretrained feature representations for semantic segmentation. Intrigued by this result, we set out to explore how well diffusion-pretrained representations generalize to new domains, a crucial ability for any representation. We find that diffusion-pretraining achieves extraordinary domain generalization results for semantic segmentation, outperforming both supervised and self-supervised backbone networks. Motivated by this, we investigate how to utilize the model's unique ability of taking an input prompt, in order to further enhance its cross-domain performance. We introduce a scene prompt and a prompt randomization strategy to help further disentangle the domain-invariant information when training the segmentation head. Moreover, we propose a simple but highly effective approach for test-time domain adaptation, based on learning a scene prompt on the target domain in an unsupervised manner. Extensive experiments conducted on four synthetic-to-real and clear-to-adverse weather benchmarks demonstrate the effectiveness of our approaches. Without resorting to any complex techniques, such as image translation, augmentation, or rare-class sampling, we set a new state-of-the-art on all benchmarks. Our implementation will be publicly available at \url{https://github.com/ETHRuiGong/PTDiffSeg}.

Motivation & Objective

  • Assess how diffusion-pretrained backbones generalize to unseen domains for semantic segmentation.
  • Investigate whether prompt conditioning can disentangle domain-invariant features from domain-variant cues.
  • Propose scene and category prompts plus prompt randomization to improve domain generalization.
  • Develop a prompt-tuning-based approach for test-time domain adaptation using unsupervised target data.

Proposed method

  • Freeze a diffusion-pretrained backbone (Stable Diffusion) and train a semantic projection head.
  • Introduce category prompts (class tokens) and scene prompts (domain/style cues) as conditioning inputs to disentangle features.
  • Apply prompt randomization by enforcing prediction consistency across multiple scene prompts with a KL-divergence based loss.
  • Use a combined loss: semantic segmentation loss plus a consistency loss to train with multiple prompts.
  • For TTDA, fine-tune only the scene prompt via a pseudo-label based objective to adapt to the target domain.

Experimental results

Research questions

  • RQ1How does diffusion-pretraining compare to supervised and self-supervised backbones in out-of-domain semantic segmentation?
  • RQ2Can prompt conditioning (category and scene prompts) improve domain generalization?
  • RQ3Does prompt randomization further disentangle domain-invariant representations and improve robustness?
  • RQ4Can test-time prompt tuning enable efficient adaptation to unlabeled target domains?

Key findings

  • Diffusion-pretrained backbones achieve superior domain generalization compared to ImageNet-supervised, self-supervised, and CLIP backbones on GTA→Cityscapes, among others.
  • Category prompts plus scene prompts enable the model to disentangle domain-invariant semantics from domain-variant styles, improving generalization.
  • Prompt randomization yields consistent predictions across different scene prompts and outperforms baselines on synthetic-to-real and clear-to-adverse benchmarks.
  • Prompt tuning of the scene prompt at test time provides parameter-efficient TTDA gains, surpassing several TTDA baselines.
  • DG methods with prompts achieve state-of-the-art results on multiple benchmarks, including Cityscapes→ACDC, and even outperform some UDA methods without target data.

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.