SegGPT: Segmenting Everything In Context

Unifies segmentation tasks into a generalist in-context model.
Ask this paper
In-context segmentation: Uses in-context examples (input-mask pairs) to define the segmentation task at inference time.
Task generalization: Handles semantic, instance, panoptic, and referring segmentation through the same in-context interface.
Training-free adaptation: Adapts to new segmentation tasks without retraining - just provide example pairs.
Prompt-based vision: Part of the 2023 push to bring LLM-style in-context learning to vision tasks.
Abstract
We present SegGPT, a generalist model for segmenting everything in context. We unify various segmentation tasks into a generalist in-context learning framework that accommodates different kinds of segmentation data by transforming them into the same format of images. The training of SegGPT is formulated as an in-context coloring problem with random color mapping for each data sample. The objective is to accomplish diverse tasks according to the context, rather than relying on specific colors. After training, SegGPT can perform arbitrary segmentation tasks in images or videos via in-context inference, such as object instance, stuff, part, contour, and text. SegGPT is evaluated on a broad range of tasks, including few-shot semantic segmentation, video object segmentation, semantic segmentation, and panoptic segmentation. Our results show strong capabilities in segmenting in-domain and out-of-domain targets, either qualitatively or quantitatively.