IMvision12 commited on
Commit
5ed117c
·
verified ·
1 Parent(s): 3dd7b04

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 +18 -18
  2. kf_config.json → zm_config.json +17 -17
README.md CHANGED
@@ -2,10 +2,10 @@
2
  pipeline_tag: image-classification
3
  license: apache-2.0
4
  base_model: timm/xception41.tf_in1k
5
- library_name: kerasformers
6
  tags:
7
  - keras
8
- - kerasformers
9
  - image-classification
10
  - xception
11
  - backbone
@@ -15,13 +15,13 @@ tags:
15
  - tf
16
  ---
17
 
18
- ## ***See [our collection](https://huggingface.co/collections/kerasformers/xception-6a6d5316839c938dfc2f05fd) for all versions of Xception.***
19
 
20
  # Run Xception 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-Xception-blue)](https://imvision12.github.io/KerasFormers/classification_backbones/) [![Collection](https://img.shields.io/badge/HF-Xception%20collection-yellow)](https://huggingface.co/collections/kerasformers/xception-6a6d5316839c938dfc2f05fd)
23
 
24
- # kerasformers/xception41_tf_in1k
25
 
26
  Paper: [Xception: Deep Learning with Depthwise Separable Convolutions (arXiv:1610.02357)](https://arxiv.org/abs/1610.02357) · [HF Papers](https://huggingface.co/papers/1610.02357)
27
 
@@ -29,7 +29,7 @@ Xception interprets Inception modules as depthwise separable convolutions. Class
29
 
30
  For more details on the model, please go to the upstream [model card](https://huggingface.co/timm/xception41.tf_in1k).
31
 
32
- Pure-**Keras 3** conversion of [`timm/xception41.tf_in1k`](https://huggingface.co/timm/xception41.tf_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 (`XceptionImageClassify` / `XceptionModel`).
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.xception import XceptionImageClassify, XceptionModel
45
 
46
- model = XceptionImageClassify.from_weights("kerasformers/xception41_tf_in1k")
47
  backbone = XceptionModel.from_weights(
48
- "kerasformers/xception41_tf_in1k", as_backbone=True
49
  )
50
 
51
  image = Image.open("your_image.jpg").convert("RGB")
@@ -56,22 +56,22 @@ feats = backbone(x)
56
  print(len(feats), [tuple(f.shape) for f in feats])
57
  ```
58
 
59
- Load any Xception variant the same way with `from_weights("kerasformers/<variant>")`:
60
 
61
  | Variant | Hub |
62
  |---|---|
63
- | `xception41_tf_in1k` | [`kerasformers/xception41_tf_in1k`](https://huggingface.co/kerasformers/xception41_tf_in1k) |
64
- | `xception41p_ra3_in1k` | [`kerasformers/xception41p_ra3_in1k`](https://huggingface.co/kerasformers/xception41p_ra3_in1k) |
65
- | `xception65_ra3_in1k` | [`kerasformers/xception65_ra3_in1k`](https://huggingface.co/kerasformers/xception65_ra3_in1k) |
66
- | `xception65_tf_in1k` | [`kerasformers/xception65_tf_in1k`](https://huggingface.co/kerasformers/xception65_tf_in1k) |
67
- | `xception65p_ra3_in1k` | [`kerasformers/xception65p_ra3_in1k`](https://huggingface.co/kerasformers/xception65p_ra3_in1k) |
68
- | `xception71_tf_in1k` | [`kerasformers/xception71_tf_in1k`](https://huggingface.co/kerasformers/xception71_tf_in1k) |
69
 
70
  ## Tips
71
 
72
- - Set `KERAS_BACKEND` **before** importing Keras / kerasformers.
73
  - `XceptionImageClassify` returns class logits; `XceptionModel` returns features (`as_backbone=True` for multi-scale stages).
74
- - See [docs](https://imvision12.github.io/KerasFormers/classification_backbones/) and [Loading Weights](https://imvision12.github.io/KerasFormers/loading_weights/).
75
  - Upstream / timm checkpoints: `XceptionImageClassify.from_weights("hf:timm/xception41.tf_in1k")`.
76
 
77
  ## Special Thanks
 
2
  pipeline_tag: image-classification
3
  license: apache-2.0
4
  base_model: timm/xception41.tf_in1k
5
+ library_name: zeromodels
6
  tags:
7
  - keras
8
+ - zeromodels
9
  - image-classification
10
  - xception
11
  - backbone
 
15
  - tf
16
  ---
17
 
18
+ ## ***See [our collection](https://huggingface.co/collections/zeromodels/xception-6a6d5316839c938dfc2f05fd) for all versions of Xception.***
19
 
20
  # Run Xception 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-Xception-blue)](https://imvision12.github.io/ZeroModels/classification_backbones/) [![Collection](https://img.shields.io/badge/HF-Xception%20collection-yellow)](https://huggingface.co/collections/zeromodels/xception-6a6d5316839c938dfc2f05fd)
23
 
24
+ # zeromodels/xception41_tf_in1k
25
 
26
  Paper: [Xception: Deep Learning with Depthwise Separable Convolutions (arXiv:1610.02357)](https://arxiv.org/abs/1610.02357) · [HF Papers](https://huggingface.co/papers/1610.02357)
27
 
 
29
 
30
  For more details on the model, please go to the upstream [model card](https://huggingface.co/timm/xception41.tf_in1k).
31
 
32
+ Pure-**Keras 3** conversion of [`timm/xception41.tf_in1k`](https://huggingface.co/timm/xception41.tf_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 (`XceptionImageClassify` / `XceptionModel`).
35
 
 
41
 
42
  from PIL import Image
43
  import numpy as np
44
+ from zeromodels.models.xception import XceptionImageClassify, XceptionModel
45
 
46
+ model = XceptionImageClassify.from_weights("zeromodels/xception41_tf_in1k")
47
  backbone = XceptionModel.from_weights(
48
+ "zeromodels/xception41_tf_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 Xception variant the same way with `from_weights("zeromodels/<variant>")`:
60
 
61
  | Variant | Hub |
62
  |---|---|
63
+ | `xception41_tf_in1k` | [`zeromodels/xception41_tf_in1k`](https://huggingface.co/zeromodels/xception41_tf_in1k) |
64
+ | `xception41p_ra3_in1k` | [`zeromodels/xception41p_ra3_in1k`](https://huggingface.co/zeromodels/xception41p_ra3_in1k) |
65
+ | `xception65_ra3_in1k` | [`zeromodels/xception65_ra3_in1k`](https://huggingface.co/zeromodels/xception65_ra3_in1k) |
66
+ | `xception65_tf_in1k` | [`zeromodels/xception65_tf_in1k`](https://huggingface.co/zeromodels/xception65_tf_in1k) |
67
+ | `xception65p_ra3_in1k` | [`zeromodels/xception65p_ra3_in1k`](https://huggingface.co/zeromodels/xception65p_ra3_in1k) |
68
+ | `xception71_tf_in1k` | [`zeromodels/xception71_tf_in1k`](https://huggingface.co/zeromodels/xception71_tf_in1k) |
69
 
70
  ## Tips
71
 
72
+ - Set `KERAS_BACKEND` **before** importing Keras / zeromodels.
73
  - `XceptionImageClassify` returns class logits; `XceptionModel` returns features (`as_backbone=True` for multi-scale stages).
74
+ - See [docs](https://imvision12.github.io/ZeroModels/classification_backbones/) and [Loading Weights](https://imvision12.github.io/ZeroModels/loading_weights/).
75
  - Upstream / timm checkpoints: `XceptionImageClassify.from_weights("hf:timm/xception41.tf_in1k")`.
76
 
77
  ## Special Thanks
kf_config.json → zm_config.json RENAMED
@@ -1,18 +1,18 @@
1
- {
2
- "library_name": "kerasformers",
3
- "kerasformers_version": "1.2.1",
4
- "model_module": "kerasformers.models.xception",
5
- "model_class": "XceptionImageClassify",
6
- "variant": "xception41_tf_in1k",
7
- "weights": "model.weights.h5",
8
- "schema_version": 2,
9
- "weight_dtype": "float32",
10
- "model_type": "xception",
11
- "vision_config": {
12
- "config": "41",
13
- "preact": false,
14
- "bn_epsilon": 0.001,
15
- "image_size": 299,
16
- "num_classes": 1000
17
- }
18
  }
 
1
+ {
2
+ "library_name": "zeromodels",
3
+ "zeromodels_version": "1.2.1",
4
+ "model_module": "zeromodels.models.xception",
5
+ "model_class": "XceptionImageClassify",
6
+ "variant": "xception41_tf_in1k",
7
+ "weights": "model.weights.h5",
8
+ "schema_version": 2,
9
+ "weight_dtype": "float32",
10
+ "model_type": "xception",
11
+ "vision_config": {
12
+ "config": "41",
13
+ "preact": false,
14
+ "bn_epsilon": 0.001,
15
+ "image_size": 299,
16
+ "num_classes": 1000
17
+ }
18
  }