IMvision12 commited on
Commit
32067a9
·
verified ·
1 Parent(s): a757f87

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

Browse files
README.md CHANGED
@@ -1,10 +1,10 @@
1
  ---
2
  pipeline_tag: mask-generation
3
  license: apache-2.0
4
- library_name: kerasformers
5
  tags:
6
  - keras
7
- - kerasformers
8
  - sam2
9
  - tf
10
  - jax
@@ -13,9 +13,12 @@ tags:
13
 
14
  # sam2_hiera_tiny (Keras 3)
15
 
16
- Pure-Keras 3 weights for [kerasformers](https://github.com/IMvision12/KerasFormers), mirrored from the source. License: `apache-2.0`.
 
 
 
17
 
18
  ```python
19
- from kerasformers.models.sam2 import SAM2PromptableSegment
20
  model = SAM2PromptableSegment.from_weights("sam2_hiera_tiny")
21
- ```
 
1
  ---
2
  pipeline_tag: mask-generation
3
  license: apache-2.0
4
+ library_name: zeromodels
5
  tags:
6
  - keras
7
+ - zeromodels
8
  - sam2
9
  - tf
10
  - jax
 
13
 
14
  # sam2_hiera_tiny (Keras 3)
15
 
16
+ [![GitHub](https://img.shields.io/badge/GitHub-ZeroModels-black?logo=github)](https://github.com/IMvision12/ZeroModels) [![Docs](https://img.shields.io/badge/Docs-SAM2-blue)](https://imvision12.github.io/ZeroModels/sam2/) [![Collection](https://img.shields.io/badge/HF-SAM%20collection-yellow)](https://huggingface.co/collections/zeromodels/sam-v1-v2-v3-6a6a8c261dabbc2996e1b4a2)
17
+
18
+
19
+ Pure-Keras 3 weights for [zeromodels](https://github.com/IMvision12/ZeroModels), mirrored from the source. License: `apache-2.0`.
20
 
21
  ```python
22
+ from zeromodels.models.sam2 import SAM2PromptableSegment
23
  model = SAM2PromptableSegment.from_weights("sam2_hiera_tiny")
24
+ ```
kf_config.json → zm_config.json RENAMED
@@ -1,55 +1,55 @@
1
- {
2
- "library_name": "kerasformers",
3
- "kerasformers_version": "1.2.1",
4
- "model_module": "kerasformers.models.sam2",
5
- "model_class": "SAM2PromptableSegment",
6
- "variant": "sam2_hiera_tiny",
7
- "weights": "model.weights.h5",
8
- "schema_version": 2,
9
- "weight_dtype": "float32",
10
- "model_type": "sam2",
11
- "vision_config": {
12
- "hidden_dim": 96,
13
- "blocks_per_stage": [
14
- 1,
15
- 2,
16
- 7,
17
- 2
18
- ],
19
- "embed_dim_per_stage": [
20
- 96,
21
- 192,
22
- 384,
23
- 768
24
- ],
25
- "num_attention_heads_per_stage": [
26
- 1,
27
- 2,
28
- 4,
29
- 8
30
- ],
31
- "window_size_per_stage": [
32
- 8,
33
- 4,
34
- 14,
35
- 7
36
- ],
37
- "global_attention_blocks": [
38
- 5,
39
- 7,
40
- 9
41
- ],
42
- "backbone_channel_list": [
43
- 768,
44
- 384,
45
- 192,
46
- 96
47
- ],
48
- "window_pos_embed_bg_size": null,
49
- "num_multimask_outputs": 3,
50
- "include_box_input": false,
51
- "include_mask_input": false,
52
- "multimask_output": true,
53
- "image_size": 1024
54
- }
55
  }
 
1
+ {
2
+ "library_name": "zeromodels",
3
+ "zeromodels_version": "1.2.1",
4
+ "model_module": "zeromodels.models.sam2",
5
+ "model_class": "SAM2PromptableSegment",
6
+ "variant": "sam2_hiera_tiny",
7
+ "weights": "model.weights.h5",
8
+ "schema_version": 2,
9
+ "weight_dtype": "float32",
10
+ "model_type": "sam2",
11
+ "vision_config": {
12
+ "hidden_dim": 96,
13
+ "blocks_per_stage": [
14
+ 1,
15
+ 2,
16
+ 7,
17
+ 2
18
+ ],
19
+ "embed_dim_per_stage": [
20
+ 96,
21
+ 192,
22
+ 384,
23
+ 768
24
+ ],
25
+ "num_attention_heads_per_stage": [
26
+ 1,
27
+ 2,
28
+ 4,
29
+ 8
30
+ ],
31
+ "window_size_per_stage": [
32
+ 8,
33
+ 4,
34
+ 14,
35
+ 7
36
+ ],
37
+ "global_attention_blocks": [
38
+ 5,
39
+ 7,
40
+ 9
41
+ ],
42
+ "backbone_channel_list": [
43
+ 768,
44
+ 384,
45
+ 192,
46
+ 96
47
+ ],
48
+ "window_pos_embed_bg_size": null,
49
+ "num_multimask_outputs": 3,
50
+ "include_box_input": false,
51
+ "include_mask_input": false,
52
+ "multimask_output": true,
53
+ "image_size": 1024
54
+ }
55
  }
kf_preprocessor.json → zm_preprocessor.json RENAMED
@@ -1,19 +1,19 @@
1
- {
2
- "library_name": "kerasformers",
3
- "kerasformers_version": "1.1.3",
4
- "preprocessor_module": "kerasformers.models.sam2",
5
- "preprocessor_class": "SAM2ImageProcessor",
6
- "variant": "sam2_hiera_tiny",
7
- "target_length": 1024,
8
- "image_mean": [
9
- 0.485,
10
- 0.456,
11
- 0.406
12
- ],
13
- "image_std": [
14
- 0.229,
15
- 0.224,
16
- 0.225
17
- ],
18
- "data_format": null
19
  }
 
1
+ {
2
+ "library_name": "zeromodels",
3
+ "zeromodels_version": "1.1.3",
4
+ "preprocessor_module": "zeromodels.models.sam2",
5
+ "preprocessor_class": "SAM2ImageProcessor",
6
+ "variant": "sam2_hiera_tiny",
7
+ "target_length": 1024,
8
+ "image_mean": [
9
+ 0.485,
10
+ 0.456,
11
+ 0.406
12
+ ],
13
+ "image_std": [
14
+ 0.229,
15
+ 0.224,
16
+ 0.225
17
+ ],
18
+ "data_format": null
19
  }