eomt / README.md
Flor's picture
fastforks 0.1.0
2e380cf
|
Raw History Blame Contribute Delete
7.03 kB
---
library_name: "fastforks"
pipeline_tag: "image-segmentation"
license: "other"
license_name: "mixed-see-variant-table"
license_link: "https://huggingface.co/tue-mps/ade20k_semantic_eomt_large_512/blob/aeb262f5a0bc609236d27f1277c3173ce57aeb27/README.md"
tags:
- "segmentation"
- "semantic-segmentation"
- "cuda"
- "pytorch"
- "fastforks"
---
# EoMT (fastforks)
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.
This repo is the model card only: it holds no weights. fastforks downloads the authors' weights from the links below and checks them against the SHA-256 in the model card. Code: <https://github.com/kleinicke/fastforks>. Kernels for the `kernels` backend: <https://huggingface.co/fastforks/kernels>. Original code: <https://github.com/huggingface/transformers> at `c4c4605f9618`.
Author weight repos: <https://huggingface.co/tue-mps/ade20k_semantic_eomt_large_512>, <https://huggingface.co/tue-mps/eomt-dinov3-ade-semantic-large-512>.
Task: segmentation. Tier: stable. Outputs: `logits`. Backends: `portable`, `kernels`.
Input: one RGB image. Output: per-pixel class labels (logits with `logits=True`).
## Variants
Weights are the authors' files (not hosted here). SHA-256 shortened to 12 hex digits; the full hashes are in [`card.toml`](https://github.com/kleinicke/fastforks/blob/main/src/fastforks/segmentation/models/eomt/card.toml).
| variant | weights (author link) | SHA-256 | weights licence | commercial use |
|---|---|---|---|---|
| `eomt-l-dinov2-ade20k@1` | [eomt-l-dinov2-ade20k.config.json](https://huggingface.co/tue-mps/ade20k_semantic_eomt_large_512/resolve/aeb262f5a0bc609236d27f1277c3173ce57aeb27/config.json)<br>[eomt-l-dinov2-ade20k.safetensors](https://huggingface.co/tue-mps/ade20k_semantic_eomt_large_512/resolve/aeb262f5a0bc609236d27f1277c3173ce57aeb27/model.safetensors) | `5b11b6c2cc74`<br>`715f374b2bc9` | MIT | yes |
| `eomt-l-dinov3-ade20k@1` | [eomt-l-dinov3-ade20k.config.json](https://huggingface.co/tue-mps/eomt-dinov3-ade-semantic-large-512/resolve/1d1f172700ab69371df7afe778fe133fff7dd521/config.json)<br>[eomt-l-dinov3-ade20k.safetensors](https://huggingface.co/tue-mps/eomt-dinov3-ade-semantic-large-512/resolve/1d1f172700ab69371df7afe778fe133fff7dd521/model.safetensors) | `a06117034714`<br>`319c72ee001f` | MIT AND LicenseRef-DINOv3-License | yes |
## Licence
Original-code strings, recorded as they are (research-use package; check them before any other use). Code: Apache-2.0. Files: .
Training data: LVD-142M (DINOv2's curated web-image set, not released), ADE20K (SceneParsing, 150 classes).
- 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.
Licence evidence: <https://huggingface.co/tue-mps/ade20k_semantic_eomt_large_512/blob/aeb262f5a0bc609236d27f1277c3173ce57aeb27/README.md>
## 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)
## Speed and memory
### Segmentation, synthetic, 1024x2048
| model | time (ms): original fp32 | original | portable | kernels | kernels speed-up: vs original | vs portable | peak memory (MiB, allocated / reserved): original | portable | kernels |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| `eomt-l-dinov2-ade20k` | 178 | 63.7 | 50.8 | 35.0 | 1.8x | 1.5x | 3827 / 4086 | 1515 / 1584 | 1515 / 1584 |
| `eomt-l-dinov3-ade20k` | 186 | 72.1 | 54.6 | 38.8 | 1.9x | 1.4x | 3822 / 4086 | 1514 / 1584 | 1514 / 1584 |
### Startup and first call
| model | load (s): original | portable | kernels | first call (s): original | portable | kernels |
| --- | --- | --- | --- | --- | --- | --- |
| `eomt-l-dinov2-ade20k` | 4.80 (512x512) | 3.13 | 3.27† | 0.54 (512x512) | 0.05 | 0.04† |
| `eomt-l-dinov3-ade20k` | 1.83 (512x512) | 3.20 | 3.24† | 0.07 (512x512) | 0.08 | 0.04† |
### torch.compile and TensorRT
| model | input | portable ms | compile ms | compile s (cold) | TensorRT fp16 ms | ONNX + build s | kernels ms | peak MiB (alloc / reserved): portable | compile | TensorRT (device) |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| `eomt-l-dinov2-ade20k` | 1024x2048 | 50.8 | 50.8 | 0.3 | 54.3 | 53 | 35.0 | 1515 / 1584 | 1512 / 1604 | 1798 |
### Fixed-size speed and peak memory, all models
| model | mode | 480x640 | 720x1280 | 1080x1920 | 12 MP 3000x4000 |
| --- | --- | --- | --- | --- | --- |
| `eomt-l-dinov2-ade20k` | portable | 50.3 ms / 1917 / 2484 | 55.4 ms / 2412 / 3506 | 63.2 ms / 3417 / 4834 | 129.2 ms / 14890 / 15016 |
| `eomt-l-dinov2-ade20k` | kernels | 38.5 ms / 1917 / 2484 | 43.8 ms / 2412 / 3506 | 51.5 ms / 3417 / 4834 | 117.4 ms / 14890 / 15016 |
| `eomt-l-dinov3-ade20k` | portable | 54.2 ms / 1916 / 2486 | 59.2 ms / 2411 / 3502 | 67.0 ms / 3415 / 4836 | 133.1 ms / 14889 / 15016 |
| `eomt-l-dinov3-ade20k` | kernels | 42.5 ms / 1916 / 2486 | 47.7 ms / 2411 / 3502 | 55.3 ms / 3415 / 4836 | 121.2 ms / 14889 / 15016 |
Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).
Hardware, protocol and caveats: [benchmarks](https://github.com/kleinicke/fastforks/blob/main/docs/benchmarks.md) (RTX 5060 Ti 16 GB, sm_120). Original = the authors' code at the precision of portable (fp16, or `(fp32)` where fp16 is unsupported or not finite); original fp32 = its default fp32 run. Peak memory is the torch allocator's.
## Accuracy
### Parity with the original code
Every variant is checked against reference outputs of the original code at its pinned commit. 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`).
## Usage
```python
from fastforks import segmentation
model = segmentation.load("eomt-l-dinov2-ade20k") # mode="auto": the preferred backend from recorded measurements
result = model("photo.jpg")
result.labels # [H, W] per-pixel class index
result.backend # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16')
```
Install with `pip install fastforks` (see <https://github.com/kleinicke/fastforks>). Other variants: `eomt-l-dinov2-ade20k`, `eomt-l-dinov3-ade20k`.
## Kernels backend
`segmentation.load("eomt-l-dinov2-ade20k", mode="kernels")` runs our CUDA kernels (`fastbb`, `seg_up`). It needs a prebuilt kernel for your GPU architecture (downloaded from <https://huggingface.co/fastforks/kernels> on first use) and a recent NVIDIA driver; if there is none it raises `BackendUnavailableError` with the reason and never falls back silently. `mode="auto"` picks `kernels` when it can run and logs the choice.
<!-- staged from fastforks feccac41 (2026-11-06) -->