Papers › Masked-attention Mask Transformer for Universal Image Segmentation

Masked-attention Mask Transformer for Universal Image Segmentation

2 Dec 2021CVPR 2022 1arXiv:2112.01527archive 2025-07-28

Bowen Cheng, Ishan Misra, Alexander G. Schwing, Alexander Kirillov, Rohit Girdhar

Image segmentation is about grouping pixels with different semantics, e.g., category or instance membership, where each choice of semantics defines a task. While only the semantics of each task differ, current research focuses on designing specialized architectures for each task. We present Masked-attention Mask Transformer (Mask2Former), a new architecture capable of addressing any image segmentation task (panoptic, instance or semantic). Its key components include masked attention, which extracts localized features by constraining cross-attention within predicted mask regions. In addition to reducing the research effort by at least three times, it outperforms the best specialized architectures by a significant margin on four popular datasets. Most notably, Mask2Former sets a new state-of-the-art for panoptic segmentation (57.8 PQ on COCO), instance segmentation (50.1 AP on COCO) and semantic segmentation (57.7 mIoU on ADE20K).

PaperPDFConference PDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

No sample from the archive's official repository (facebookresearch/Mask2Former) is linked to this paper; the 8 samples below come from 1 community repository. Syntology harvested code from facebookresearch/Mask2Former for another paper.

facebookresearch/Mask2Former: Syntology's graph links these samples to RankSeg: Adaptive Pixel Classification with Image Category Ranking for Segmentation (arXiv:2203.04187; that paper's own run record: 9 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 0 honoured, 0 violated, 3 with no contract checked; 6 where Syntology's instrument failed) · 2 unverified); nothing checks that they implement this paper's method.

Syntology 8 code samples harvested from 1 repository linked to this paper: 7 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 6 where Syntology's instrument failed) · 1 unverified. Where Syntology's instrument failed: 4 where our contract draft was wrong; 2 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: community (archive-listed): 8 samples from 1 repository, 7 ran (1 with no instrument failure; 6 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 5 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-25 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

facebookresearch/Mask2Former officialmentioned on GitHubpytorchMITSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to RankSeg: Adaptive Pixel Classification with Image Category Ranking for Segmentation (arXiv:2203.04187; that paper's own run record: 9 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 0 honoured, 0 violated, 3 with no contract checked; 6 where Syntology's instrument failed) · 2 unverified); nothing checks that they implement this paper's method. report
DdeGeus/Mask2Former-IBS mentioned on GitHubpytorchMITSyntology: 8 samples, 7 ran (6 instrument-failed) · 1 unverified report
huggingface/transformers mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Attention Is All You Need (arXiv:1706.03762; that paper's own run record: 610 ran (of which 293 constructed an object rather than computing a result; 529 with no instrument failure: 45 honoured, 15 violated, 469 with no contract checked; 81 where Syntology's instrument failed) · 336 unverified), HuggingFace's Transformers: State-of-the-art Natural Language Processing (arXiv:1910.03771; that paper's own run record: 3 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 3 where Syntology's instrument failed) · 0 unverified), DeBERTa: Decoding-enhanced BERT with Disentangled Attention (arXiv:2006.03654; that paper's own run record: 4 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 2 honoured, 1 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 9 unverified) and 1 more (every one in this page's JSON twin); nothing checks that they implement this paper's method. report
nihalsid/mask2former mentioned on GitHubpytorchMITSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Mask2Former for Video Instance Segmentation (arXiv:2112.10764; that paper's own run record: 6 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 6 where Syntology's instrument failed) · 1 unverified); nothing checks that they implement this paper's method. report
MindSpore-scientific/code-7 Syntology: not harvested report
alibaba/EasyCV pytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to End-to-End Object Detection with Transformers (arXiv:2005.12872; that paper's own run record: 70 ran (of which 45 constructed an object rather than computing a result; 62 with no instrument failure: 2 honoured, 1 violated, 59 with no contract checked; 8 where Syntology's instrument failed) · 22 unverified), Training data-efficient image transformers & distillation through attention (arXiv:2012.12877; that paper's own run record: 12 ran (of which 1 constructed an object rather than computing a result; 9 with no instrument failure: 1 honoured, 0 violated, 8 with no contract checked; 3 where Syntology's instrument failed) · 7 unverified), Masked Autoencoders Are Scalable Vision Learners (arXiv:2111.06377; that paper's own run record: 86 ran (of which 40 constructed an object rather than computing a result; 68 with no instrument failure: 8 honoured, 0 violated, 60 with no contract checked; 18 where Syntology's instrument failed) · 51 unverified) and 1 more (every one in this page's JSON twin); nothing checks that they implement this paper's method. report
open-mmlab/mmdetection pytorchApache-2.0Syntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to An Open and Comprehensive Pipeline for Unified Object Grounding and Detection (arXiv:2401.02361; that paper's own run record: 4 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 0 honoured, 0 violated, 2 with no contract checked; 2 where Syntology's instrument failed) · 2 unverified); nothing checks that they implement this paper's method. 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.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

