Models · Semantic segmentation

EoMT

EoMT: a plain vision transformer that also predicts masks, for ADE20K scene segmentation, with DINOv2 or DINOv3 pre-training.

stable Fork of huggingface/transformers@c4c4605 · backends: portable, kernels

  • Paper Your ViT is Secretly an Image Segmentation Model CVPR 2025 · first released 24 Mar 2025
  • Authors’ code tue-mps/eomt (PyTorch), not the code forked here: Hugging Face transformers ships an EoMT port that loads the authors' checkpoints (incl. DINOv3) without the authors' Lightning/detectron2 stack.
Checkpoint

Paper 2025 Added in 0.1.0 Evaluated with 0.2.0

Kernels, RTX 5060 Ti 16 GB 35.0 ms 1024x2048, fp16
vs the faster original 1.8× original fp16: 63.7 ms
Peak memory 1,515 MiB original: 3,827 MiB
Accuracy vs original fp32 +0.06 kernels mIoU %, ADE20K val (57.31 original)

Use it

pip install fastforks

Lean install with only what this model needs: pip install "fastforks-core[transformers]"

from fastforks import segmentation

model = segmentation.load("eomt-l-dinov2-ade20k")  # kernels on a supported GPU, else portable PyTorch
result = model(image)
result.logits
result.backend  # what ran: mode, device, dtype, kernels
fastforks bench eomt-l-dinov2-ade20k

Times the model on this machine. load(…, mode="portable") or mode="kernels" picks a backend; usage guide.

Speed and memory

Every backend on one GPU (RTX 5060 Ti 16 GB) and the same input, the authors’ code included. Kernels runs fp16. Portable runs fp16 on CUDA.

BackenddtypeTime per call (ms)vs original fp16Peak memory
allocated / reserved
Load (s)First call (s)
Original fp32fp32 1780.36×3,376 MiB/3,526 MiB––
Original fp16torch.autocast(fp16) around the forwardfp16 63.7–3,827 MiB/4,086 MiB––
Portable fp32fp32not measured ––––
Portablefp16 50.81.3×1,515 MiB/1,584 MiB3.10.05
Kernelsfp16 35.01.8×1,515 MiB/1,584 MiB3.30.04
Portable + torch.compile 49.41.3×1,585 MiB/1,624 MiB17 (build)–
TensorRT fp16fp16 54.31.2×1,798 MiBenginenot comparable53 (build)–

Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-03 to 2026-11-04. First call, 3 warm-up, peak reset, median of 3 rounds x median of 5 (tools/speed_check.py), synthetic CUDA input (bench_inputs); peak = max over the first call and the timed calls. Ratios divide two times of this table (same GPU, same input). Original fp16 is the authors’ own precision option, else torch.autocast. torch.compile and TensorRT: build time instead of load time. TensorRT memory (engine, not comparable) is the GPU memory the engine took, read from the driver because TensorRT allocates outside PyTorch, so it can't be compared with the PyTorch peaks of the other rows.

Other devices

DeviceBackenddtypems / callPeak memoryOutput vs referenceInput
Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-12Originalfp32733 7,112 MiB processmatches1024x2048
Portablefp16540 4,262 MiB processmatches1024x2048
Portablefp32608 6,308 MiB processmatches1024x2048
Kernelsfp16not implemented–1024x2048
NVIDIA L4 CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp1654.7 1,488 MiB/1,564 MiB–1024x2048
Kernelsfp1647.3 1,488 MiB/1,564 MiB–1024x2048
NVIDIA L40S CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp1616.3 1,488 MiB/1,564 MiB–1024x2048
Kernelsfp1613.9 1,488 MiB/1,564 MiB–1024x2048
NVIDIA A10 CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp1639.5 1,488 MiB/1,564 MiB–1024x2048
Kernelsfp1638.3 1,488 MiB/1,564 MiB–1024x2048
NVIDIA A100-SXM4-40GB CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp1617.0 1,488 MiB/1,564 MiB–1024x2048
Kernelsfp1615.0 1,488 MiB/1,564 MiB–1024x2048
NVIDIA RTX PRO 6000 CUDA, torch 2.14.1+cu130, 2026-11-08Portablefp169.87 1,512 MiB/1,604 MiB–1024x2048
Kernelsfp168.51 1,512 MiB/1,604 MiB–1024x2048

