Instructions to use zeromodels/mask2former-swin-tiny-coco-panoptic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ZeroModels
How to use zeromodels/mask2former-swin-tiny-coco-panoptic 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/mask2former-swin-tiny-coco-panoptic") - Keras
How to use zeromodels/mask2former-swin-tiny-coco-panoptic with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://zeromodels/mask2former-swin-tiny-coco-panoptic") - Notebooks
- Google Colab
- Kaggle
Upload kf_config.json with huggingface_hub
Browse files- kf_config.json +33 -0
kf_config.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"library_name": "kerasformers",
|
| 3 |
+
"kerasformers_version": "1.1.3",
|
| 4 |
+
"model_module": "kerasformers.models.mask2former",
|
| 5 |
+
"model_class": "Mask2FormerUniversalSegment",
|
| 6 |
+
"variant": "mask2former-swin-tiny-coco-panoptic",
|
| 7 |
+
"weights": "model.weights.h5",
|
| 8 |
+
"model_type": "mask2former",
|
| 9 |
+
"backbone_embed_dim": 96,
|
| 10 |
+
"backbone_depths": [
|
| 11 |
+
2,
|
| 12 |
+
2,
|
| 13 |
+
6,
|
| 14 |
+
2
|
| 15 |
+
],
|
| 16 |
+
"backbone_num_heads": [
|
| 17 |
+
3,
|
| 18 |
+
6,
|
| 19 |
+
12,
|
| 20 |
+
24
|
| 21 |
+
],
|
| 22 |
+
"backbone_window_size": 7,
|
| 23 |
+
"hidden_dim": 256,
|
| 24 |
+
"mask_feature_size": 256,
|
| 25 |
+
"encoder_num_layers": 6,
|
| 26 |
+
"encoder_ffn_dim": 1024,
|
| 27 |
+
"decoder_num_layers": 9,
|
| 28 |
+
"decoder_ffn_dim": 2048,
|
| 29 |
+
"num_heads": 8,
|
| 30 |
+
"num_queries": 100,
|
| 31 |
+
"num_classes": 133,
|
| 32 |
+
"image_size": 384
|
| 33 |
+
}
|