8 samples harvested: 7 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 6 where Syntology's instrument failed) · 1 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

4ran · our draft was wrong
2ran; the contract check could not run
1ran
1unverified

Licence: 0 of the 8 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 DdeGeus/Mask2Former-IBS. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

DdeGeus/Mask2Former-IBS community (archive-listed) 8 samples, 7 ran (6 instrument-failed) · 1 unverified
batch_dice_loss in 60 papers mask2former/modeling/matcher.py ran · our draft was wrong fingerprinted MIT (permissive) · bc2cb481a75c370d · report fixture: signature inputs:Tensor/2/float, targets:Tensor/2/float · returned Tensor · level recorded 2026-09-25
calculate_uncertainty in 37 papers mask2former_video/modeling/criterion.py ran; the contract check could not run (RAISES) MIT (permissive) · 2dcb8123d89bb1ff · report fixture: signature logits:Tensor/4/float · returned Tensor · level recorded 2026-09-25
dice_loss in 193 papers
census: 10 implementations from 16 papers, 7 distinct outputs across 4 buckets, one shared input per bucket
mask2former/modeling/criterion.py ran · our draft was wrong fingerprinted MIT (permissive) · 89f75e54ff128be0 · report fixture: signature inputs:Tensor/2/float, targets:Tensor/2/float, num_masks:float/0/float · returned Tensor · level recorded 2026-09-25
focal_loss in 65 papers
census: 6 implementations from 13 papers, 4 distinct outputs across 3 buckets, one shared input per bucket
mask2former/modeling/criterion.py ran fingerprinted MIT (permissive) · 2bb4c1887f16e1ba · report fixture: signature inputs:Tensor/2/float, targets:Tensor/2/float, num_masks:float/0/float · returned Tensor · level recorded 2026-09-24
sigmoid_ce_loss in 70 papers
census: 4 implementations from 8 papers, 3 distinct outputs across 2 buckets, one shared input per bucket
mask2former/modeling/criterion.py ran · our draft was wrong fingerprinted MIT (permissive) · d0c61e8dba511aa3 · report fixture: signature inputs:Tensor/2/float, targets:Tensor/2/float, num_masks:float/0/float · returned Tensor · level recorded 2026-09-25
window_partition in 377 papers
census: 13 implementations from 17 papers, 5 distinct outputs across 3 buckets, one shared input per bucket
mask2former/modeling/backbone/swin.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant fingerprinted MIT (permissive) · f9fd6241d935f07b · report fixture: signature x:Tensor/4/float, window_size:int/0/int · returned Tensor · level recorded 2026-09-22
window_reverse in 296 papers mask2former/modeling/backbone/swin.py ran · our draft was wrong MIT (permissive) · fb32094c6dbece71 · report fixture: signature windows:Tensor/4/float, window_size:int/0/int, H:int/0/int, W:int/0/int · returned Tensor · level recorded 2026-09-22
batch_sigmoid_ce_loss in 48 papers mask2former/modeling/matcher.py unverified MIT (permissive) · 1edd24985036b0bf · report

Tasks

