vladislavbro commited on
Commit
299dd13
·
verified ·
1 Parent(s): 2355429

Add config from convert_d_fine_original_pytorch_checkpoint_to_hf.py

Browse files
Files changed (2) hide show
  1. README.md +199 -0
  2. config.json +347 -0
README.md ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ tags: []
4
+ ---
5
+
6
+ # Model Card for Model ID
7
+
8
+ <!-- Provide a quick summary of what the model is/does. -->
9
+
10
+
11
+
12
+ ## Model Details
13
+
14
+ ### Model Description
15
+
16
+ <!-- Provide a longer summary of what this model is. -->
17
+
18
+ This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
+
20
+ - **Developed by:** [More Information Needed]
21
+ - **Funded by [optional]:** [More Information Needed]
22
+ - **Shared by [optional]:** [More Information Needed]
23
+ - **Model type:** [More Information Needed]
24
+ - **Language(s) (NLP):** [More Information Needed]
25
+ - **License:** [More Information Needed]
26
+ - **Finetuned from model [optional]:** [More Information Needed]
27
+
28
+ ### Model Sources [optional]
29
+
30
+ <!-- Provide the basic links for the model. -->
31
+
32
+ - **Repository:** [More Information Needed]
33
+ - **Paper [optional]:** [More Information Needed]
34
+ - **Demo [optional]:** [More Information Needed]
35
+
36
+ ## Uses
37
+
38
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
+
40
+ ### Direct Use
41
+
42
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
+
44
+ [More Information Needed]
45
+
46
+ ### Downstream Use [optional]
47
+
48
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
+
50
+ [More Information Needed]
51
+
52
+ ### Out-of-Scope Use
53
+
54
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
+
56
+ [More Information Needed]
57
+
58
+ ## Bias, Risks, and Limitations
59
+
60
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
+
62
+ [More Information Needed]
63
+
64
+ ### Recommendations
65
+
66
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
+
68
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
+
70
+ ## How to Get Started with the Model
71
+
72
+ Use the code below to get started with the model.
73
+
74
+ [More Information Needed]
75
+
76
+ ## Training Details
77
+
78
+ ### Training Data
79
+
80
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
+
82
+ [More Information Needed]
83
+
84
+ ### Training Procedure
85
+
86
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
+
88
+ #### Preprocessing [optional]
89
+
90
+ [More Information Needed]
91
+
92
+
93
+ #### Training Hyperparameters
94
+
95
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
+
97
+ #### Speeds, Sizes, Times [optional]
98
+
99
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
+
101
+ [More Information Needed]
102
+
103
+ ## Evaluation
104
+
105
+ <!-- This section describes the evaluation protocols and provides the results. -->
106
+
107
+ ### Testing Data, Factors & Metrics
108
+
109
+ #### Testing Data
110
+
111
+ <!-- This should link to a Dataset Card if possible. -->
112
+
113
+ [More Information Needed]
114
+
115
+ #### Factors
116
+
117
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
+
119
+ [More Information Needed]
120
+
121
+ #### Metrics
122
+
123
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
+
125
+ [More Information Needed]
126
+
127
+ ### Results
128
+
129
+ [More Information Needed]
130
+
131
+ #### Summary
132
+
133
+
134
+
135
+ ## Model Examination [optional]
136
+
137
+ <!-- Relevant interpretability work for the model goes here -->
138
+
139
+ [More Information Needed]
140
+
141
+ ## Environmental Impact
142
+
143
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
+
145
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
+
147
+ - **Hardware Type:** [More Information Needed]
148
+ - **Hours used:** [More Information Needed]
149
+ - **Cloud Provider:** [More Information Needed]
150
+ - **Compute Region:** [More Information Needed]
151
+ - **Carbon Emitted:** [More Information Needed]
152
+
153
+ ## Technical Specifications [optional]
154
+
155
+ ### Model Architecture and Objective
156
+
157
+ [More Information Needed]
158
+
159
+ ### Compute Infrastructure
160
+
161
+ [More Information Needed]
162
+
163
+ #### Hardware
164
+
165
+ [More Information Needed]
166
+
167
+ #### Software
168
+
169
+ [More Information Needed]
170
+
171
+ ## Citation [optional]
172
+
173
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
+
175
+ **BibTeX:**
176
+
177
+ [More Information Needed]
178
+
179
+ **APA:**
180
+
181
+ [More Information Needed]
182
+
183
+ ## Glossary [optional]
184
+
185
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
+
187
+ [More Information Needed]
188
+
189
+ ## More Information [optional]
190
+
191
+ [More Information Needed]
192
+
193
+ ## Model Card Authors [optional]
194
+
195
+ [More Information Needed]
196
+
197
+ ## Model Card Contact
198
+
199
+ [More Information Needed]
config.json ADDED
@@ -0,0 +1,347 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_attn_implementation_autoset": true,
3
+ "activation_dropout": 0.0,
4
+ "activation_function": "silu",
5
+ "anchor_image_size": null,
6
+ "attention_dropout": 0.0,
7
+ "auxiliary_loss": true,
8
+ "backbone": null,
9
+ "backbone_config": {
10
+ "depths": [
11
+ 3,
12
+ 4,
13
+ 6,
14
+ 3
15
+ ],
16
+ "downsample_in_bottleneck": false,
17
+ "downsample_in_first_stage": false,
18
+ "embedding_size": 32,
19
+ "hidden_act": "relu",
20
+ "hidden_sizes": [
21
+ 192,
22
+ 384,
23
+ 768,
24
+ 1536
25
+ ],
26
+ "initializer_range": 0.02,
27
+ "layer_type": "basic",
28
+ "model_type": "hgnet_v2",
29
+ "num_channels": 3,
30
+ "out_features": [
31
+ "stage2",
32
+ "stage3",
33
+ "stage4"
34
+ ],
35
+ "out_indices": [
36
+ 2,
37
+ 3,
38
+ 4
39
+ ],
40
+ "stage_downsample": [
41
+ false,
42
+ true,
43
+ true,
44
+ true
45
+ ],
46
+ "stage_in_channels": [
47
+ 32,
48
+ 96,
49
+ 384,
50
+ 768
51
+ ],
52
+ "stage_kernel_size": [
53
+ 3,
54
+ 3,
55
+ 5,
56
+ 5
57
+ ],
58
+ "stage_light_block": [
59
+ false,
60
+ false,
61
+ true,
62
+ true
63
+ ],
64
+ "stage_mid_channels": [
65
+ 32,
66
+ 64,
67
+ 128,
68
+ 256
69
+ ],
70
+ "stage_names": [
71
+ "stem",
72
+ "stage1",
73
+ "stage2",
74
+ "stage3",
75
+ "stage4"
76
+ ],
77
+ "stage_num_blocks": [
78
+ 1,
79
+ 1,
80
+ 3,
81
+ 1
82
+ ],
83
+ "stage_numb_of_layers": [
84
+ 4,
85
+ 4,
86
+ 4,
87
+ 4
88
+ ],
89
+ "stage_out_channels": [
90
+ 96,
91
+ 384,
92
+ 768,
93
+ 1536
94
+ ],
95
+ "stem_channels": [
96
+ 3,
97
+ 24,
98
+ 32
99
+ ],
100
+ "use_learnable_affine_block": true
101
+ },
102
+ "backbone_kwargs": null,
103
+ "batch_norm_eps": 1e-05,
104
+ "box_noise_scale": 1.0,
105
+ "d_model": 256,
106
+ "decoder_activation_function": "relu",
107
+ "decoder_attention_heads": 8,
108
+ "decoder_ffn_dim": 1024,
109
+ "decoder_in_channels": [
110
+ 256,
111
+ 256,
112
+ 256
113
+ ],
114
+ "decoder_layers": 4,
115
+ "decoder_method": "default",
116
+ "decoder_n_points": [
117
+ 3,
118
+ 6,
119
+ 3
120
+ ],
121
+ "decoder_offset_scale": 0.5,
122
+ "depth_mult": 0.67,
123
+ "dropout": 0.0,
124
+ "encode_proj_layers": [
125
+ 2
126
+ ],
127
+ "encoder_activation_function": "gelu",
128
+ "encoder_attention_heads": 8,
129
+ "encoder_ffn_dim": 1024,
130
+ "encoder_hidden_dim": 256,
131
+ "encoder_in_channels": [
132
+ 384,
133
+ 768,
134
+ 1536
135
+ ],
136
+ "encoder_layers": 1,
137
+ "eos_coefficient": 0.0001,
138
+ "eval_idx": -1,
139
+ "eval_size": null,
140
+ "feat_strides": [
141
+ 8,
142
+ 16,
143
+ 32
144
+ ],
145
+ "focal_loss_alpha": 0.75,
146
+ "focal_loss_gamma": 2.0,
147
+ "freeze_backbone_batch_norms": true,
148
+ "hidden_expansion": 1.0,
149
+ "id2label": {
150
+ "0": "person",
151
+ "1": "bicycle",
152
+ "2": "car",
153
+ "3": "motorbike",
154
+ "4": "aeroplane",
155
+ "5": "bus",
156
+ "6": "train",
157
+ "7": "truck",
158
+ "8": "boat",
159
+ "9": "traffic light",
160
+ "10": "fire hydrant",
161
+ "11": "stop sign",
162
+ "12": "parking meter",
163
+ "13": "bench",
164
+ "14": "bird",
165
+ "15": "cat",
166
+ "16": "dog",
167
+ "17": "horse",
168
+ "18": "sheep",
169
+ "19": "cow",
170
+ "20": "elephant",
171
+ "21": "bear",
172
+ "22": "zebra",
173
+ "23": "giraffe",
174
+ "24": "backpack",
175
+ "25": "umbrella",
176
+ "26": "handbag",
177
+ "27": "tie",
178
+ "28": "suitcase",
179
+ "29": "frisbee",
180
+ "30": "skis",
181
+ "31": "snowboard",
182
+ "32": "sports ball",
183
+ "33": "kite",
184
+ "34": "baseball bat",
185
+ "35": "baseball glove",
186
+ "36": "skateboard",
187
+ "37": "surfboard",
188
+ "38": "tennis racket",
189
+ "39": "bottle",
190
+ "40": "wine glass",
191
+ "41": "cup",
192
+ "42": "fork",
193
+ "43": "knife",
194
+ "44": "spoon",
195
+ "45": "bowl",
196
+ "46": "banana",
197
+ "47": "apple",
198
+ "48": "sandwich",
199
+ "49": "orange",
200
+ "50": "broccoli",
201
+ "51": "carrot",
202
+ "52": "hot dog",
203
+ "53": "pizza",
204
+ "54": "donut",
205
+ "55": "cake",
206
+ "56": "chair",
207
+ "57": "sofa",
208
+ "58": "pottedplant",
209
+ "59": "bed",
210
+ "60": "diningtable",
211
+ "61": "toilet",
212
+ "62": "tvmonitor",
213
+ "63": "laptop",
214
+ "64": "mouse",
215
+ "65": "remote",
216
+ "66": "keyboard",
217
+ "67": "cell phone",
218
+ "68": "microwave",
219
+ "69": "oven",
220
+ "70": "toaster",
221
+ "71": "sink",
222
+ "72": "refrigerator",
223
+ "73": "book",
224
+ "74": "clock",
225
+ "75": "vase",
226
+ "76": "scissors",
227
+ "77": "teddy bear",
228
+ "78": "hair drier",
229
+ "79": "toothbrush"
230
+ },
231
+ "initializer_bias_prior_prob": null,
232
+ "initializer_range": 0.01,
233
+ "is_encoder_decoder": true,
234
+ "label2id": {
235
+ "aeroplane": 4,
236
+ "apple": 47,
237
+ "backpack": 24,
238
+ "banana": 46,
239
+ "baseball bat": 34,
240
+ "baseball glove": 35,
241
+ "bear": 21,
242
+ "bed": 59,
243
+ "bench": 13,
244
+ "bicycle": 1,
245
+ "bird": 14,
246
+ "boat": 8,
247
+ "book": 73,
248
+ "bottle": 39,
249
+ "bowl": 45,
250
+ "broccoli": 50,
251
+ "bus": 5,
252
+ "cake": 55,
253
+ "car": 2,
254
+ "carrot": 51,
255
+ "cat": 15,
256
+ "cell phone": 67,
257
+ "chair": 56,
258
+ "clock": 74,
259
+ "cow": 19,
260
+ "cup": 41,
261
+ "diningtable": 60,
262
+ "dog": 16,
263
+ "donut": 54,
264
+ "elephant": 20,
265
+ "fire hydrant": 10,
266
+ "fork": 42,
267
+ "frisbee": 29,
268
+ "giraffe": 23,
269
+ "hair drier": 78,
270
+ "handbag": 26,
271
+ "horse": 17,
272
+ "hot dog": 52,
273
+ "keyboard": 66,
274
+ "kite": 33,
275
+ "knife": 43,
276
+ "laptop": 63,
277
+ "microwave": 68,
278
+ "motorbike": 3,
279
+ "mouse": 64,
280
+ "orange": 49,
281
+ "oven": 69,
282
+ "parking meter": 12,
283
+ "person": 0,
284
+ "pizza": 53,
285
+ "pottedplant": 58,
286
+ "refrigerator": 72,
287
+ "remote": 65,
288
+ "sandwich": 48,
289
+ "scissors": 76,
290
+ "sheep": 18,
291
+ "sink": 71,
292
+ "skateboard": 36,
293
+ "skis": 30,
294
+ "snowboard": 31,
295
+ "sofa": 57,
296
+ "spoon": 44,
297
+ "sports ball": 32,
298
+ "stop sign": 11,
299
+ "suitcase": 28,
300
+ "surfboard": 37,
301
+ "teddy bear": 77,
302
+ "tennis racket": 38,
303
+ "tie": 27,
304
+ "toaster": 70,
305
+ "toilet": 61,
306
+ "toothbrush": 79,
307
+ "traffic light": 9,
308
+ "train": 6,
309
+ "truck": 7,
310
+ "tvmonitor": 62,
311
+ "umbrella": 25,
312
+ "vase": 75,
313
+ "wine glass": 40,
314
+ "zebra": 22
315
+ },
316
+ "label_noise_ratio": 0.5,
317
+ "layer_norm_eps": 1e-05,
318
+ "layer_scale": 1,
319
+ "learn_initial_query": false,
320
+ "lqe_hidden_dim": 64,
321
+ "lqe_layers": 2,
322
+ "matcher_alpha": 0.25,
323
+ "matcher_bbox_cost": 5.0,
324
+ "matcher_class_cost": 2.0,
325
+ "matcher_gamma": 2.0,
326
+ "matcher_giou_cost": 2.0,
327
+ "max_num_bins": 32,
328
+ "model_type": "d_fine",
329
+ "normalize_before": false,
330
+ "num_denoising": 100,
331
+ "num_feature_levels": 3,
332
+ "num_queries": 300,
333
+ "positional_encoding_temperature": 10000,
334
+ "reg_scale": 4.0,
335
+ "top_prob_values": 4,
336
+ "transformers_version": "4.51.0.dev0",
337
+ "up": 0.5,
338
+ "use_focal_loss": true,
339
+ "use_pretrained_backbone": false,
340
+ "use_timm_backbone": false,
341
+ "weight_loss_bbox": 5.0,
342
+ "weight_loss_ddf": 1.5,
343
+ "weight_loss_fgl": 0.15,
344
+ "weight_loss_giou": 2.0,
345
+ "weight_loss_vfl": 1.0,
346
+ "with_box_refine": true
347
+ }