sbchoi commited on
Commit
48e0948
1 Parent(s): 6f507c6

Upload 6 files

Browse files
Files changed (6) hide show
  1. README.md +11 -1
  2. config.json +328 -0
  3. gitattributes +34 -0
  4. model.safetensors +3 -0
  5. preprocessor_config.json +24 -0
  6. pytorch_model.bin +3 -0
README.md CHANGED
@@ -1,3 +1,13 @@
1
  ---
2
- license: apache-2.0
 
 
3
  ---
 
 
 
 
 
 
 
 
 
1
  ---
2
+ pipeline_tag: object-detection
3
+ tags:
4
+ - vision
5
  ---
6
+ # Detection Transformers with Assignment
7
+
8
+ By [Jeffrey Ouyang-Zhang](https://jozhang97.github.io/), [Jang Hyun Cho](https://sites.google.com/view/janghyuncho/), [Xingyi Zhou](https://www.cs.utexas.edu/~zhouxy/), [Philipp Krähenbühl](http://www.philkr.net/)
9
+
10
+ From the paper [NMS Strikes Back](https://arxiv.org/abs/2212.06137).
11
+
12
+
13
+ **TL; DR.** **De**tection **T**ransformers with **A**ssignment (DETA) re-introduce IoU assignment and NMS for transformer-based detectors. DETA trains and tests comparibly as fast as Deformable-DETR and converges much faster (50.2 mAP in 12 epochs on COCO).
config.json ADDED
@@ -0,0 +1,328 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_commit_hash": null,
3
+ "activation_dropout": 0.0,
4
+ "activation_function": "relu",
5
+ "architectures": [
6
+ "DetaForObjectDetection"
7
+ ],
8
+ "assign_first_stage": true,
9
+ "assign_second_stage": true,
10
+ "attention_dropout": 0.0,
11
+ "auxiliary_loss": true,
12
+ "backbone_config": {
13
+ "_name_or_path": "",
14
+ "add_cross_attention": false,
15
+ "architectures": null,
16
+ "attention_probs_dropout_prob": 0.0,
17
+ "bad_words_ids": null,
18
+ "begin_suppress_tokens": null,
19
+ "bos_token_id": null,
20
+ "chunk_size_feed_forward": 0,
21
+ "cross_attention_hidden_size": null,
22
+ "decoder_start_token_id": null,
23
+ "depths": [
24
+ 2,
25
+ 2,
26
+ 18,
27
+ 2
28
+ ],
29
+ "diversity_penalty": 0.0,
30
+ "do_sample": false,
31
+ "drop_path_rate": 0.1,
32
+ "early_stopping": false,
33
+ "embed_dim": 192,
34
+ "encoder_no_repeat_ngram_size": 0,
35
+ "encoder_stride": 32,
36
+ "eos_token_id": null,
37
+ "exponential_decay_length_penalty": null,
38
+ "finetuning_task": null,
39
+ "forced_bos_token_id": null,
40
+ "forced_eos_token_id": null,
41
+ "hidden_act": "gelu",
42
+ "hidden_dropout_prob": 0.0,
43
+ "hidden_size": 1536,
44
+ "id2label": {
45
+ "0": "LABEL_0",
46
+ "1": "LABEL_1"
47
+ },
48
+ "image_size": 224,
49
+ "initializer_range": 0.02,
50
+ "is_decoder": false,
51
+ "is_encoder_decoder": false,
52
+ "label2id": {
53
+ "LABEL_0": 0,
54
+ "LABEL_1": 1
55
+ },
56
+ "layer_norm_eps": 1e-05,
57
+ "length_penalty": 1.0,
58
+ "max_length": 20,
59
+ "min_length": 0,
60
+ "mlp_ratio": 4.0,
61
+ "model_type": "swin",
62
+ "no_repeat_ngram_size": 0,
63
+ "num_beam_groups": 1,
64
+ "num_beams": 1,
65
+ "num_channels": 3,
66
+ "num_heads": [
67
+ 6,
68
+ 12,
69
+ 24,
70
+ 48
71
+ ],
72
+ "num_layers": 4,
73
+ "num_return_sequences": 1,
74
+ "out_features": [
75
+ "stage2",
76
+ "stage3",
77
+ "stage4"
78
+ ],
79
+ "output_attentions": false,
80
+ "output_hidden_states": false,
81
+ "output_scores": false,
82
+ "pad_token_id": null,
83
+ "patch_size": 4,
84
+ "path_norm": true,
85
+ "prefix": null,
86
+ "problem_type": null,
87
+ "pruned_heads": {},
88
+ "qkv_bias": true,
89
+ "remove_invalid_values": false,
90
+ "repetition_penalty": 1.0,
91
+ "return_dict": true,
92
+ "return_dict_in_generate": false,
93
+ "sep_token_id": null,
94
+ "stage_names": [
95
+ "stem",
96
+ "stage1",
97
+ "stage2",
98
+ "stage3",
99
+ "stage4"
100
+ ],
101
+ "suppress_tokens": null,
102
+ "task_specific_params": null,
103
+ "temperature": 1.0,
104
+ "tf_legacy_loss": false,
105
+ "tie_encoder_decoder": false,
106
+ "tie_word_embeddings": true,
107
+ "tokenizer_class": null,
108
+ "top_k": 50,
109
+ "top_p": 1.0,
110
+ "torch_dtype": null,
111
+ "torchscript": false,
112
+ "transformers_version": "4.27.0.dev0",
113
+ "typical_p": 1.0,
114
+ "use_absolute_embeddings": false,
115
+ "use_bfloat16": false,
116
+ "window_size": 12
117
+ },
118
+ "bbox_cost": 5,
119
+ "bbox_loss_coefficient": 5,
120
+ "class_cost": 1,
121
+ "d_model": 256,
122
+ "decoder_attention_heads": 8,
123
+ "decoder_ffn_dim": 2048,
124
+ "decoder_layerdrop": 0.0,
125
+ "decoder_layers": 6,
126
+ "decoder_n_points": 4,
127
+ "dice_loss_coefficient": 1,
128
+ "dropout": 0.1,
129
+ "encoder_attention_heads": 8,
130
+ "encoder_ffn_dim": 2048,
131
+ "encoder_layerdrop": 0.0,
132
+ "encoder_layers": 6,
133
+ "encoder_n_points": 4,
134
+ "eos_coefficient": 0.1,
135
+ "focal_alpha": 0.25,
136
+ "giou_cost": 2,
137
+ "giou_loss_coefficient": 2,
138
+ "id2label": {
139
+ "0": "N/A",
140
+ "1": "person",
141
+ "2": "bicycle",
142
+ "3": "car",
143
+ "4": "motorcycle",
144
+ "5": "airplane",
145
+ "6": "bus",
146
+ "7": "train",
147
+ "8": "truck",
148
+ "9": "boat",
149
+ "10": "traffic light",
150
+ "11": "fire hydrant",
151
+ "12": "N/A",
152
+ "13": "stop sign",
153
+ "14": "parking meter",
154
+ "15": "bench",
155
+ "16": "bird",
156
+ "17": "cat",
157
+ "18": "dog",
158
+ "19": "horse",
159
+ "20": "sheep",
160
+ "21": "cow",
161
+ "22": "elephant",
162
+ "23": "bear",
163
+ "24": "zebra",
164
+ "25": "giraffe",
165
+ "26": "N/A",
166
+ "27": "backpack",
167
+ "28": "umbrella",
168
+ "29": "N/A",
169
+ "30": "N/A",
170
+ "31": "handbag",
171
+ "32": "tie",
172
+ "33": "suitcase",
173
+ "34": "frisbee",
174
+ "35": "skis",
175
+ "36": "snowboard",
176
+ "37": "sports ball",
177
+ "38": "kite",
178
+ "39": "baseball bat",
179
+ "40": "baseball glove",
180
+ "41": "skateboard",
181
+ "42": "surfboard",
182
+ "43": "tennis racket",
183
+ "44": "bottle",
184
+ "45": "N/A",
185
+ "46": "wine glass",
186
+ "47": "cup",
187
+ "48": "fork",
188
+ "49": "knife",
189
+ "50": "spoon",
190
+ "51": "bowl",
191
+ "52": "banana",
192
+ "53": "apple",
193
+ "54": "sandwich",
194
+ "55": "orange",
195
+ "56": "broccoli",
196
+ "57": "carrot",
197
+ "58": "hot dog",
198
+ "59": "pizza",
199
+ "60": "donut",
200
+ "61": "cake",
201
+ "62": "chair",
202
+ "63": "couch",
203
+ "64": "potted plant",
204
+ "65": "bed",
205
+ "66": "N/A",
206
+ "67": "dining table",
207
+ "68": "N/A",
208
+ "69": "N/A",
209
+ "70": "toilet",
210
+ "71": "N/A",
211
+ "72": "tv",
212
+ "73": "laptop",
213
+ "74": "mouse",
214
+ "75": "remote",
215
+ "76": "keyboard",
216
+ "77": "cell phone",
217
+ "78": "microwave",
218
+ "79": "oven",
219
+ "80": "toaster",
220
+ "81": "sink",
221
+ "82": "refrigerator",
222
+ "83": "N/A",
223
+ "84": "book",
224
+ "85": "clock",
225
+ "86": "vase",
226
+ "87": "scissors",
227
+ "88": "teddy bear",
228
+ "89": "hair drier",
229
+ "90": "toothbrush"
230
+ },
231
+ "init_std": 0.02,
232
+ "init_xavier_std": 1.0,
233
+ "is_encoder_decoder": true,
234
+ "label2id": {
235
+ "N/A": 83,
236
+ "airplane": 5,
237
+ "apple": 53,
238
+ "backpack": 27,
239
+ "banana": 52,
240
+ "baseball bat": 39,
241
+ "baseball glove": 40,
242
+ "bear": 23,
243
+ "bed": 65,
244
+ "bench": 15,
245
+ "bicycle": 2,
246
+ "bird": 16,
247
+ "boat": 9,
248
+ "book": 84,
249
+ "bottle": 44,
250
+ "bowl": 51,
251
+ "broccoli": 56,
252
+ "bus": 6,
253
+ "cake": 61,
254
+ "car": 3,
255
+ "carrot": 57,
256
+ "cat": 17,
257
+ "cell phone": 77,
258
+ "chair": 62,
259
+ "clock": 85,
260
+ "couch": 63,
261
+ "cow": 21,
262
+ "cup": 47,
263
+ "dining table": 67,
264
+ "dog": 18,
265
+ "donut": 60,
266
+ "elephant": 22,
267
+ "fire hydrant": 11,
268
+ "fork": 48,
269
+ "frisbee": 34,
270
+ "giraffe": 25,
271
+ "hair drier": 89,
272
+ "handbag": 31,
273
+ "horse": 19,
274
+ "hot dog": 58,
275
+ "keyboard": 76,
276
+ "kite": 38,
277
+ "knife": 49,
278
+ "laptop": 73,
279
+ "microwave": 78,
280
+ "motorcycle": 4,
281
+ "mouse": 74,
282
+ "orange": 55,
283
+ "oven": 79,
284
+ "parking meter": 14,
285
+ "person": 1,
286
+ "pizza": 59,
287
+ "potted plant": 64,
288
+ "refrigerator": 82,
289
+ "remote": 75,
290
+ "sandwich": 54,
291
+ "scissors": 87,
292
+ "sheep": 20,
293
+ "sink": 81,
294
+ "skateboard": 41,
295
+ "skis": 35,
296
+ "snowboard": 36,
297
+ "spoon": 50,
298
+ "sports ball": 37,
299
+ "stop sign": 13,
300
+ "suitcase": 33,
301
+ "surfboard": 42,
302
+ "teddy bear": 88,
303
+ "tennis racket": 43,
304
+ "tie": 32,
305
+ "toaster": 80,
306
+ "toilet": 70,
307
+ "toothbrush": 90,
308
+ "traffic light": 10,
309
+ "train": 7,
310
+ "truck": 8,
311
+ "tv": 72,
312
+ "umbrella": 28,
313
+ "vase": 86,
314
+ "wine glass": 46,
315
+ "zebra": 24
316
+ },
317
+ "mask_loss_coefficient": 1,
318
+ "max_position_embeddings": 2048,
319
+ "model_type": "deta",
320
+ "num_feature_levels": 5,
321
+ "num_queries": 900,
322
+ "position_embedding_type": "sine",
323
+ "torch_dtype": "float32",
324
+ "transformers_version": null,
325
+ "two_stage": true,
326
+ "two_stage_num_proposals": 900,
327
+ "with_box_refine": true
328
+ }
gitattributes ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tflite filter=lfs diff=lfs merge=lfs -text
29
+ *.tgz filter=lfs diff=lfs merge=lfs -text
30
+ *.wasm filter=lfs diff=lfs merge=lfs -text
31
+ *.xz filter=lfs diff=lfs merge=lfs -text
32
+ *.zip filter=lfs diff=lfs merge=lfs -text
33
+ *.zst filter=lfs diff=lfs merge=lfs -text
34
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e2be6ab0cc12374e16adb7a51bd6e1e67342e63161477b197fca6c8606d473a
3
+ size 879186588
preprocessor_config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": true,
3
+ "do_pad": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "format": "coco_detection",
7
+ "image_mean": [
8
+ 0.485,
9
+ 0.456,
10
+ 0.406
11
+ ],
12
+ "image_processor_type": "DetaImageProcessor",
13
+ "image_std": [
14
+ 0.229,
15
+ 0.224,
16
+ 0.225
17
+ ],
18
+ "resample": 2,
19
+ "rescale_factor": 0.00392156862745098,
20
+ "size": {
21
+ "longest_edge": 1333,
22
+ "shortest_edge": 800
23
+ }
24
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:82e8cd13b7ca76b06b7684534a8ac1e3c2628d57d58cb135ed438861938b5cf2
3
+ size 879370285