CUDA memory is torch’s peak allocated / reserved; Apple has no such counter, so the Mac rows show the process footprint (weights, Python and torch included). “Output vs reference” compares the device’s output with the stored golden output under the card’s tolerance; – = not checked on that device. Kernels “not implemented” = no kernels for this model on that backend yet: it runs portable there.

Licence and weights

Commercial use allowed

Code
Apache-2.0
Weights
MIT source
Training data
  • The eomt-l-dinov3-ade20k checkpoint is fine-tuned from DINOv3, so it also carries the DINOv3 License (redistribution must include its text); that licence does not exclude commercial use.

Our reading of the licences, not legal advice.

Weights

eomt-l-dinov2-ade20k.config.json 6.8 KB· hosted on Hugging Face
eomt-l-dinov2-ade20k.safetensors 1.3 GB· hosted on Hugging Face

fastforks downloads and checks these files on first use (fastforks download eomt-l-dinov2-ade20k).

Accuracy

The test set through the authors’ code and through ours: same checkpoint, same protocol. The distance between the original’s fp32 and fp16 runs is what half precision alone costs; our runs should stay within it.

ADE20K val

every 4th image, mIoU / aAcc %

RundtypemIoU % ↑aAcc % ↑Δ mIoU % vs fp32 originalimagesms / image
Original fp32fp3257.3186.44 reference 500 159
Original fp16fp1657.3186.44 ±0.00 500 55.6
Portable fp32fp3257.3186.44 ±0.00 500 158
Portablefp1657.3486.44 +0.03 500 42.3
Kernelsfp1657.3786.43 +0.06 500 31.9

Each image at its own size, argmax of the logits. Original = the authors’ code, same checkpoint and protocol. Measured on original fp32, original fp16: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-06; portable fp32: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 44640884, 2026-11-17; portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06.

Closeness to the original

Beyond the test-set scores: the raw output of ours against the original’s fp32 output on the same input, pixel by pixel. CPU, float32: max |diff| <= 0.002 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.0002 and p99 <= 0.003 (absolute error of the output logits).

CheckToleranceMeasured
CPU fp32, max |diff|≤ 0.002 not recorded
GPU default dtypes, mean |diff|≤ 0.0002 0.00002
GPU default dtypes, p99 |diff|≤ 0.003 0.00033

Recorded for eomt-l-dinov2-ade20k on RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-04, with these kernels: fastbbseg_up

Details

EoMT (Kerssies et al. 2025): encoder-only mask transformer, a plain ViT-L/16 whose last blocks also carry the mask queries; DINOv2 or DINOv3 pre-training, semantic ADE20K checkpoints.

Input / output
Input: one RGB image. Output: per-pixel class labels (logits with logits=True).
Input size
any H x W >= 1, resized or padded inside the model; tested up to 3000x4000 (14.5 GiB allocated)
Outputs
logits
Checkpoint
arch="EomtForUniversalSegmentation", res_scale=1
CUDA kernels
  • fastbbfast backbone kernels: flash attention, window attention, instance norm and rotary embeddings for ViT and similar backbones
  • seg_upfused resize and argmax of segmentation scores
Apple (MPS)
fp32, fp16
Full reference, generated from the repository