2D Semantic SegmentationImage SegmentationInstance SegmentationPanoptic SegmentationSegmentationSemantic SegmentationUniversal Segmentation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
2D Semantic Segmentation WildScenes Mask2Former (Swin-L) mIoU 47.85 #1 of 5 Archive leaderboard report
2D Semantic Segmentation WildScenes Mask2Former (ResNet-50) mIoU 43.71 #3 of 5 Archive leaderboard report
Instance Segmentation ADE20K val Mask2Former (Swin-L, single-scale) AP 34.9 #11 of 14 Archive leaderboard report
Instance Segmentation ADE20K val Mask2Former (Swin-L, single-scale) APL 54.7 #11 of 14 Archive leaderboard report
Instance Segmentation ADE20K val Mask2Former (Swin-L, single-scale) APM 40 #11 of 14 Archive leaderboard report
Instance Segmentation ADE20K val Mask2Former (Swin-L, single-scale) APS 16.3 #11 of 14 Archive leaderboard report
Instance Segmentation ADE20K val Mask2Former (Swin-L + FAPN) AP 33.4 #12 of 14 Archive leaderboard report
Instance Segmentation ADE20K val Mask2Former (Swin-L + FAPN) APL 54.6 #12 of 14 Archive leaderboard report
Instance Segmentation ADE20K val Mask2Former (Swin-L + FAPN) APM 37.6 #12 of 14 Archive leaderboard report
Instance Segmentation ADE20K val Mask2Former (Swin-L + FAPN) APS 14.6 #12 of 14 Archive leaderboard report
Instance Segmentation ADE20K val Mask2Former (ResNet50) AP 26.4 #13 of 14 Archive leaderboard report
Instance Segmentation ADE20K val Mask2Former (ResNet50) APS 10.4 #13 of 14 Archive leaderboard report
Instance Segmentation ADE20K val Mask2Former (ResNet-50) APL 43.1 #14 of 14 Archive leaderboard report
Instance Segmentation ADE20K val Mask2Former (ResNet-50) APM 28.9 #14 of 14 Archive leaderboard report
Instance Segmentation COCO minival Mask2Former (Swin-L) mask AP 50.1 #26 of 93 Archive leaderboard report
Instance Segmentation COCO test-dev Mask2Former (Swin-L, single scale) AP50 74.9 #21 of 112 Archive leaderboard report
Instance Segmentation COCO test-dev Mask2Former (Swin-L, single scale) AP75 54.9 #21 of 112 Archive leaderboard report
Instance Segmentation COCO test-dev Mask2Former (Swin-L, single scale) APL 71.2 #21 of 112 Archive leaderboard report
Instance Segmentation COCO test-dev Mask2Former (Swin-L, single scale) APM 53.8 #21 of 112 Archive leaderboard report
Instance Segmentation COCO test-dev Mask2Former (Swin-L, single scale) APS 29.1 #21 of 112 Archive leaderboard report
Instance Segmentation COCO test-dev Mask2Former (Swin-L, single scale) mask AP 50.5 #21 of 112 Archive leaderboard report
Instance Segmentation COCO val (panoptic labels) Mask2Former (Swin-L, single-scale) AP 49.1 #3 of 4 Archive leaderboard report
Instance Segmentation Cityscapes val Mask2Former (Swin-L, single-scale) mask AP 43.7 #9 of 17 Archive leaderboard report
Instance Segmentation Cityscapes val Mask2Former (Swin-B) mask AP 42 #10 of 17 Archive leaderboard report
Instance Segmentation Cityscapes val Mask2Former (Swin-S) mask AP 41.8 #11 of 17 Archive leaderboard report
Instance Segmentation Cityscapes val Mask2Former (Swin-T) mask AP 39.7 #13 of 17 Archive leaderboard report
Instance Segmentation Cityscapes val Mask2Former (ResNet-101) mask AP 38.5 #14 of 17 Archive leaderboard report
Instance Segmentation Cityscapes val Mask2Former (ResNet-50) mask AP 37.4 #15 of 17 Archive leaderboard report
Panoptic Segmentation ADE20K val Mask2Former (Swin-L) AP 34.2 #18 of 25 Archive leaderboard report
Panoptic Segmentation ADE20K val Mask2Former (Swin-L) PQ 48.1 #18 of 25 Archive leaderboard report
Panoptic Segmentation ADE20K val Mask2Former (Swin-L) mIoU 54.5 #18 of 25 Archive leaderboard report
Panoptic Segmentation ADE20K val Mask2Former (Swin-L + FAPN, 640x640) AP 33.2 #19 of 25 Archive leaderboard report
Panoptic Segmentation ADE20K val Mask2Former (Swin-L + FAPN, 640x640) PQ 46.2 #19 of 25 Archive leaderboard report
Panoptic Segmentation ADE20K val Mask2Former (Swin-L + FAPN, 640x640) mIoU 55.4 #19 of 25 Archive leaderboard report
Panoptic Segmentation ADE20K val Mask2Former (ResNet-50, 640x640) PQ 39.7 #22 of 25 Archive leaderboard report
Panoptic Segmentation ADE20K val Panoptic-DeepLab (SwideRNet) PQ 37.9 #23 of 25 Archive leaderboard report
Panoptic Segmentation ADE20K val Panoptic-DeepLab (SwideRNet) mIoU 50 #23 of 25 Archive leaderboard report
Panoptic Segmentation ADE20K val Mask2Former (ResNet-50, 640x640) AP 26.5 #25 of 25 Archive leaderboard report
Panoptic Segmentation ADE20K val Mask2Former (ResNet-50, 640x640) mIoU 46.1 #25 of 25 Archive leaderboard report
Panoptic Segmentation COCO minival Mask2Former (single-scale) AP 48.6 #18 of 31 Archive leaderboard report
Panoptic Segmentation COCO minival Mask2Former (single-scale) PQ 57.8 #18 of 31 Archive leaderboard report
Panoptic Segmentation COCO minival Mask2Former (single-scale) PQst 48.1 #18 of 31 Archive leaderboard report
Panoptic Segmentation COCO minival Mask2Former (single-scale) PQth 64.2 #18 of 31 Archive leaderboard report
Panoptic Segmentation COCO test-dev Mask2Former (Swin-L) PQ 58.3 #3 of 38 Archive leaderboard report
Panoptic Segmentation COCO test-dev Mask2Former (Swin-L) PQst 48.1 #3 of 38 Archive leaderboard report
Panoptic Segmentation COCO test-dev Mask2Former (Swin-L) PQth 65.1 #3 of 38 Archive leaderboard report
Panoptic Segmentation Cityscapes val Mask2Former (Swin-L) AP 43.6 #15 of 37 Archive leaderboard report
Panoptic Segmentation Cityscapes val Mask2Former (Swin-L) PQ 66.6 #15 of 37 Archive leaderboard report
Panoptic Segmentation Cityscapes val Mask2Former (Swin-L) mIoU 82.9 #15 of 37 Archive leaderboard report
Semantic Segmentation ADE20K Mask2Former (SwinL-FaPN) Validation mIoU 57.7 #27 of 235 Archive leaderboard report
Semantic Segmentation ADE20K Mask2Former (SwinL) Validation mIoU 57.3 #33 of 235 Archive leaderboard report
Semantic Segmentation ADE20K Mask2Former (Swin-L-FaPN) Validation mIoU 56.4 #40 of 235 Archive leaderboard report
Semantic Segmentation ADE20K Mask2Former(Swin-B) Validation mIoU 55.1 #50 of 235 Archive leaderboard report
Semantic Segmentation ADE20K val Mask2Former (Swin-L-FaPN, multiscale) mIoU 57.7 #18 of 95 Archive leaderboard report
Semantic Segmentation ADE20K val Mask2Former (Swin-L-FaPN) mIoU 56.4 #25 of 95 Archive leaderboard report
Semantic Segmentation COCO (Common Objects in Context) Mask2Former (Swin-L, single-scale) mIoU 67.4 #7 of 9 Archive leaderboard report
Semantic Segmentation COCO (Common Objects in Context) MaskFormer (Swin-L, single-scale) mIoU 64.8 #8 of 9 Archive leaderboard report
Semantic Segmentation Cityscapes val Mask2Former (Swin-L) mIoU 84.3 #19 of 99 Archive leaderboard report
Semantic Segmentation Fine-Grained Grass Segmentation Dataset Mask2Former mIoU 44.93 #10 of 10 Archive leaderboard report
Semantic Segmentation Mapillary val Mask2Former (Swin-L, multiscale) mIoU 64.7 #3 of 8 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.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

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