Images Speak in Images: A Generalist Painter for In-Context Visual Learning

Xinlong Wang, Wen Wang, Yue Cao, Chunhua Shen, Tiejun Huang
12/5/2022
cs.CV

Official code: baaivision/Painter (2,599 stars, Python, MIT, last commit 2024-12-06).

Abstract

In-context learning, as a new paradigm in NLP, allows the model to rapidly adapt to various tasks with only a handful of prompts and examples. But in computer vision, the difficulties for in-context learning lie in that tasks vary significantly in the output representations, thus it is unclear how to define the general-purpose task prompts that the vision model can understand and transfer to out-of-domain tasks.

Show full abstract

In this work, we present Painter, a generalist model which addresses these obstacles with an "image"-centric solution, that is, to redefine the output of core vision tasks as images, and specify task prompts as also images. With this idea, our training process is extremely simple, which performs standard masked image modeling on the stitch of input and output image pairs. This makes the model capable of performing tasks conditioned on visible image patches. Thus, during inference, we can adopt a pair of input and output images from the same task as the input condition, to indicate which task to perform. Without bells and whistles, our generalist Painter can achieve competitive performance compared to well-established task-specific models, on seven representative vision tasks ranging from high-level visual understanding to low-level image processing. In addition, Painter significantly outperforms recent generalist models on several challenging tasks.

View on arXivView PDF

Code Implementations(1)

baaivision/PainterOfficial100%
MIT

Painter & SegGPT Series: Vision Foundation Models from BAAI

2,599179Python, ShellDec 5, 20221 years agoMIT
cvpr2023generalist-modelgeneralist-painterin-context-learningin-context-visual-learning+2 more

Similar Papers

Cite this paper

@article{wang2022images,
  title  = {Images Speak in Images: A Generalist Painter for In-Context Visual Learning},
  author = {Xinlong Wang and Wen Wang and Yue Cao and Chunhua Shen and Tiejun Huang},
  year   = {2022},
  eprint = {2212.02499},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2212.02499}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2212.02499.svg)](https://codeofpaper.com/paper/2212.02499)

Discussion