Views
No views yet
Key Insight: Given sufficient scale and pretraining, a plain ViT along with a few additional parameters can perform segmentation without the need for task-specific decoders or pixel fusion modules. The same model backbone supports semantic, instance, and panoptic segmentation with different post-processing.
1import requests
2import torch
3from PIL import Image
4
5from transformers import AutoImageProcessor, EomtDinov3ForUniversalSegmentation
6
7model_id = "nielsr/eomt-dinov3-coco-panoptic-large-640"
8processor = AutoImageProcessor.from_pretrained(model_id)
9model = EomtDinov3ForUniversalSegmentation.from_pretrained(model_id)
10device = "cuda" if torch.cuda.is_available() else "cpu"
11model = model.to(device)
12
13url = "http://images.cocodataset.org/val2017/000000039769.jpg"
14image = Image.open(requests.get(url, stream=True).raw)
15
16inputs = processor(images=image, return_tensors="pt").to(device)
17
18with torch.inference_mode():
19 outputs = model(**inputs)
20
21# Panoptic Segmentation
22result = processor.post_process_panoptic_segmentation(outputs, target_sizes=[image.size[::-1]])[0]
23print(result["segmentation"].shape) # Segmentation map
24print(result["segments_info"]) # List of detected segments with labels| Property | Value |
|---|---|
| Backbone | DINOv3 ViT-L/16 |
| Input Resolution | 640×640 |
| Task | Panoptic Segmentation |
| Dataset | COCO |
1@inproceedings{kerssies2025eomt,
2 author = {Kerssies, Tommie and Cavagnero, Niccolò and Hermans, Alexander and Norouzi, Narges and Averta, Giuseppe and Leibe, Bastian and Dubbelman, Gijs and de Geus, Daan},
3 title = {Your ViT is Secretly an Image Segmentation Model},
4 booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
5 year = {2025},
6}