coco panoptic eomt large 640

提供商tue-mps
分类image-segmentation
许可证mit
下载量104.3K
星标0

简介

coco panoptic eomt large 640 是一款专注于全景分割(Panoptic Segmentation)的图像处理模型。它将实例分割(区分个体)与语义分割(识别背景)相结合,能够一次性完成对画面中所有物体的精准分类与边界勾勒。该模型基于 COCO 数据集训练,在 640 像素分辨率下表现稳健。对于需要对图像进行精细化像素级分析的开发者来说,它是一个高效的预训练选择,上手门槛较低,可直接集成到计算机视觉流水线中,替代或增强传统的掩码 R-CNN 等方案。

核心亮点

  • 全景分割能力,同时识别物体实例与背景
  • 基于 COCO 标准数据集,通用场景识别度高
  • 640 分辨率输入,在精度与速度间取得平衡
  • 采用 MIT 许可,对商业化部署非常友好

使用方法

安装依赖
# 安装 Hugging Face transformers
pip install transformers torch
SDK 使用
# 使用 transformers 加载模型
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("tue-mps/coco_panoptic_eomt_large_640")
tokenizer = AutoTokenizer.from_pretrained("tue-mps/coco_panoptic_eomt_large_640")

Hugging Face 下载

我们推荐使用命令行或者 Hugging Face Hub SDK 来进行模型的下载。

操作指引:在下载前,请先通过如下命令安装 huggingface_hub:

操作指引
pip install -U huggingface_hub

命令行下载

下载完整模型库

下载完整模型库
huggingface-cli download tue-mps/coco_panoptic_eomt_large_640

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)
huggingface-cli download tue-mps/coco_panoptic_eomt_large_640 config.json --local-dir ./dir

更多命令行下载选项,可参见官方文档

SDK 下载

SDK 下载
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('tue-mps/coco_panoptic_eomt_large_640')

Git 下载

请确保 lfs 已经被正确安装

Git 下载
git lfs install
git clone https://huggingface.co/tue-mps/coco_panoptic_eomt_large_640

如果您希望跳过 lfs 大文件下载,可以使用如下命令

跳过 LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/tue-mps/coco_panoptic_eomt_large_640

模型文件托管在 Hugging Face Hub,使用 HF CLI / SDK / Git 直接下载,不经过本站。

PyTorch / Transformers 使用

安装 Transformers

安装 Transformers
pip install -U transformers torch

模型加载和推理

模型加载和推理
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('tue-mps/coco_panoptic_eomt_large_640')
tokenizer = AutoTokenizer.from_pretrained('tue-mps/coco_panoptic_eomt_large_640')

完整文档

来源: HuggingFace

---
library_name: transformers
license: mit
tags:

  • vision

  • image-segmentation

  • pytorch

---

EoMT

![PyTorch](https://pytorch.org/)

EoMT (Encoder-only Mask Transformer) is a Vision Transformer (ViT) architecture designed for high-quality and efficient image segmentation. It was introduced in the CVPR 2025 highlight paper:
Your ViT is Secretly an Image Segmentation Model
by Tommie Kerssies, Niccolò Cavagnero, Alexander Hermans, Narges Norouzi, Giuseppe Averta, Bastian Leibe, Gijs Dubbelman, and Daan de Geus.

> Key Insight: Given sufficient scale and pretraining, a plain ViT along with additional few params 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 🤗

The original implementation can be found in this repository.

The HuggingFace model page is available at this link.

---

How to use

Here is how to use this model for Panotpic Segmentation:

python
import matplotlib.pyplot as plt
import requests
import torch
from PIL import Image

from transformers import EomtForUniversalSegmentation, AutoImageProcessor

model_id = "tue-mps/coco_panoptic_eomt_large_640"
processor = AutoImageProcessor.from_pretrained(model_id)
model = EomtForUniversalSegmentation.from_pretrained(model_id)

image = Image.open(requests.get("http://images.cocodataset.org/val2017/000000039769.jpg", stream=True).raw)

inputs = processor(
images=image,
return_tensors="pt",
)

with torch.inference_mode():
outputs = model(**inputs)

Prepare the original image size in the format (height, width)

target_sizes = [(image.height, image.width)]

Post-process the model outputs to get final segmentation prediction

preds = processor.post_process_panoptic_segmentation( outputs, target_sizes=target_sizes, )

Visualize the panoptic segmentation mask

plt.imshow(preds[0]["segmentation"]) plt.axis("off") plt.title("Panoptic Segmentation") plt.show()

Citation

If you find our work useful, please consider citing us as:
bibtex
@inproceedings{kerssies2025eomt,
  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},
  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},
}