Skip to content
ModelsThatRun

EoMT

Encoder-only Mask Transformer: a plain DINOv2 ViT-L that segments with a few extra queries, COCO's 80 classes, MIT.

Size

Commercial use OK for size large-640: code MIT, weights MIT. Measured on our RTX 4090: 44.7 ms median, 6.4 GiB VRAM peak. We scored it 44.8 mask AP on COCO val2017. safetensors weights, 1.18 GB.

License

Commercial use OK

Code
MITchecked 26 Oct 2026
Weights
MITall sizes, checked 26 Oct 2026

On our RTX 4090, measured

44.7ms median

p90 46.5 ms, fp16, batch 1, 640x640

VRAM peak
6.4 GiB
Status
Runs as is
Environment, 27 Oct 2026

NVIDIA GeForce RTX 4090, driver 580.173.02, CUDA 13.0, torch 2.14.1+cu130, Python 3.12.9, transformers==5.20.2. Baseline 848 MiB. 10 warm-up + 100 timed. Scope: predict(): pre-processing, forward pass and post-processing; input file decoded beforehand.

Accuracy

44.8mask APmeasured

COCO val2017, mask AP, 5,000 images, fp16, pycocotools==2.0.11 · 26 Oct 2026

Paper 45.2 COCO mAP (mask)model_zoo/dinov2.md, COCO instance segmentation table (pycocotools)

Weights

safetensors

Size
1.18 GB
sha256
e8fa9bee24c6…cc6115
Download large-640 weights

Same photos and one score threshold for every model of this task. Failures are marked.

Sizes

SizeLatencyVRAMAccuracyWeightsRunsLicense
large-64044.7 ms640x6406.4 GiB44.8 mask AP, measured45.2 COCO mAP (mask) paper1.18 GBAs isCommercial OK
large-1280111 ms1280x12808.0 GiB48.7 mask AP, measured48.8 COCO mAP (mask) paper1.20 GBAs isCommercial OK

From the authors

In their words, with their numbers. Ours are in the cards at the top of this page.

Paper

Your ViT is Secretly an Image Segmentation Model

Tommie Kerssies, Niccolò Cavagnero, Alexander Hermans, Narges Norouzi, Giuseppe Averta, Bastian Leibe and 2 others

arXiv 2503.19108, 24 Mar 2025

Abstract

Vision Transformers (ViTs) have shown remarkable performance and scalability across various computer vision tasks. To apply single-scale ViTs to image segmentation, existing methods adopt a convolutional adapter to generate multi-scale features, a pixel decoder to fuse these features, and a Transformer decoder that uses the fused features to make predictions. In this paper, we show that the inductive biases introduced by these task-specific components can instead be learned by the ViT itself, given sufficiently large models and extensive pre-training. Based on these findings, we introduce the Encoder-only Mask Transformer (EoMT), which repurposes the plain ViT architecture to conduct image segmentation. With large-scale models and pre-training, EoMT obtains a segmentation accuracy similar to state-of-the-art models that use task-specific components. At the same time, EoMT is significantly faster than these methods due to its architectural simplicity, e.g., up to 4x faster with ViT-L. Across a range of model sizes, EoMT demonstrates an optimal balance between segmentation accuracy and prediction speed, suggesting that compute resources are better spent on scaling the ViT itself rather than adding architectural complexity. Code: https://www.tue-mps.org/eomt/.

README

Copied from the authors' repository at commit aa017c3 on 3 Nov 2026. Numbers and license claims in it are theirs, not measured or checked by us. We removed badges, replaced images with links and adjusted headings.

CVPR 2025 ✨ Highlight · 📄 Paper

Tommie Kerssies1, Niccolò Cavagnero2,*, Alexander Hermans3, Narges Norouzi1, Giuseppe Averta2, Bastian Leibe3, Gijs Dubbelman1, Daan de Geus1,3

¹ Eindhoven University of Technology
² Polytechnic of Turin
³ RWTH Aachen University
* Work done while visiting RWTH Aachen University

Overview

We present the Encoder-only Mask Transformer (EoMT), a minimalist image segmentation model that repurposes a plain Vision Transformer (ViT) to jointly encode image patches and segmentation queries as tokens. No adapters. No decoders. Just the ViT.

Leveraging large-scale pre-trained ViTs, EoMT achieves accuracy similar to state-of-the-art methods that rely on complex, task-specific components. At the same time, it is significantly faster thanks to its simplicity, for example up to 4× faster with ViT-L.

Turns out, your ViT is secretly an image segmentation model. EoMT shows that architectural complexity isn't necessary. For segmentation, a plain Transformer is all you need.

🚀 NEW: PMT

Presenting our latest model, PMT: Plain Mask Transformer for Image and Video Segmentation with Frozen Vision Encoders.

PMT reconciles EoMT minimal philosophy with the need of preserving the features of frozen Foundation Models, by mimicking the last layers of EoMT and VidEoMT with a simple and fast decoder.

Take a look!

🚀 NEW: VidEoMT

🔥 We're pleased to present our latest CVPR 2026 paper, VidEoMT: Your ViT is Secretly Also a Video Segmentation Model.

VidEoMT extends EoMT philosophy to the temporal domain, introducing an encoder-only video segmentation model that is up to 10x faster than competitors.

Go check it out!

🚀 NEW: DINOv3 Support