EoMT: a plain vision transformer that also predicts masks, for ADE20K scene segmentation, with DINOv2 or DINOv3 pre-training.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
eomt-l-dinov2-ade20ksynthetic (1024x2048)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
178
63.7
50.8
35.0
49.4
54.3
3376 / 3526
3827 / 4086
1515 / 1584
1515 / 1584
1585 / 1624
3475 / 3500
eomt-l-dinov3-ade20ksynthetic (1024x2048)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
186
72.1
54.6
38.8
50.0
61.9
3372 / 3528
3822 / 4086
1514 / 1584
1514 / 1584
1584 / 1624
3475 / 3522
Details
  • Original code: https://github.com/huggingface/transformers at c4c4605f9618
  • Code licence: Apache-2.0 (permissive); files:
  • Weights licence: MIT
    • eomt-l-dinov3-ade20k: MIT AND LicenseRef-DINOv3-License
  • Licence evidence: https://huggingface.co/tue-mps/ade20k_semantic_eomt_large_512/blob/aeb262f5a0bc609236d27f1277c3173ce57aeb27/README.md
  • Training data: LVD-142M (DINOv2's curated web-image set, not released), ADE20K (SceneParsing, 150 classes)
    • eomt-l-dinov3-ade20k: ADE20K (SceneParsing, 150 classes) (fine-tuned from Meta's DINOv3 ViT-L/16 (pre-trained on LVD-1689M, not in datasets.toml; the DINOv3 weights are under the DINOv3 License); the EoMT model card says MIT)
  • Licence note: The eomt-l-dinov3-ade20k checkpoint is fine-tuned from DINOv3, so it also carries the DINOv3 License (redistribution must include its text); that licence does not exclude commercial use.
  • Kernel libraries: fastbb, seg_up
  • Variants: eomt-l-dinov2-ade20k, eomt-l-dinov3-ade20k
  • Outputs: logits; label_set: ade20k-150
  • Input size: any H x W >= 1, resized or padded inside the model
  • Tested up to (portable, fp16, RTX 5060 Ti 16 GB): eomt-l-dinov2-ade20k 3000x4000 (14.5 GiB peak allocated, 14.7 reserved); eomt-l-dinov3-ade20k 3000x4000 (14.5 GiB peak allocated, 14.7 reserved)
  • eomt-l-dinov2-ade20k 1024x2048, first call: portable + torch.compile 17 s (cold Inductor cache), TensorRT fp16 53 s (ONNX + engine).
  • eomt-l-dinov3-ade20k 1024x2048, first call: portable + torch.compile 22 s (cold Inductor cache), TensorRT fp16 58 s (ONNX + engine).
  • eomt-l-dinov2-ade20k original 1024x2048: torch.autocast(fp16) around the forward
  • eomt-l-dinov3-ade20k original 1024x2048: torch.autocast(fp16) around the forward
  • eomt-l-dinov2-ade20k load / first call: original 4.8 s / 0.537 s (512x512), portable 3.13 s / 0.053 s, kernels 3.27† s / 0.036† s
  • eomt-l-dinov3-ade20k load / first call: original 1.83 s / 0.065 s (512x512), portable 3.2 s / 0.078 s, kernels 3.24† s / 0.039† s
  • † measured in the speed sweep after the portable load (or an earlier size) in the same process: file cache and kernels are warm, so the time is lower than a fresh start.
  • Protocol, first call, 3 warm-up, peak reset, median of 3 rounds x median of 5 (tools/speed_check.py), synthetic CUDA input (bench_inputs); peak = max over the first call and the timed calls

Measured

Each image at its own size, argmax of the logits. Original = the original code named under Details, same checkpoint and protocol.

variantdatasetoriginal fp32original fp16portableportable fp32kernelsnote
eomt-l-dinov2-ade20kADE20K val, every 4th image, mIoU / aAcc %57.31 / 86.4457.31 / 86.4457.34 / 86.4457.31 / 86.4457.37 / 86.43
eomt-l-dinov3-ade20kADE20K val, every 4th image, mIoU / aAcc %57.62 / 86.6057.62 / 86.6057.62 / 86.6057.62 / 86.6057.60 / 86.59

Measured on portable: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06; portable32: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 44640884, 2026-11-17; kernels: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06.

Parity

CPU, float32: max |diff| <= 0.002 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.0002 and p99 <= 0.003 (absolute error of the output logits).

variantkernels error vs original, mean / p99GPU, torchkernels used
eomt-l-dinov2-ade20k2e-05 / 0.00033RTX 5060 Ti, torch 2.14.1+cu130fastbb@7d058322634d:sm_120, seg_up@3e44e71200cd:sm_120
eomt-l-dinov3-ade20k1e-05 / 0.00037RTX 5060 Ti, torch 2.14.1+cu130fastbb@7d058322634d:sm_120, seg_up@3e44e71200cd:sm_120

Example output

One fixed input through this checkpoint, the same for every model of the task (kernels · float16 · NVIDIA GeForce RTX 5060 Ti).

Input
Output
  • table 57%
  • plate 30%
  • wall 9.1%
  • floor 3.4%
  • glass <0.1%
A cup of coffee, input
Input · 100%

Input: A cup of coffee, Rachel Michetti (CC0).