IMvision12 commited on
Commit
a85a1ad
·
verified ·
1 Parent(s): c671c40

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

Browse files
README.md CHANGED
@@ -2,10 +2,10 @@
2
  pipeline_tag: depth-estimation
3
  license: apache-2.0
4
  base_model: google/tipsv2-g14-dpt
5
- library_name: kerasformers
6
  tags:
7
  - keras
8
- - kerasformers
9
  - tipsv2
10
  - dpt
11
  - depth-estimation
@@ -16,13 +16,13 @@ tags:
16
  - tf
17
  ---
18
 
19
- ## ***See [our collection](https://huggingface.co/collections/kerasformers/tipsv2-dpt-6a8a3f36cd22fe9f68df6202) for all versions of TIPSv2-DPT.***
20
 
21
  # Run TIPSv2-DPT with Keras 3: JAX, PyTorch, or TensorFlow
22
 
23
- [![GitHub](https://img.shields.io/badge/GitHub-KerasFormers-black?logo=github)](https://github.com/IMvision12/KerasFormers) [![Collection](https://img.shields.io/badge/HF-TIPSv2--DPT%20collection-yellow)](https://huggingface.co/collections/kerasformers/tipsv2-dpt-6a8a3f36cd22fe9f68df6202)
24
 
25
- # kerasformers/tipsv2-g14-dpt
26
 
27
  Paper: [TIPSv2 (arXiv:2604.12012)](https://huggingface.co/papers/2604.12012)
28
 
@@ -30,7 +30,7 @@ TIPSv2-DPT stacks DPT (Dense Prediction Transformer) heads on the TIPSv2 vision
30
 
31
  For more details on the model, please go to the upstream [model card](https://huggingface.co/google/tipsv2-g14-dpt).
32
 
33
- Pure-**Keras 3** conversion of [`google/tipsv2-g14-dpt`](https://huggingface.co/google/tipsv2-g14-dpt) for [kerasformers](https://github.com/IMvision12/KerasFormers). One implementation runs unmodified on **TensorFlow / Torch / JAX**.
34
 
35
  ## ✨ Quick start
36
 
@@ -41,7 +41,7 @@ os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
41
  from PIL import Image
42
  import numpy as np
43
  import keras
44
- from kerasformers.models.tipsv2_dpt import (
45
  Tipsv2DptDensePredict, # depth + segmentation
46
  Tipsv2DptDepthEstimation, # depth only
47
  Tipsv2DptSemanticSegment, # segmentation only
@@ -49,7 +49,7 @@ from kerasformers.models.tipsv2_dpt import (
49
  )
50
 
51
  # all three load from the SAME repo
52
- model = Tipsv2DptDensePredict.from_weights("kerasformers/tipsv2-g14-dpt")
53
  proc = Tipsv2DptImageProcessor(image_resolution=448)
54
 
55
  image = Image.open("your_image.jpg").convert("RGB")
@@ -59,22 +59,22 @@ depth = keras.ops.convert_to_numpy(out["predicted_depth"]) # (1, H', W'
59
  seg = keras.ops.convert_to_numpy(out["segmentation_logits"]) # (1, H', W', num_labels)
60
 
61
  # single-task variants (same weights, one output each)
62
- depth_model = Tipsv2DptDepthEstimation.from_weights("kerasformers/tipsv2-g14-dpt")
63
- seg_model = Tipsv2DptSemanticSegment.from_weights("kerasformers/tipsv2-g14-dpt")
64
  ```
65
 
66
  Variants:
67
 
68
  | Variant | Hub |
69
  |---|---|
70
- | `tipsv2-b14-dpt` | [`kerasformers/tipsv2-b14-dpt`](https://huggingface.co/kerasformers/tipsv2-b14-dpt) |
71
- | `tipsv2-l14-dpt` | [`kerasformers/tipsv2-l14-dpt`](https://huggingface.co/kerasformers/tipsv2-l14-dpt) |
72
- | `tipsv2-so400m14-dpt` | [`kerasformers/tipsv2-so400m14-dpt`](https://huggingface.co/kerasformers/tipsv2-so400m14-dpt) |
73
- | `tipsv2-g14-dpt` | [`kerasformers/tipsv2-g14-dpt`](https://huggingface.co/kerasformers/tipsv2-g14-dpt) |
74
 
75
  ## Tips
76
 
77
- - Set `KERAS_BACKEND` **before** importing Keras / kerasformers.
78
  - The image processor rescales to `[0, 1]` (no mean/std normalization); input resolution is 448.
79
  - Outputs are at the DPT feature resolution; resize to the input size for visualization.
80
  - Upstream checkpoint: `Tipsv2DptDensePredict.from_weights("hf:google/tipsv2-g14-dpt")`.
 
2
  pipeline_tag: depth-estimation
3
  license: apache-2.0
4
  base_model: google/tipsv2-g14-dpt
5
+ library_name: zeromodels
6
  tags:
7
  - keras
8
+ - zeromodels
9
  - tipsv2
10
  - dpt
11
  - depth-estimation
 
16
  - tf
17
  ---
18
 
19
+ ## ***See [our collection](https://huggingface.co/collections/zeromodels/tipsv2-dpt-6a8a3f36cd22fe9f68df6202) for all versions of TIPSv2-DPT.***
20
 
21
  # Run TIPSv2-DPT with Keras 3: JAX, PyTorch, or TensorFlow
22
 
23
+ [![GitHub](https://img.shields.io/badge/GitHub-ZeroModels-black?logo=github)](https://github.com/IMvision12/ZeroModels) [![Collection](https://img.shields.io/badge/HF-TIPSv2--DPT%20collection-yellow)](https://huggingface.co/collections/zeromodels/tipsv2-dpt-6a8a3f36cd22fe9f68df6202)
24
 
25
+ # zeromodels/tipsv2-g14-dpt
26
 
27
  Paper: [TIPSv2 (arXiv:2604.12012)](https://huggingface.co/papers/2604.12012)
28
 
 
30
 
31
  For more details on the model, please go to the upstream [model card](https://huggingface.co/google/tipsv2-g14-dpt).
32
 
33
+ Pure-**Keras 3** conversion of [`google/tipsv2-g14-dpt`](https://huggingface.co/google/tipsv2-g14-dpt) for [zeromodels](https://github.com/IMvision12/ZeroModels). One implementation runs unmodified on **TensorFlow / Torch / JAX**.
34
 
35
  ## ✨ Quick start
36
 
 
41
  from PIL import Image
42
  import numpy as np
43
  import keras
44
+ from zeromodels.models.tipsv2_dpt import (
45
  Tipsv2DptDensePredict, # depth + segmentation
46
  Tipsv2DptDepthEstimation, # depth only
47
  Tipsv2DptSemanticSegment, # segmentation only
 
49
  )
50
 
51
  # all three load from the SAME repo
52
+ model = Tipsv2DptDensePredict.from_weights("zeromodels/tipsv2-g14-dpt")
53
  proc = Tipsv2DptImageProcessor(image_resolution=448)
54
 
55
  image = Image.open("your_image.jpg").convert("RGB")
 
59
  seg = keras.ops.convert_to_numpy(out["segmentation_logits"]) # (1, H', W', num_labels)
60
 
61
  # single-task variants (same weights, one output each)
62
+ depth_model = Tipsv2DptDepthEstimation.from_weights("zeromodels/tipsv2-g14-dpt")
63
+ seg_model = Tipsv2DptSemanticSegment.from_weights("zeromodels/tipsv2-g14-dpt")
64
  ```
65
 
66
  Variants:
67
 
68
  | Variant | Hub |
69
  |---|---|
70
+ | `tipsv2-b14-dpt` | [`zeromodels/tipsv2-b14-dpt`](https://huggingface.co/zeromodels/tipsv2-b14-dpt) |
71
+ | `tipsv2-l14-dpt` | [`zeromodels/tipsv2-l14-dpt`](https://huggingface.co/zeromodels/tipsv2-l14-dpt) |
72
+ | `tipsv2-so400m14-dpt` | [`zeromodels/tipsv2-so400m14-dpt`](https://huggingface.co/zeromodels/tipsv2-so400m14-dpt) |
73
+ | `tipsv2-g14-dpt` | [`zeromodels/tipsv2-g14-dpt`](https://huggingface.co/zeromodels/tipsv2-g14-dpt) |
74
 
75
  ## Tips
76
 
77
+ - Set `KERAS_BACKEND` **before** importing Keras / zeromodels.
78
  - The image processor rescales to `[0, 1]` (no mean/std normalization); input resolution is 448.
79
  - Outputs are at the DPT feature resolution; resize to the input size for visualization.
80
  - Upstream checkpoint: `Tipsv2DptDensePredict.from_weights("hf:google/tipsv2-g14-dpt")`.
kf_config.json → zm_config.json RENAMED
@@ -1,7 +1,7 @@
1
  {
2
- "library_name": "kerasformers",
3
- "kerasformers_version": "1.2.5",
4
- "model_module": "kerasformers.models.tipsv2_dpt",
5
  "model_class": "Tipsv2DptDensePredict",
6
  "variant": "tipsv2-g14-dpt",
7
  "weights": "model.weights.h5",
 
1
  {
2
+ "library_name": "zeromodels",
3
+ "zeromodels_version": "1.2.5",
4
+ "model_module": "zeromodels.models.tipsv2_dpt",
5
  "model_class": "Tipsv2DptDensePredict",
6
  "variant": "tipsv2-g14-dpt",
7
  "weights": "model.weights.h5",
kf_preprocessor.json → zm_preprocessor.json RENAMED
@@ -1,7 +1,7 @@
1
  {
2
- "library_name": "kerasformers",
3
- "kerasformers_version": "1.2.5",
4
- "preprocessor_module": "kerasformers.models.tipsv2_dpt",
5
  "preprocessor_class": "Tipsv2DptImageProcessor",
6
  "variant": "tipsv2-g14-dpt",
7
  "image_resolution": 448,
 
1
  {
2
+ "library_name": "zeromodels",
3
+ "zeromodels_version": "1.2.5",
4
+ "preprocessor_module": "zeromodels.models.tipsv2_dpt",
5
  "preprocessor_class": "Tipsv2DptImageProcessor",
6
  "variant": "tipsv2-g14-dpt",
7
  "image_resolution": 448,