Papers › SegGPT: Segmenting Everything In Context

SegGPT: Segmenting Everything In Context

6 Apr 2023arXiv:2304.03284archive 2025-07-28

Xinlong Wang, Xiaosong Zhang, Yue Cao, Wen Wang, Chunhua Shen, Tiejun Huang

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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2304.03284")

Code

Syntology Ran 6 of 10 code samples harvested from 1 repository linked to this paper; 4 have no recorded run. Of those that ran: 2 ran · honoured contract; 4 ran with no contract checked.

By repository: official repository: 10 samples from 1 repository, 6 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

baaivision/painter officialmentioned in paperpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

10 samples harvested; 6 ran; 2 honoured the contract we drafted; 4 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · honoured contract
4ran
4unverified

Licence: 0 of the 10 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from baaivision/painter. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

adjust_learning_rate baaivision/painter/Painter/util/lr_sched.py official repository ran · honoured contract MIT (permissive) · bd3578806ecf5ac2 · report
build_dataset baaivision/painter/Painter/util/datasets.py official repository ran MIT (permissive) · 27f8c4c706fd43ec · report
build_transform baaivision/painter/Painter/util/datasets.py official repository ran MIT (permissive) · 800cebf161a8aa26 · report
collate_fn baaivision/painter/Painter/util/ddp_utils.py official repository ran · honoured contract fingerprinted MIT (permissive) · f55c31d782e48ffb · report
get_layer_id_for_vit baaivision/painter/Painter/util/lr_decay.py official repository ran fingerprinted MIT (permissive) · 89edf5372214b57d · report
param_groups_lrd baaivision/painter/Painter/util/lr_decay.py official repository ran MIT (permissive) · 8baf25cef41cba16 · report
get_loss_scale_for_deepspeed baaivision/painter/Painter/engine_train.py official repository unverified MIT (permissive) · 0662163cbe22b24d · report
get_vit_lr_decay_rate baaivision/painter/Painter/models_painter.py official repository unverified MIT (permissive) · 7fd0e9f741ef35d4 · report
init_distributed_mode baaivision/painter/Painter/util/ddp_utils.py official repository unverified MIT (permissive) · b21729609ddb1591 · report
mask_matrix_nms baaivision/painter/Painter/util/matrix_nms.py official repository unverified MIT (permissive) · 9f23def85e2c60a8 · report

Tasks

Few-Shot Semantic SegmentationIn-Context LearningPanoptic SegmentationPersonalized SegmentationSegmentationSemantic SegmentationVideo Object SegmentationVideo Semantic Segmentation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Few-Shot Semantic Segmentation COCO-20i (1-shot) SegGPT (ViT) Mean IoU 56.1 #3 of 85 Archive leaderboard report
Few-Shot Semantic Segmentation COCO-20i (5-shot) SegGPT (ViT) Mean IoU 67.9 #1 of 81 Archive leaderboard report
Few-Shot Semantic Segmentation FSS-1000 (1-shot) SegGPT (ViT) Mean IoU 85.6 #20 of 24 Archive leaderboard report
Few-Shot Semantic Segmentation FSS-1000 (5-shot) SegGPT (ViT) Mean IoU 89.3 #9 of 22 Archive leaderboard report
Few-Shot Semantic Segmentation PASCAL-5i (1-Shot) SegGPT (ViT) Mean IoU 83.2 #1 of 105 Archive leaderboard report
Few-Shot Semantic Segmentation PASCAL-5i (5-Shot) SegGPT (ViT) Mean IoU 89.8 #1 of 96 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections