IMvision12 commited on
Commit
d60066e
·
verified ·
1 Parent(s): 5661534

Migrate to zeromodels (rename kf_*.json -> zm_*.json, fix refs in config + README, ensure tag + badge)

Browse files
Files changed (2) hide show
  1. README.md +19 -19
  2. kf_config.json → zm_config.json +22 -22
README.md CHANGED
@@ -2,10 +2,10 @@
2
  pipeline_tag: image-classification
3
  license: unknown
4
  base_model: timm/res2net50_26w_8s.in1k
5
- library_name: kerasformers
6
  tags:
7
  - keras
8
- - kerasformers
9
  - image-classification
10
  - res2net
11
  - backbone
@@ -15,13 +15,13 @@ tags:
15
  - tf
16
  ---
17
 
18
- ## ***See [our collection](https://huggingface.co/collections/kerasformers/res2net-6a6bda790be5abb92d20d85f) for all versions of Res2Net.***
19
 
20
  # Run Res2Net with Keras 3: JAX, PyTorch, or TensorFlow
21
 
22
- [![GitHub](https://img.shields.io/badge/GitHub-KerasFormers-black?logo=github)](https://github.com/IMvision12/KerasFormers) [![Docs](https://img.shields.io/badge/Docs-Res2Net-blue)](https://imvision12.github.io/KerasFormers/classification_backbones/) [![Collection](https://img.shields.io/badge/HF-Res2Net%20collection-yellow)](https://huggingface.co/collections/kerasformers/res2net-6a6bda790be5abb92d20d85f)
23
 
24
- # kerasformers/res2net50_26w_8s_in1k
25
 
26
  Paper: [Res2Net: A New Multi-scale Backbone Architecture (arXiv:1904.01169)](https://arxiv.org/abs/1904.01169) · [HF Papers](https://huggingface.co/papers/1904.01169)
27
 
@@ -29,7 +29,7 @@ Res2Net represents multi-scale features at a granular level inside residual bloc
29
 
30
  For more details on the model, please go to the upstream [model card](https://huggingface.co/timm/res2net50_26w_8s.in1k).
31
 
32
- Pure-**Keras 3** conversion of [`timm/res2net50_26w_8s.in1k`](https://huggingface.co/timm/res2net50_26w_8s.in1k) for [kerasformers](https://github.com/IMvision12/KerasFormers). One implementation runs unmodified on **TensorFlow / Torch / JAX**.
33
 
34
  This is an **image-classification / backbone** checkpoint (`Res2NetImageClassify` / `Res2NetModel`).
35
 
@@ -41,11 +41,11 @@ os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
41
 
42
  from PIL import Image
43
  import numpy as np
44
- from kerasformers.models.res2net import Res2NetImageClassify, Res2NetModel
45
 
46
- model = Res2NetImageClassify.from_weights("kerasformers/res2net50_26w_8s_in1k")
47
  backbone = Res2NetModel.from_weights(
48
- "kerasformers/res2net50_26w_8s_in1k", as_backbone=True
49
  )
50
 
51
  image = Image.open("your_image.jpg").convert("RGB")
@@ -56,23 +56,23 @@ feats = backbone(x)
56
  print(len(feats), [tuple(f.shape) for f in feats])
57
  ```
58
 
59
- Load any Res2Net variant the same way with `from_weights("kerasformers/<variant>")`:
60
 
61
  | Variant | Hub |
62
  |---|---|
63
- | `res2net101_26w_4s_in1k` | [`kerasformers/res2net101_26w_4s_in1k`](https://huggingface.co/kerasformers/res2net101_26w_4s_in1k) |
64
- | `res2net50_14w_8s_in1k` | [`kerasformers/res2net50_14w_8s_in1k`](https://huggingface.co/kerasformers/res2net50_14w_8s_in1k) |
65
- | `res2net50_26w_4s_in1k` | [`kerasformers/res2net50_26w_4s_in1k`](https://huggingface.co/kerasformers/res2net50_26w_4s_in1k) |
66
- | `res2net50_26w_6s_in1k` | [`kerasformers/res2net50_26w_6s_in1k`](https://huggingface.co/kerasformers/res2net50_26w_6s_in1k) |
67
- | `res2net50_26w_8s_in1k` | [`kerasformers/res2net50_26w_8s_in1k`](https://huggingface.co/kerasformers/res2net50_26w_8s_in1k) |
68
- | `res2net50_48w_2s_in1k` | [`kerasformers/res2net50_48w_2s_in1k`](https://huggingface.co/kerasformers/res2net50_48w_2s_in1k) |
69
- | `res2next50_in1k` | [`kerasformers/res2next50_in1k`](https://huggingface.co/kerasformers/res2next50_in1k) |
70
 
71
  ## Tips
72
 
73
- - Set `KERAS_BACKEND` **before** importing Keras / kerasformers.
74
  - `Res2NetImageClassify` returns class logits; `Res2NetModel` returns features (`as_backbone=True` for multi-scale stages).
75
- - See [docs](https://imvision12.github.io/KerasFormers/classification_backbones/) and [Loading Weights](https://imvision12.github.io/KerasFormers/loading_weights/).
76
  - Upstream / timm checkpoints: `Res2NetImageClassify.from_weights("hf:timm/res2net50_26w_8s.in1k")`.
77
 
78
  ## Special Thanks
 
2
  pipeline_tag: image-classification
3
  license: unknown
4
  base_model: timm/res2net50_26w_8s.in1k
5
+ library_name: zeromodels
6
  tags:
7
  - keras
8
+ - zeromodels
9
  - image-classification
10
  - res2net
11
  - backbone
 
15
  - tf
16
  ---
17
 
18
+ ## ***See [our collection](https://huggingface.co/collections/zeromodels/res2net-6a6bda790be5abb92d20d85f) for all versions of Res2Net.***
19
 
20
  # Run Res2Net with Keras 3: JAX, PyTorch, or TensorFlow
21
 
22
+ [![GitHub](https://img.shields.io/badge/GitHub-ZeroModels-black?logo=github)](https://github.com/IMvision12/ZeroModels) [![Docs](https://img.shields.io/badge/Docs-Res2Net-blue)](https://imvision12.github.io/ZeroModels/classification_backbones/) [![Collection](https://img.shields.io/badge/HF-Res2Net%20collection-yellow)](https://huggingface.co/collections/zeromodels/res2net-6a6bda790be5abb92d20d85f)
23
 
24
+ # zeromodels/res2net50_26w_8s_in1k
25
 
26
  Paper: [Res2Net: A New Multi-scale Backbone Architecture (arXiv:1904.01169)](https://arxiv.org/abs/1904.01169) · [HF Papers](https://huggingface.co/papers/1904.01169)
27
 
 
29
 
30
  For more details on the model, please go to the upstream [model card](https://huggingface.co/timm/res2net50_26w_8s.in1k).
31
 
32
+ Pure-**Keras 3** conversion of [`timm/res2net50_26w_8s.in1k`](https://huggingface.co/timm/res2net50_26w_8s.in1k) for [zeromodels](https://github.com/IMvision12/ZeroModels). One implementation runs unmodified on **TensorFlow / Torch / JAX**.
33
 
34
  This is an **image-classification / backbone** checkpoint (`Res2NetImageClassify` / `Res2NetModel`).
35
 
 
41
 
42
  from PIL import Image
43
  import numpy as np
44
+ from zeromodels.models.res2net import Res2NetImageClassify, Res2NetModel
45
 
46
+ model = Res2NetImageClassify.from_weights("zeromodels/res2net50_26w_8s_in1k")
47
  backbone = Res2NetModel.from_weights(
48
+ "zeromodels/res2net50_26w_8s_in1k", as_backbone=True
49
  )
50
 
51
  image = Image.open("your_image.jpg").convert("RGB")
 
56
  print(len(feats), [tuple(f.shape) for f in feats])
57
  ```
58
 
59
+ Load any Res2Net variant the same way with `from_weights("zeromodels/<variant>")`:
60
 
61
  | Variant | Hub |
62
  |---|---|
63
+ | `res2net101_26w_4s_in1k` | [`zeromodels/res2net101_26w_4s_in1k`](https://huggingface.co/zeromodels/res2net101_26w_4s_in1k) |
64
+ | `res2net50_14w_8s_in1k` | [`zeromodels/res2net50_14w_8s_in1k`](https://huggingface.co/zeromodels/res2net50_14w_8s_in1k) |
65
+ | `res2net50_26w_4s_in1k` | [`zeromodels/res2net50_26w_4s_in1k`](https://huggingface.co/zeromodels/res2net50_26w_4s_in1k) |
66
+ | `res2net50_26w_6s_in1k` | [`zeromodels/res2net50_26w_6s_in1k`](https://huggingface.co/zeromodels/res2net50_26w_6s_in1k) |
67
+ | `res2net50_26w_8s_in1k` | [`zeromodels/res2net50_26w_8s_in1k`](https://huggingface.co/zeromodels/res2net50_26w_8s_in1k) |
68
+ | `res2net50_48w_2s_in1k` | [`zeromodels/res2net50_48w_2s_in1k`](https://huggingface.co/zeromodels/res2net50_48w_2s_in1k) |
69
+ | `res2next50_in1k` | [`zeromodels/res2next50_in1k`](https://huggingface.co/zeromodels/res2next50_in1k) |
70
 
71
  ## Tips
72
 
73
+ - Set `KERAS_BACKEND` **before** importing Keras / zeromodels.
74
  - `Res2NetImageClassify` returns class logits; `Res2NetModel` returns features (`as_backbone=True` for multi-scale stages).
75
+ - See [docs](https://imvision12.github.io/ZeroModels/classification_backbones/) and [Loading Weights](https://imvision12.github.io/ZeroModels/loading_weights/).
76
  - Upstream / timm checkpoints: `Res2NetImageClassify.from_weights("hf:timm/res2net50_26w_8s.in1k")`.
77
 
78
  ## Special Thanks
kf_config.json → zm_config.json RENAMED
@@ -1,23 +1,23 @@
1
- {
2
- "library_name": "kerasformers",
3
- "kerasformers_version": "1.2.1",
4
- "model_module": "kerasformers.models.res2net",
5
- "model_class": "Res2NetImageClassify",
6
- "variant": "res2net50_26w_8s_in1k",
7
- "weights": "model.weights.h5",
8
- "schema_version": 2,
9
- "weight_dtype": "float32",
10
- "model_type": "res2net",
11
- "vision_config": {
12
- "depth": [
13
- 3,
14
- 4,
15
- 6,
16
- 3
17
- ],
18
- "base_width": 26,
19
- "scale": 8,
20
- "cardinality": 1,
21
- "num_classes": 1000
22
- }
23
  }
 
1
+ {
2
+ "library_name": "zeromodels",
3
+ "zeromodels_version": "1.2.1",
4
+ "model_module": "zeromodels.models.res2net",
5
+ "model_class": "Res2NetImageClassify",
6
+ "variant": "res2net50_26w_8s_in1k",
7
+ "weights": "model.weights.h5",
8
+ "schema_version": 2,
9
+ "weight_dtype": "float32",
10
+ "model_type": "res2net",
11
+ "vision_config": {
12
+ "depth": [
13
+ 3,
14
+ 4,
15
+ 6,
16
+ 3
17
+ ],
18
+ "base_width": 26,
19
+ "scale": 8,
20
+ "cardinality": 1,
21
+ "num_classes": 1000
22
+ }
23
  }