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.
Paper 2025 Added in 0.1.0 Evaluated with 0.2.0
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.
| Backend | dtype | Time per call (ms) | vs original fp16 | Peak memory allocated / reserved | Load (s) | First call (s) |
|---|---|---|---|---|---|---|
| Original fp32 | fp32 | 178 | 0.36× | 3,376 MiB/3,526 MiB | – | – |
| Original fp16torch.autocast(fp16) around the forward | fp16 | 63.7 | – | 3,827 MiB/4,086 MiB | – | – |
| Portable fp32 | fp32 | not measured | – | – | – | – |
| Portable | fp16 | 50.8 | 1.3× | 1,515 MiB/1,584 MiB | 3.1 | 0.05 |
| Kernels | fp16 | 35.0 | 1.8× | 1,515 MiB/1,584 MiB | 3.3 | 0.04 |
| Portable + torch.compile | 49.4 | 1.3× | 1,585 MiB/1,624 MiB | 17 (build) | – | |
| TensorRT fp16 | fp16 | 54.3 | 1.2× | 1,798 MiBenginenot comparable | 53 (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
| Device | Backend | dtype | ms / call | Peak memory | Output vs reference | Input |
|---|---|---|---|---|---|---|
| Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-12 | Original | fp32 | 733 | 7,112 MiB process | matches | 1024x2048 |
| Portable | fp16 | 540 | 4,262 MiB process | matches | 1024x2048 | |
| Portable | fp32 | 608 | 6,308 MiB process | matches | 1024x2048 | |
| Kernels | fp16 | not implemented | – | 1024x2048 | ||
| NVIDIA L4 CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 54.7 | 1,488 MiB/1,564 MiB | – | 1024x2048 |
| Kernels | fp16 | 47.3 | 1,488 MiB/1,564 MiB | – | 1024x2048 | |
| NVIDIA L40S CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 16.3 | 1,488 MiB/1,564 MiB | – | 1024x2048 |
| Kernels | fp16 | 13.9 | 1,488 MiB/1,564 MiB | – | 1024x2048 | |
| NVIDIA A10 CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 39.5 | 1,488 MiB/1,564 MiB | – | 1024x2048 |
| Kernels | fp16 | 38.3 | 1,488 MiB/1,564 MiB | – | 1024x2048 | |
| NVIDIA A100-SXM4-40GB CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 17.0 | 1,488 MiB/1,564 MiB | – | 1024x2048 |
| Kernels | fp16 | 15.0 | 1,488 MiB/1,564 MiB | – | 1024x2048 | |
| NVIDIA RTX PRO 6000 CUDA, torch 2.14.1+cu130, 2026-11-08 | Portable | fp16 | 9.87 | 1,512 MiB/1,604 MiB | – | 1024x2048 |
| Kernels | fp16 | 8.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
-
- LVD-142M (DINOv2's curated web-image set, not released) not stated
- ADE20K (SceneParsing, 150 classes) noncommercial, non-commercial
- 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.
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 %
| Run | dtype | mIoU % ↑ | aAcc % ↑ | Δ mIoU % vs fp32 original | images | ms / image |
|---|---|---|---|---|---|---|
| Original fp32 | fp32 | 57.31 | 86.44 | reference | 500 | 159 |
| Original fp16 | fp16 | 57.31 | 86.44 | ±0.00 | 500 | 55.6 |
| Portable fp32 | fp32 | 57.31 | 86.44 | ±0.00 | 500 | 158 |
| Portable | fp16 | 57.34 | 86.44 | +0.03 | 500 | 42.3 |
| Kernels | fp16 | 57.37 | 86.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).
| Check | Tolerance | Measured |
|---|---|---|
| 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 backbonesseg_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.
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
eomt-l-dinov2-ade20k | synthetic (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-ade20k | synthetic (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-ade20k3000x4000 (14.5 GiB peak allocated, 14.7 reserved);eomt-l-dinov3-ade20k3000x4000 (14.5 GiB peak allocated, 14.7 reserved) eomt-l-dinov2-ade20k1024x2048, first call: portable + torch.compile 17 s (cold Inductor cache), TensorRT fp16 53 s (ONNX + engine).eomt-l-dinov3-ade20k1024x2048, first call: portable + torch.compile 22 s (cold Inductor cache), TensorRT fp16 58 s (ONNX + engine).eomt-l-dinov2-ade20koriginal 1024x2048: torch.autocast(fp16) around the forwardeomt-l-dinov3-ade20koriginal 1024x2048: torch.autocast(fp16) around the forwardeomt-l-dinov2-ade20kload / first call: original 4.8 s / 0.537 s (512x512), portable 3.13 s / 0.053 s, kernels 3.27† s / 0.036† seomt-l-dinov3-ade20kload / 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.
| variant | dataset | original fp32 | original fp16 | portable | portable fp32 | kernels | note |
|---|---|---|---|---|---|---|---|
eomt-l-dinov2-ade20k | ADE20K val, every 4th image, mIoU / aAcc % | 57.31 / 86.44 | 57.31 / 86.44 | 57.34 / 86.44 | 57.31 / 86.44 | 57.37 / 86.43 | |
eomt-l-dinov3-ade20k | ADE20K val, every 4th image, mIoU / aAcc % | 57.62 / 86.60 | 57.62 / 86.60 | 57.62 / 86.60 | 57.62 / 86.60 | 57.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).
| variant | kernels error vs original, mean / p99 | GPU, torch | kernels used |
|---|---|---|---|
eomt-l-dinov2-ade20k | 2e-05 / 0.00033 | RTX 5060 Ti, torch 2.14.1+cu130 | fastbb@7d058322634d:sm_120, seg_up@3e44e71200cd:sm_120 |
eomt-l-dinov3-ade20k | 1e-05 / 0.00037 | RTX 5060 Ti, torch 2.14.1+cu130 | fastbb@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).
- table 57%
- plate 30%
- wall 9.1%
- floor 3.4%
- glass <0.1%
Input: A cup of coffee, Rachel Michetti (CC0).