Instructions to use zeromodels/eomt_large_coco_instance_640 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ZeroModels
How to use zeromodels/eomt_large_coco_instance_640 with ZeroModels:
# pip install -U zeromodels # ZeroModels is pure Keras 3, so pick a backend: "jax", "torch" or "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" from zeromodels import AutoZModel # AutoZModel reads the repo's model_type and loads the matching class. # For a task head use the matching loader, e.g. AutoZMImageClassify / AutoZMDetect / # AutoZMSemanticSegment / AutoZMTextGenerate (see zeromodels.auto). model = AutoZModel.from_weights("zeromodels/eomt_large_coco_instance_640") - Keras
How to use zeromodels/eomt_large_coco_instance_640 with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://zeromodels/eomt_large_coco_instance_640") - Notebooks
- Google Colab
- Kaggle
fix readme.md
Browse files
README.md
CHANGED
|
@@ -25,7 +25,8 @@ tags:
|
|
| 25 |
|
| 26 |
Paper: [Your ViT is Secretly an Image Segmentation Model (arXiv:2503.19108)](https://arxiv.org/abs/2503.19108) 路 [HF Papers](https://huggingface.co/papers/2503.19108)
|
| 27 |
|
| 28 |
-
EoMT (Encoder-only Mask Transformer) keeps segmentation inside a plain ViT: learned query tokens are concatenated with patch tokens and run through the same ViT blocks. No pixel decoder, no deformable attention decoder.
|
|
|
|
| 29 |
For more details on the model, please go to the upstream [model card](https://huggingface.co/tue-mps/coco_instance_eomt_large_640).
|
| 30 |
|
| 31 |
Pure-**Keras 3** conversion of [`tue-mps/coco_instance_eomt_large_640`](https://huggingface.co/tue-mps/coco_instance_eomt_large_640) for [kerasformers](https://github.com/IMvision12/KerasFormers). One implementation runs unmodified on **TensorFlow / Torch / JAX**.
|
|
@@ -39,10 +40,10 @@ import os
|
|
| 39 |
os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
|
| 40 |
|
| 41 |
from PIL import Image
|
| 42 |
-
from
|
| 43 |
|
| 44 |
-
model =
|
| 45 |
-
processor =
|
| 46 |
|
| 47 |
image = Image.open("your_image.jpg").convert("RGB")
|
| 48 |
output = model(processor(image)["pixel_values"], training=False)
|
|
|
|
| 25 |
|
| 26 |
Paper: [Your ViT is Secretly an Image Segmentation Model (arXiv:2503.19108)](https://arxiv.org/abs/2503.19108) 路 [HF Papers](https://huggingface.co/papers/2503.19108)
|
| 27 |
|
| 28 |
+
EoMT (Encoder-only Mask Transformer) keeps segmentation inside a plain ViT: learned query tokens are concatenated with patch tokens and run through the same ViT blocks. No pixel decoder, no deformable attention decoder.
|
| 29 |
+
|
| 30 |
For more details on the model, please go to the upstream [model card](https://huggingface.co/tue-mps/coco_instance_eomt_large_640).
|
| 31 |
|
| 32 |
Pure-**Keras 3** conversion of [`tue-mps/coco_instance_eomt_large_640`](https://huggingface.co/tue-mps/coco_instance_eomt_large_640) for [kerasformers](https://github.com/IMvision12/KerasFormers). One implementation runs unmodified on **TensorFlow / Torch / JAX**.
|
|
|
|
| 40 |
os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
|
| 41 |
|
| 42 |
from PIL import Image
|
| 43 |
+
from kerasformers.models.eomt import EoMTUniversalSegment, EoMTImageProcessor
|
| 44 |
|
| 45 |
+
model = EoMTUniversalSegment.from_weights("kerasformers/eomt_large_coco_instance_640")
|
| 46 |
+
processor = EoMTImageProcessor()
|
| 47 |
|
| 48 |
image = Image.open("your_image.jpg").convert("RGB")
|
| 49 |
output = model(processor(image)["pixel_values"], training=False)
|