All models

hf_eomt_semantic_segmentation

A plain ViT that segments images by itself: learned queries join the tokens, and the decoders go.

Segmentation · 149 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

Loading diagram (31 KB)

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
1M
Operations
149
Framework
PyTorch
Recurrent
No
Published
Computer Vision and Pattern Recognition (arXiv 2025)
Cited by
90 (as of 5 October 2026)
Authors
Tommie Kerssies, Niccolò Cavagnero, Alexander Hermans and others
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
m11907
Graph hash
43cbb904202aaba2d9f5ee66ae6dff51c298b3a505ba425ce8a259c7b65e4870
Skeleton hash
03f1486cb7640a7c3412a0769b84395792dec2f8e356ea82ce334a9eaeae4988
Architecture hash
55dea018a3cd6c3b9b0b9a1aabc73bc06605b67cad72ef607520f203d6d95b29
Diagram SHA-256
66d57614bf0f4dbf5122bfc77e2a111f14f0a8d95dea4017f885bd8a1ee188ad
TorchLens version
2.35.3
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

menagerie.classics.pidnet:build_pidnet_s: build({})

What it is

EoMT, the Encoder-only Mask Transformer, repurposes a plain Vision Transformer to do image segmentation without the convolutional adapter, pixel decoder and Transformer decoder that ViT segmentation models usually add. The paper's claim is that the inductive biases those task-specific components introduce can be learned by the ViT itself, given sufficiently large models and extensive pre-training. With large-scale models and pre-training, EoMT reaches segmentation accuracy similar to state-of-the-art models that use those components while being significantly faster, up to 4x faster with ViT-L.

The first L1 Transformer encoder blocks of the ViT are unchanged and only process the input image. After those blocks a set of K learnable queries is concatenated to the patch tokens, and the remaining L2 encoder blocks process queries and patches together. Query-to-query self-attention and query-to-patch cross-attention, which a Mask Transformer decoder runs as separate steps, thus happen jointly inside one ordinary self-attention layer. A small mask module then passes each query token through a linear layer for class logits and through a three-layer MLP whose output is dotted with the upscaled image features F4 to give mask logits.

During training, masked attention survives in Mask2Former's manner: the mask module also runs before each of the last L2 blocks to predict intermediate masks, which then restrict each query's attention to the region it has predicted. A mask annealing schedule then phases this out: the masking probability starts at 1.0 and decays block by block to 0.0 over training, so inference needs no masked attention at all. The reference setup uses DINOv2-L with a 640 by 640 input and 16 by 16 patches, with L2 set to 4 for ViT-L; the member traced here is the Transformers port at that 640 pixel image size.

Key idea. Showing that a large, well pre-trained plain ViT can segment images by itself, with only a few extra learned queries and a small mask prediction module, once masked attention is annealed away.

  • eomt
  • encoder-only mask transformer
  • your vit is secretly an image segmentation model
  • vit segmentation
  • panoptic segmentation
  • semantic segmentation
  • instance segmentation
  • dinov2
  • mask2former
  • kerssies
  • de geus

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

Cite the paper

@misc{kerssies2025vitsecretlyimagesegmentation,
      title={Your ViT is Secretly an Image Segmentation Model}, 
      author={Tommie Kerssies and Niccolò Cavagnero and Alexander Hermans and Narges Norouzi and Giuseppe Averta and Bastian Leibe and Gijs Dubbelman and Daan de Geus},
      year={2025},
      eprint={2503.19108},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2503.19108}, 
}