Diffusion Models are Few-shot Learners for Dense Vision Tasks

Benlin Liu, Luming Tang, Yongming Rao, Wei-Chiu Ma, Ranjay KrishnaOpenReview 2025 · Submission to ICLR 2025 · Rejected

Abstract

The ability to adapt to new, unseen tasks with only a handful of training examples is a key factor behind the unprecedented success of language models. However, in computer vision, few-shot adaption has largely focused on adapting to new semantic categories or answering new visual questions. Adapting a model to dense vision tasks – depth estimation, surface normal estimation, semantic segmentation – has only been possible with large amounts of training data and with custom decoder heads, since the output spaces for each task varies widely. For instance, depth estimation outputs continuous values while semantic segmentation generates discrete categorical assignments. In this paper, we found that the diffusion prior can effectively adapt to various dense tasks, and based on this, we introduce an adaptation mechanism that exploits a pretrained diffusion model for 12 different dense vision tasks using only a few training examples. Moreover, adapting to different tasks requires only modifying the input, without changing the internal parameters of the model. Our key insight is to reframe all dense prediction tasks into a codebook-conditioned classification problem, even for continuous outputs. Specifically, we learn two set of parameters: (1) concept embeddings that condition the diffusion model to encode task-specific representations in their attention masks; and (2) codebook embeddings that recombine discrete outputs to continuous ones. With this novel design, we achieve state-of-the-art results across 12 datasets for few shot learning.
BibTeX
@misc{liu2025diffusion,
  author = {Benlin Liu and Luming Tang and Yongming Rao and Wei-Chiu Ma and Ranjay Krishna},
  title = {{Diffusion Models are Few-shot Learners for Dense Vision Tasks}},
  year = {2025},
  url = {https://openreview.net/forum?id=az5WtGe48n},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2025},
}

Loading related content...

Figure