🔥 We're excited to announce support for DINOv3 backbones! Our new DINOv3-based EoMT models deliver improved performance across all segmentation tasks:

  • Panoptic Segmentation: Up to 58.9 PQ on COCO with EoMT-L at 1280×1280
  • Instance Segmentation: Up to 49.9 mAP on COCO with EoMT-L at 1280×1280
  • Semantic Segmentation: Up to 59.5 mIoU on ADE20K with EoMT-L at 512×512

All of this, at the impressive speed of EoMT!

Check out our DINOv3 Model Zoo for all available EoMT configurations and performance benchmarks.

Thanks to the DINOv3 team for providing these powerful foundation models!

🤗 Transformers

EoMT with DINOv2 is also available on Hugging Face Transformers. See available models here.

Installation

If you don't have Conda installed, install Miniconda and restart your shell:

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh

Then create the environment, activate it, and install the dependencies:

conda create -n eomt python==3.13.2
conda activate eomt
python3 -m pip install -r requirements.txt

Weights & Biases (wandb) is used for experiment logging and visualization. To enable wandb, log in to your account:

wandb login

Data preparation

Download the datasets below depending on which datasets you plan to use.
You do not need to unzip any of the downloaded files.
Simply place them in a directory of your choice and provide that path via the --data.path argument.
The code will read the .zip files directly.

COCO

wget http://images.cocodataset.org/zips/train2017.zip
wget http://images.cocodataset.org/zips/val2017.zip
wget http://images.cocodataset.org/annotations/annotations_trainval2017.zip
wget http://images.cocodataset.org/annotations/panoptic_annotations_trainval2017.zip

ADE20K

wget http://data.csail.mit.edu/places/ADEchallenge/ADEChallengeData2016.zip
wget http://sceneparsing.csail.mit.edu/data/ChallengeData2017/annotations_instance.tar
tar -xf annotations_instance.tar
zip -r -0 annotations_instance.zip annotations_instance/
rm -rf annotations_instance.tar
rm -rf annotations_instance

Cityscapes

wget --keep-session-cookies --save-cookies=cookies.txt --post-data 'username=<your_username>&password=<your_password>&submit=Login' https://www.cityscapes-dataset.com/login/
wget --load-cookies cookies.txt --content-disposition https://www.cityscapes-dataset.com/file-handling/?packageID=1
wget --load-cookies cookies.txt --content-disposition https://www.cityscapes-dataset.com/file-handling/?packageID=3

🔧 Replace <your_username> and <your_password> with your actual Cityscapes login credentials.

Usage

Training

To train EoMT from scratch, run:

python3 main.py fit \
  -c configs/dinov2/coco/panoptic/eomt_large_640.yaml \
  --trainer.devices 4 \
  --data.batch_size 4 \
  --data.path /path/to/dataset

This command trains the EoMT-L model with a 640×640 input size on COCO panoptic segmentation using 4 GPUs. Each GPU processes a batch of 4 images, for a total batch size of 16. Switch to dinov3 in the configuration path to enable the corresponding DINOv3 model.

✅ Make sure the total batch size is devices × batch_size = 16
🔧 Replace /path/to/dataset with the directory containing the dataset zip files.

This configuration takes ~6 hours on 4×NVIDIA H100 GPUs, each using ~26GB VRAM.

To fine-tune a pre-trained EoMT model, add:

  --model.ckpt_path /path/to/pytorch_model.bin \
  --model.load_ckpt_class_head False

🔧 Replace /path/to/pytorch_model.bin with the path to the checkpoint to fine-tune.

--model.load_ckpt_class_head False skips loading the classification head when fine-tuning on a dataset with different classes.

DINOv3 Models: When using DINOv3-based configurations, the code expects delta weights relative to DINOv3 weights by default. To disable this behavior and use absolute weights instead, add --model.delta_weights False.

Evaluating

To evaluate a pre-trained EoMT model, run:

python3 main.py validate \
  -c configs/dinov2/coco/panoptic/eomt_large_640.yaml \
  --model.network.masked_attn_enabled False \
  --trainer.devices 4 \
  --data.batch_size 4 \
  --data.path /path/to/dataset \
  --model.ckpt_path /path/to/pytorch_model.bin

This command evaluates the same EoMT-L model using 4 GPUs with a batch size of 4 per GPU.

🔧 Replace /path/to/dataset with the directory containing the dataset zip files.
🔧 Replace /path/to/pytorch_model.bin with the path to the checkpoint to evaluate.

A notebook is available for quick inference and visualization with auto-downloaded pre-trained models.

DINOv3 Models: When using DINOv3-based configurations, the code expects delta weights relative to DINOv3 weights by default. To disable this behavior and use absolute weights instead, add --model.delta_weights False.

Model Zoo

We provide pre-trained weights for both DINOv2- and DINOv3-based EoMT models.

  • DINOv2 Models - Original published results and pre-trained weights.
  • DINOv3 Models - New DINOv3-based models and pre-trained weights.

Citation

If you find this work useful in your research, please cite it using the BibTeX entry below:

@inproceedings{kerssies2025eomt,
  author    = {Kerssies, Tommie and Cavagnero, Niccol\`{o} and Hermans, Alexander and Norouzi, Narges and Averta, Giuseppe and Leibe, Bastian and Dubbelman, Gijs and {de Geus}, Daan},
  title     = {{Your ViT is Secretly an Image Segmentation Model}},
  booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  year      = {2025},
}

Acknowledgements

This project builds upon code from the following libraries and repositories:

Alternatives

Model output
Input test photo
⇆
InputOutput