Papers / Vision
Mask2Former (2021)
Masked-attention Mask Transformer for Universal Image Segmentation
Unified semantic, instance and panoptic segmentation into one mask-predicting Transformer with masked cross-attention.
Why it matters
For a decade, semantic segmentation (labeling stuff like sky and road) and instance segmentation (separating individual cars and people) used different heads, losses and toolboxes. Mask2Former proved that mask classification with a Transformer can handle every segmentation task at once without giving up state-of-the-art accuracy.
- Year
- 2021
- Authors
- Bowen Cheng, Ishan Misra, Alexander G. Schwing, Alexander Kirillov, Rohit Girdhar
- Venue
- CVPR 2022
- Data
- ADE20K, Cityscapes, MS COCO
The idea
Instead of classifying every pixel independently, predict a fixed set of binary masks and class labels from learned object queries—just as DETR predicts boxes. Inside the Transformer decoder, restrict each query's cross-attention to the foreground region predicted by the previous layer (masked attention) and feed multi-scale feature maps round-robin so small objects stay sharp.
The result
57.7% mIoU on ADE20K semantic segmentation, 50.1 AP on COCO instance segmentation, and 57.8 PQ on COCO panoptic segmentation with a Swin-L backbone—beating specialized models on all three tasks with one architecture.
The data
ADE20K
201727,000 scenes where every object, and often its parts, is outlined and named. (4 years earlier)




Cityscapes
20165,000 street photos from 50 cities, every pixel labeled as road, car, person, sky and so on. (5 years earlier)




MS COCO
2014330k everyday scenes with 1.5M labeled objects in 80 categories. (7 years earlier)




Builds on
- DETR (2020): Framed object detection as direct set prediction with a Transformer, dropping anchors and non-maximum suppression.
- Mask R-CNN (2017): Added a small parallel branch to Faster R-CNN that predicts a pixel mask for every detected object.
- SegFormer (2021): Paired a hierarchical, position-free Vision Transformer encoder with a tiny all-MLP decoder.
