hf-transformers-bot commited on
Commit
8ed663a
·
verified ·
1 Parent(s): fd6384c

Update tiny models for Sam2Model

Browse files
config.json ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Sam2Model"
4
+ ],
5
+ "dtype": "float32",
6
+ "image_size": 128,
7
+ "initializer_range": 0.02,
8
+ "mask_decoder_config": {
9
+ "attention_downsample_rate": 2,
10
+ "dynamic_multimask_stability_delta": 0.05,
11
+ "dynamic_multimask_stability_thresh": 0.98,
12
+ "dynamic_multimask_via_stability": true,
13
+ "hidden_act": "relu",
14
+ "hidden_size": 32,
15
+ "iou_head_depth": 3,
16
+ "iou_head_hidden_dim": 32,
17
+ "mlp_dim": 64,
18
+ "model_type": "",
19
+ "num_attention_heads": 4,
20
+ "num_hidden_layers": 2,
21
+ "num_multimask_outputs": 3
22
+ },
23
+ "mask_downsampler_embed_dim": 32,
24
+ "memory_attention_feed_forward_hidden_size": 32,
25
+ "memory_attention_hidden_size": 12,
26
+ "memory_attention_num_layers": 1,
27
+ "memory_encoder_hidden_size": 32,
28
+ "memory_fuser_embed_dim": 32,
29
+ "model_type": "sam2",
30
+ "prompt_encoder_config": {
31
+ "hidden_act": "gelu",
32
+ "hidden_size": 32,
33
+ "image_size": 128,
34
+ "layer_norm_eps": 1e-06,
35
+ "mask_input_channels": 8,
36
+ "model_type": "",
37
+ "num_point_embeddings": 4,
38
+ "patch_size": 16,
39
+ "scale": 1
40
+ },
41
+ "transformers_version": "5.16.0.dev0",
42
+ "vision_config": {
43
+ "backbone_channel_list": [
44
+ 96,
45
+ 48,
46
+ 24,
47
+ 12
48
+ ],
49
+ "backbone_config": {
50
+ "_name_or_path": "",
51
+ "architectures": null,
52
+ "blocks_per_stage": [
53
+ 1,
54
+ 2,
55
+ 7,
56
+ 2
57
+ ],
58
+ "chunk_size_feed_forward": 0,
59
+ "dtype": null,
60
+ "embed_dim_per_stage": [
61
+ 12,
62
+ 24,
63
+ 48,
64
+ 96
65
+ ],
66
+ "global_attention_blocks": [
67
+ 5,
68
+ 7,
69
+ 9
70
+ ],
71
+ "hidden_act": "gelu",
72
+ "hidden_size": 12,
73
+ "id2label": {
74
+ "0": "LABEL_0",
75
+ "1": "LABEL_1"
76
+ },
77
+ "image_size": 128,
78
+ "initializer_range": 0.02,
79
+ "is_encoder_decoder": false,
80
+ "label2id": {
81
+ "LABEL_0": 0,
82
+ "LABEL_1": 1
83
+ },
84
+ "layer_norm_eps": 1e-06,
85
+ "mlp_ratio": 4.0,
86
+ "model_type": "sam2_hiera_det_model",
87
+ "num_attention_heads": 1,
88
+ "num_attention_heads_per_stage": [
89
+ 1,
90
+ 2,
91
+ 4,
92
+ 8
93
+ ],
94
+ "num_channels": 3,
95
+ "num_query_pool_stages": 3,
96
+ "output_attentions": false,
97
+ "output_hidden_states": false,
98
+ "patch_kernel_size": 7,
99
+ "patch_padding": 3,
100
+ "patch_stride": 4,
101
+ "problem_type": null,
102
+ "query_stride": [
103
+ 2,
104
+ 2
105
+ ],
106
+ "return_dict": true,
107
+ "window_positional_embedding_background_size": [
108
+ 7,
109
+ 7
110
+ ],
111
+ "window_size_per_stage": [
112
+ 8,
113
+ 4,
114
+ 14,
115
+ 7
116
+ ]
117
+ },
118
+ "backbone_feature_sizes": [
119
+ [
120
+ 32,
121
+ 32
122
+ ],
123
+ [
124
+ 16,
125
+ 16
126
+ ],
127
+ [
128
+ 8,
129
+ 8
130
+ ]
131
+ ],
132
+ "fpn_hidden_size": 32,
133
+ "fpn_kernel_size": 1,
134
+ "fpn_padding": 0,
135
+ "fpn_stride": 1,
136
+ "fpn_top_down_levels": [
137
+ 2,
138
+ 3
139
+ ],
140
+ "hidden_act": "gelu",
141
+ "initializer_range": 0.02,
142
+ "layer_norm_eps": 1e-06,
143
+ "model_type": "sam2_vision_model",
144
+ "num_feature_levels": 3
145
+ }
146
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2207f6d6aae27fed968c96cb80d4efabb196b8d5e89c713d2b0c2b08a2d51622
3
+ size 1950516
preprocessor_config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": {
3
+ "height": 128,
4
+ "width": 128
5
+ },
6
+ "do_convert_rgb": true,
7
+ "do_normalize": true,
8
+ "do_rescale": true,
9
+ "do_resize": true,
10
+ "image_mean": [
11
+ 0.485,
12
+ 0.456,
13
+ 0.406
14
+ ],
15
+ "image_processor_type": "Sam2ImageProcessor",
16
+ "image_std": [
17
+ 0.229,
18
+ 0.224,
19
+ 0.225
20
+ ],
21
+ "mask_size": {
22
+ "height": 256,
23
+ "width": 256
24
+ },
25
+ "resample": 2,
26
+ "rescale_factor": 0.00392156862745098,
27
+ "size": {
28
+ "height": 128,
29
+ "width": 128
30
+ }
31
+ }
video_preprocessor_config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": {
3
+ "height": 128,
4
+ "width": 128
5
+ },
6
+ "do_convert_rgb": true,
7
+ "do_normalize": true,
8
+ "do_rescale": true,
9
+ "do_resize": true,
10
+ "image_mean": [
11
+ 0.485,
12
+ 0.456,
13
+ 0.406
14
+ ],
15
+ "image_std": [
16
+ 0.229,
17
+ 0.224,
18
+ 0.225
19
+ ],
20
+ "resample": 2,
21
+ "rescale_factor": 0.00392156862745098,
22
+ "return_metadata": false,
23
+ "size": {
24
+ "height": 128,
25
+ "width": 128
26
+ },
27
+ "video_processor_type": "Sam2VideoVideoProcessor"
28
+ }