All models

Mask2Former_SwinSmall_universal

One mask transformer for panoptic, instance and semantic segmentation, built on masked attention.

Segmentation · 3,204 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

This diagram has 3,204 operations (18 KB) and is drawn when you ask.

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
68.7M
Operations
3,204
Framework
PyTorch
Recurrent
No
Published
2022
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m1709
Graph hash
0976057a6758646ba858d13b1dfc9bc517441eb9786fc9ea0ae0993c9283a75c
Skeleton hash
bd288c858cafa94d4cf9fb69e51560cb1073e2e410196397c08aaf6fa42dd402
Architecture hash
6ed653609bd9a2b33d92d353bc6dc7bd18fc582294a04df6e69a7f9ff219f8f8
Diagram SHA-256
17d8431f12e713eda30582ae59b171de4c4bfbf1a6eb8355e5a559dda4d9ed52
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

transformers.AutoModel.from_config()

What it is

Built from the bare Mask2FormerModel class, which the library documents separately from Mask2FormerForUniversalSegmentation.

About this model's family

Mask2Former, the Masked-attention Mask Transformer, is a single architecture for any image segmentation task, whether panoptic, instance or semantic. It was proposed by Bowen Cheng, Ishan Misra, Alexander G. Schwing, Alexander Kirillov and Rohit Girdhar, and brings significant performance and efficiency improvements over MaskFormer. The key component is masked attention, which extracts localized features by constraining cross-attention within predicted mask regions.

Beyond cutting research effort by at least three times, it outperforms the best specialized architectures by a significant margin on four popular datasets. The reported marks are 57.8 PQ for panoptic segmentation on COCO, 50.1 AP for instance segmentation on COCO and 57.7 mIoU for semantic segmentation on ADE20K. In the transformers port, all three tasks are solved from the same Mask2FormerForUniversalSegmentation output, with task-specific post-processing.

Key idea. Masked attention, which constrains cross-attention to predicted mask regions, letting one mask-transformer architecture address panoptic, instance and semantic segmentation.

  • mask2former
  • masked-attention mask transformer
  • universal segmentation
  • panoptic segmentation
  • instance segmentation
  • semantic segmentation
  • maskformer successor
  • mask2former swin
  • mask2former resnet50

AI-written summary, based on the model's documentation and checked automatically against it; not reviewed by a person. Corrections welcome.