anicolson commited on
Commit
ded32c9
1 Parent(s): deea0de

Upload folder using huggingface_hub

Browse files
Files changed (4) hide show
  1. config.json +2268 -0
  2. generation_config.json +6 -0
  3. modelling_medicap.py +518 -0
  4. pytorch_model.bin +3 -0
config.json ADDED
@@ -0,0 +1,2268 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_commit_hash": null,
3
+ "architectures": [
4
+ "MedICapEncoderDecoderModel"
5
+ ],
6
+ "auto_map": {
7
+ "AutoModel": "modelling_medicap.MedICapEncoderDecoderModel"
8
+ },
9
+ "decoder": {
10
+ "_name_or_path": "",
11
+ "_num_labels": 1,
12
+ "activation_function": "gelu_new",
13
+ "add_cross_attention": false,
14
+ "architectures": [
15
+ "GPT2LMHeadModel"
16
+ ],
17
+ "attn_pdrop": 0.1,
18
+ "bad_words_ids": null,
19
+ "begin_suppress_tokens": null,
20
+ "bos_token_id": 50256,
21
+ "chunk_size_feed_forward": 0,
22
+ "cross_attention_hidden_size": null,
23
+ "decoder_start_token_id": null,
24
+ "diversity_penalty": 0.0,
25
+ "do_sample": false,
26
+ "early_stopping": false,
27
+ "embd_pdrop": 0.1,
28
+ "encoder_no_repeat_ngram_size": 0,
29
+ "eos_token_id": 50256,
30
+ "exponential_decay_length_penalty": null,
31
+ "finetuning_task": null,
32
+ "forced_bos_token_id": null,
33
+ "forced_eos_token_id": null,
34
+ "id2label": {
35
+ "0": "LABEL_0"
36
+ },
37
+ "initializer_range": 0.02,
38
+ "is_decoder": true,
39
+ "is_encoder_decoder": false,
40
+ "label2id": {
41
+ "LABEL_0": 0
42
+ },
43
+ "layer_norm_epsilon": 1e-05,
44
+ "length_penalty": 1.0,
45
+ "max_length": 20,
46
+ "min_length": 0,
47
+ "model_type": "gpt2",
48
+ "n_ctx": 1024,
49
+ "n_embd": 768,
50
+ "n_head": 12,
51
+ "n_inner": null,
52
+ "n_layer": 6,
53
+ "n_positions": 1024,
54
+ "no_repeat_ngram_size": 0,
55
+ "num_beam_groups": 1,
56
+ "num_beams": 1,
57
+ "num_return_sequences": 1,
58
+ "output_attentions": false,
59
+ "output_hidden_states": false,
60
+ "output_scores": false,
61
+ "pad_token_id": null,
62
+ "prefix": null,
63
+ "problem_type": null,
64
+ "pruned_heads": {},
65
+ "remove_invalid_values": false,
66
+ "reorder_and_upcast_attn": false,
67
+ "repetition_penalty": 1.0,
68
+ "resid_pdrop": 0.1,
69
+ "return_dict": true,
70
+ "return_dict_in_generate": false,
71
+ "scale_attn_by_inverse_layer_idx": false,
72
+ "scale_attn_weights": true,
73
+ "sep_token_id": null,
74
+ "summary_activation": null,
75
+ "summary_first_dropout": 0.1,
76
+ "summary_proj_to_labels": true,
77
+ "summary_type": "cls_index",
78
+ "summary_use_proj": true,
79
+ "suppress_tokens": null,
80
+ "task_specific_params": {
81
+ "text-generation": {
82
+ "do_sample": true,
83
+ "max_length": 50
84
+ }
85
+ },
86
+ "temperature": 1.0,
87
+ "tf_legacy_loss": false,
88
+ "tie_encoder_decoder": false,
89
+ "tie_word_embeddings": true,
90
+ "tokenizer_class": null,
91
+ "top_k": 50,
92
+ "top_p": 1.0,
93
+ "torch_dtype": null,
94
+ "torchscript": false,
95
+ "transformers_version": "4.31.0",
96
+ "typical_p": 1.0,
97
+ "use_bfloat16": false,
98
+ "use_cache": true,
99
+ "vocab_size": 50259
100
+ },
101
+ "encoder": {
102
+ "_name_or_path": "",
103
+ "add_cross_attention": false,
104
+ "architectures": [
105
+ "CvtForImageClassification"
106
+ ],
107
+ "attention_drop_rate": [
108
+ 0.0,
109
+ 0.0,
110
+ 0.0
111
+ ],
112
+ "bad_words_ids": null,
113
+ "begin_suppress_tokens": null,
114
+ "bos_token_id": null,
115
+ "chunk_size_feed_forward": 0,
116
+ "cls_token": [
117
+ false,
118
+ false,
119
+ true
120
+ ],
121
+ "cross_attention_hidden_size": null,
122
+ "decoder_start_token_id": null,
123
+ "depth": [
124
+ 1,
125
+ 4,
126
+ 16
127
+ ],
128
+ "diversity_penalty": 0.0,
129
+ "do_sample": false,
130
+ "drop_path_rate": [
131
+ 0.0,
132
+ 0.0,
133
+ 0.1
134
+ ],
135
+ "drop_rate": [
136
+ 0.0,
137
+ 0.0,
138
+ 0.0
139
+ ],
140
+ "early_stopping": false,
141
+ "embed_dim": [
142
+ 64,
143
+ 192,
144
+ 384
145
+ ],
146
+ "encoder_no_repeat_ngram_size": 0,
147
+ "eos_token_id": null,
148
+ "exponential_decay_length_penalty": null,
149
+ "finetuning_task": null,
150
+ "forced_bos_token_id": null,
151
+ "forced_eos_token_id": null,
152
+ "id2label": {
153
+ "0": "tench, Tinca tinca",
154
+ "1": "goldfish, Carassius auratus",
155
+ "2": "great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias",
156
+ "3": "tiger shark, Galeocerdo cuvieri",
157
+ "4": "hammerhead, hammerhead shark",
158
+ "5": "electric ray, crampfish, numbfish, torpedo",
159
+ "6": "stingray",
160
+ "7": "cock",
161
+ "8": "hen",
162
+ "9": "ostrich, Struthio camelus",
163
+ "10": "brambling, Fringilla montifringilla",
164
+ "11": "goldfinch, Carduelis carduelis",
165
+ "12": "house finch, linnet, Carpodacus mexicanus",
166
+ "13": "junco, snowbird",
167
+ "14": "indigo bunting, indigo finch, indigo bird, Passerina cyanea",
168
+ "15": "robin, American robin, Turdus migratorius",
169
+ "16": "bulbul",
170
+ "17": "jay",
171
+ "18": "magpie",
172
+ "19": "chickadee",
173
+ "20": "water ouzel, dipper",
174
+ "21": "kite",
175
+ "22": "bald eagle, American eagle, Haliaeetus leucocephalus",
176
+ "23": "vulture",
177
+ "24": "great grey owl, great gray owl, Strix nebulosa",
178
+ "25": "European fire salamander, Salamandra salamandra",
179
+ "26": "common newt, Triturus vulgaris",
180
+ "27": "eft",
181
+ "28": "spotted salamander, Ambystoma maculatum",
182
+ "29": "axolotl, mud puppy, Ambystoma mexicanum",
183
+ "30": "bullfrog, Rana catesbeiana",
184
+ "31": "tree frog, tree-frog",
185
+ "32": "tailed frog, bell toad, ribbed toad, tailed toad, Ascaphus trui",
186
+ "33": "loggerhead, loggerhead turtle, Caretta caretta",
187
+ "34": "leatherback turtle, leatherback, leathery turtle, Dermochelys coriacea",
188
+ "35": "mud turtle",
189
+ "36": "terrapin",
190
+ "37": "box turtle, box tortoise",
191
+ "38": "banded gecko",
192
+ "39": "common iguana, iguana, Iguana iguana",
193
+ "40": "American chameleon, anole, Anolis carolinensis",
194
+ "41": "whiptail, whiptail lizard",
195
+ "42": "agama",
196
+ "43": "frilled lizard, Chlamydosaurus kingi",
197
+ "44": "alligator lizard",
198
+ "45": "Gila monster, Heloderma suspectum",
199
+ "46": "green lizard, Lacerta viridis",
200
+ "47": "African chameleon, Chamaeleo chamaeleon",
201
+ "48": "Komodo dragon, Komodo lizard, dragon lizard, giant lizard, Varanus komodoensis",
202
+ "49": "African crocodile, Nile crocodile, Crocodylus niloticus",
203
+ "50": "American alligator, Alligator mississipiensis",
204
+ "51": "triceratops",
205
+ "52": "thunder snake, worm snake, Carphophis amoenus",
206
+ "53": "ringneck snake, ring-necked snake, ring snake",
207
+ "54": "hognose snake, puff adder, sand viper",
208
+ "55": "green snake, grass snake",
209
+ "56": "king snake, kingsnake",
210
+ "57": "garter snake, grass snake",
211
+ "58": "water snake",
212
+ "59": "vine snake",
213
+ "60": "night snake, Hypsiglena torquata",
214
+ "61": "boa constrictor, Constrictor constrictor",
215
+ "62": "rock python, rock snake, Python sebae",
216
+ "63": "Indian cobra, Naja naja",
217
+ "64": "green mamba",
218
+ "65": "sea snake",
219
+ "66": "horned viper, cerastes, sand viper, horned asp, Cerastes cornutus",
220
+ "67": "diamondback, diamondback rattlesnake, Crotalus adamanteus",
221
+ "68": "sidewinder, horned rattlesnake, Crotalus cerastes",
222
+ "69": "trilobite",
223
+ "70": "harvestman, daddy longlegs, Phalangium opilio",
224
+ "71": "scorpion",
225
+ "72": "black and gold garden spider, Argiope aurantia",
226
+ "73": "barn spider, Araneus cavaticus",
227
+ "74": "garden spider, Aranea diademata",
228
+ "75": "black widow, Latrodectus mactans",
229
+ "76": "tarantula",
230
+ "77": "wolf spider, hunting spider",
231
+ "78": "tick",
232
+ "79": "centipede",
233
+ "80": "black grouse",
234
+ "81": "ptarmigan",
235
+ "82": "ruffed grouse, partridge, Bonasa umbellus",
236
+ "83": "prairie chicken, prairie grouse, prairie fowl",
237
+ "84": "peacock",
238
+ "85": "quail",
239
+ "86": "partridge",
240
+ "87": "African grey, African gray, Psittacus erithacus",
241
+ "88": "macaw",
242
+ "89": "sulphur-crested cockatoo, Kakatoe galerita, Cacatua galerita",
243
+ "90": "lorikeet",
244
+ "91": "coucal",
245
+ "92": "bee eater",
246
+ "93": "hornbill",
247
+ "94": "hummingbird",
248
+ "95": "jacamar",
249
+ "96": "toucan",
250
+ "97": "drake",
251
+ "98": "red-breasted merganser, Mergus serrator",
252
+ "99": "goose",
253
+ "100": "black swan, Cygnus atratus",
254
+ "101": "tusker",
255
+ "102": "echidna, spiny anteater, anteater",
256
+ "103": "platypus, duckbill, duckbilled platypus, duck-billed platypus, Ornithorhynchus anatinus",
257
+ "104": "wallaby, brush kangaroo",
258
+ "105": "koala, koala bear, kangaroo bear, native bear, Phascolarctos cinereus",
259
+ "106": "wombat",
260
+ "107": "jellyfish",
261
+ "108": "sea anemone, anemone",
262
+ "109": "brain coral",
263
+ "110": "flatworm, platyhelminth",
264
+ "111": "nematode, nematode worm, roundworm",
265
+ "112": "conch",
266
+ "113": "snail",
267
+ "114": "slug",
268
+ "115": "sea slug, nudibranch",
269
+ "116": "chiton, coat-of-mail shell, sea cradle, polyplacophore",
270
+ "117": "chambered nautilus, pearly nautilus, nautilus",
271
+ "118": "Dungeness crab, Cancer magister",
272
+ "119": "rock crab, Cancer irroratus",
273
+ "120": "fiddler crab",
274
+ "121": "king crab, Alaska crab, Alaskan king crab, Alaska king crab, Paralithodes camtschatica",
275
+ "122": "American lobster, Northern lobster, Maine lobster, Homarus americanus",
276
+ "123": "spiny lobster, langouste, rock lobster, crawfish, crayfish, sea crawfish",
277
+ "124": "crayfish, crawfish, crawdad, crawdaddy",
278
+ "125": "hermit crab",
279
+ "126": "isopod",
280
+ "127": "white stork, Ciconia ciconia",
281
+ "128": "black stork, Ciconia nigra",
282
+ "129": "spoonbill",
283
+ "130": "flamingo",
284
+ "131": "little blue heron, Egretta caerulea",
285
+ "132": "American egret, great white heron, Egretta albus",
286
+ "133": "bittern",
287
+ "134": "crane",
288
+ "135": "limpkin, Aramus pictus",
289
+ "136": "European gallinule, Porphyrio porphyrio",
290
+ "137": "American coot, marsh hen, mud hen, water hen, Fulica americana",
291
+ "138": "bustard",
292
+ "139": "ruddy turnstone, Arenaria interpres",
293
+ "140": "red-backed sandpiper, dunlin, Erolia alpina",
294
+ "141": "redshank, Tringa totanus",
295
+ "142": "dowitcher",
296
+ "143": "oystercatcher, oyster catcher",
297
+ "144": "pelican",
298
+ "145": "king penguin, Aptenodytes patagonica",
299
+ "146": "albatross, mollymawk",
300
+ "147": "grey whale, gray whale, devilfish, Eschrichtius gibbosus, Eschrichtius robustus",
301
+ "148": "killer whale, killer, orca, grampus, sea wolf, Orcinus orca",
302
+ "149": "dugong, Dugong dugon",
303
+ "150": "sea lion",
304
+ "151": "Chihuahua",
305
+ "152": "Japanese spaniel",
306
+ "153": "Maltese dog, Maltese terrier, Maltese",
307
+ "154": "Pekinese, Pekingese, Peke",
308
+ "155": "Shih-Tzu",
309
+ "156": "Blenheim spaniel",
310
+ "157": "papillon",
311
+ "158": "toy terrier",
312
+ "159": "Rhodesian ridgeback",
313
+ "160": "Afghan hound, Afghan",
314
+ "161": "basset, basset hound",
315
+ "162": "beagle",
316
+ "163": "bloodhound, sleuthhound",
317
+ "164": "bluetick",
318
+ "165": "black-and-tan coonhound",
319
+ "166": "Walker hound, Walker foxhound",
320
+ "167": "English foxhound",
321
+ "168": "redbone",
322
+ "169": "borzoi, Russian wolfhound",
323
+ "170": "Irish wolfhound",
324
+ "171": "Italian greyhound",
325
+ "172": "whippet",
326
+ "173": "Ibizan hound, Ibizan Podenco",
327
+ "174": "Norwegian elkhound, elkhound",
328
+ "175": "otterhound, otter hound",
329
+ "176": "Saluki, gazelle hound",
330
+ "177": "Scottish deerhound, deerhound",
331
+ "178": "Weimaraner",
332
+ "179": "Staffordshire bullterrier, Staffordshire bull terrier",
333
+ "180": "American Staffordshire terrier, Staffordshire terrier, American pit bull terrier, pit bull terrier",
334
+ "181": "Bedlington terrier",
335
+ "182": "Border terrier",
336
+ "183": "Kerry blue terrier",
337
+ "184": "Irish terrier",
338
+ "185": "Norfolk terrier",
339
+ "186": "Norwich terrier",
340
+ "187": "Yorkshire terrier",
341
+ "188": "wire-haired fox terrier",
342
+ "189": "Lakeland terrier",
343
+ "190": "Sealyham terrier, Sealyham",
344
+ "191": "Airedale, Airedale terrier",
345
+ "192": "cairn, cairn terrier",
346
+ "193": "Australian terrier",
347
+ "194": "Dandie Dinmont, Dandie Dinmont terrier",
348
+ "195": "Boston bull, Boston terrier",
349
+ "196": "miniature schnauzer",
350
+ "197": "giant schnauzer",
351
+ "198": "standard schnauzer",
352
+ "199": "Scotch terrier, Scottish terrier, Scottie",
353
+ "200": "Tibetan terrier, chrysanthemum dog",
354
+ "201": "silky terrier, Sydney silky",
355
+ "202": "soft-coated wheaten terrier",
356
+ "203": "West Highland white terrier",
357
+ "204": "Lhasa, Lhasa apso",
358
+ "205": "flat-coated retriever",
359
+ "206": "curly-coated retriever",
360
+ "207": "golden retriever",
361
+ "208": "Labrador retriever",
362
+ "209": "Chesapeake Bay retriever",
363
+ "210": "German short-haired pointer",
364
+ "211": "vizsla, Hungarian pointer",
365
+ "212": "English setter",
366
+ "213": "Irish setter, red setter",
367
+ "214": "Gordon setter",
368
+ "215": "Brittany spaniel",
369
+ "216": "clumber, clumber spaniel",
370
+ "217": "English springer, English springer spaniel",
371
+ "218": "Welsh springer spaniel",
372
+ "219": "cocker spaniel, English cocker spaniel, cocker",
373
+ "220": "Sussex spaniel",
374
+ "221": "Irish water spaniel",
375
+ "222": "kuvasz",
376
+ "223": "schipperke",
377
+ "224": "groenendael",
378
+ "225": "malinois",
379
+ "226": "briard",
380
+ "227": "kelpie",
381
+ "228": "komondor",
382
+ "229": "Old English sheepdog, bobtail",
383
+ "230": "Shetland sheepdog, Shetland sheep dog, Shetland",
384
+ "231": "collie",
385
+ "232": "Border collie",
386
+ "233": "Bouvier des Flandres, Bouviers des Flandres",
387
+ "234": "Rottweiler",
388
+ "235": "German shepherd, German shepherd dog, German police dog, alsatian",
389
+ "236": "Doberman, Doberman pinscher",
390
+ "237": "miniature pinscher",
391
+ "238": "Greater Swiss Mountain dog",
392
+ "239": "Bernese mountain dog",
393
+ "240": "Appenzeller",
394
+ "241": "EntleBucher",
395
+ "242": "boxer",
396
+ "243": "bull mastiff",
397
+ "244": "Tibetan mastiff",
398
+ "245": "French bulldog",
399
+ "246": "Great Dane",
400
+ "247": "Saint Bernard, St Bernard",
401
+ "248": "Eskimo dog, husky",
402
+ "249": "malamute, malemute, Alaskan malamute",
403
+ "250": "Siberian husky",
404
+ "251": "dalmatian, coach dog, carriage dog",
405
+ "252": "affenpinscher, monkey pinscher, monkey dog",
406
+ "253": "basenji",
407
+ "254": "pug, pug-dog",
408
+ "255": "Leonberg",
409
+ "256": "Newfoundland, Newfoundland dog",
410
+ "257": "Great Pyrenees",
411
+ "258": "Samoyed, Samoyede",
412
+ "259": "Pomeranian",
413
+ "260": "chow, chow chow",
414
+ "261": "keeshond",
415
+ "262": "Brabancon griffon",
416
+ "263": "Pembroke, Pembroke Welsh corgi",
417
+ "264": "Cardigan, Cardigan Welsh corgi",
418
+ "265": "toy poodle",
419
+ "266": "miniature poodle",
420
+ "267": "standard poodle",
421
+ "268": "Mexican hairless",
422
+ "269": "timber wolf, grey wolf, gray wolf, Canis lupus",
423
+ "270": "white wolf, Arctic wolf, Canis lupus tundrarum",
424
+ "271": "red wolf, maned wolf, Canis rufus, Canis niger",
425
+ "272": "coyote, prairie wolf, brush wolf, Canis latrans",
426
+ "273": "dingo, warrigal, warragal, Canis dingo",
427
+ "274": "dhole, Cuon alpinus",
428
+ "275": "African hunting dog, hyena dog, Cape hunting dog, Lycaon pictus",
429
+ "276": "hyena, hyaena",
430
+ "277": "red fox, Vulpes vulpes",
431
+ "278": "kit fox, Vulpes macrotis",
432
+ "279": "Arctic fox, white fox, Alopex lagopus",
433
+ "280": "grey fox, gray fox, Urocyon cinereoargenteus",
434
+ "281": "tabby, tabby cat",
435
+ "282": "tiger cat",
436
+ "283": "Persian cat",
437
+ "284": "Siamese cat, Siamese",
438
+ "285": "Egyptian cat",
439
+ "286": "cougar, puma, catamount, mountain lion, painter, panther, Felis concolor",
440
+ "287": "lynx, catamount",
441
+ "288": "leopard, Panthera pardus",
442
+ "289": "snow leopard, ounce, Panthera uncia",
443
+ "290": "jaguar, panther, Panthera onca, Felis onca",
444
+ "291": "lion, king of beasts, Panthera leo",
445
+ "292": "tiger, Panthera tigris",
446
+ "293": "cheetah, chetah, Acinonyx jubatus",
447
+ "294": "brown bear, bruin, Ursus arctos",
448
+ "295": "American black bear, black bear, Ursus americanus, Euarctos americanus",
449
+ "296": "ice bear, polar bear, Ursus Maritimus, Thalarctos maritimus",
450
+ "297": "sloth bear, Melursus ursinus, Ursus ursinus",
451
+ "298": "mongoose",
452
+ "299": "meerkat, mierkat",
453
+ "300": "tiger beetle",
454
+ "301": "ladybug, ladybeetle, lady beetle, ladybird, ladybird beetle",
455
+ "302": "ground beetle, carabid beetle",
456
+ "303": "long-horned beetle, longicorn, longicorn beetle",
457
+ "304": "leaf beetle, chrysomelid",
458
+ "305": "dung beetle",
459
+ "306": "rhinoceros beetle",
460
+ "307": "weevil",
461
+ "308": "fly",
462
+ "309": "bee",
463
+ "310": "ant, emmet, pismire",
464
+ "311": "grasshopper, hopper",
465
+ "312": "cricket",
466
+ "313": "walking stick, walkingstick, stick insect",
467
+ "314": "cockroach, roach",
468
+ "315": "mantis, mantid",
469
+ "316": "cicada, cicala",
470
+ "317": "leafhopper",
471
+ "318": "lacewing, lacewing fly",
472
+ "319": "dragonfly, darning needle, devil's darning needle, sewing needle, snake feeder, snake doctor, mosquito hawk, skeeter hawk",
473
+ "320": "damselfly",
474
+ "321": "admiral",
475
+ "322": "ringlet, ringlet butterfly",
476
+ "323": "monarch, monarch butterfly, milkweed butterfly, Danaus plexippus",
477
+ "324": "cabbage butterfly",
478
+ "325": "sulphur butterfly, sulfur butterfly",
479
+ "326": "lycaenid, lycaenid butterfly",
480
+ "327": "starfish, sea star",
481
+ "328": "sea urchin",
482
+ "329": "sea cucumber, holothurian",
483
+ "330": "wood rabbit, cottontail, cottontail rabbit",
484
+ "331": "hare",
485
+ "332": "Angora, Angora rabbit",
486
+ "333": "hamster",
487
+ "334": "porcupine, hedgehog",
488
+ "335": "fox squirrel, eastern fox squirrel, Sciurus niger",
489
+ "336": "marmot",
490
+ "337": "beaver",
491
+ "338": "guinea pig, Cavia cobaya",
492
+ "339": "sorrel",
493
+ "340": "zebra",
494
+ "341": "hog, pig, grunter, squealer, Sus scrofa",
495
+ "342": "wild boar, boar, Sus scrofa",
496
+ "343": "warthog",
497
+ "344": "hippopotamus, hippo, river horse, Hippopotamus amphibius",
498
+ "345": "ox",
499
+ "346": "water buffalo, water ox, Asiatic buffalo, Bubalus bubalis",
500
+ "347": "bison",
501
+ "348": "ram, tup",
502
+ "349": "bighorn, bighorn sheep, cimarron, Rocky Mountain bighorn, Rocky Mountain sheep, Ovis canadensis",
503
+ "350": "ibex, Capra ibex",
504
+ "351": "hartebeest",
505
+ "352": "impala, Aepyceros melampus",
506
+ "353": "gazelle",
507
+ "354": "Arabian camel, dromedary, Camelus dromedarius",
508
+ "355": "llama",
509
+ "356": "weasel",
510
+ "357": "mink",
511
+ "358": "polecat, fitch, foulmart, foumart, Mustela putorius",
512
+ "359": "black-footed ferret, ferret, Mustela nigripes",
513
+ "360": "otter",
514
+ "361": "skunk, polecat, wood pussy",
515
+ "362": "badger",
516
+ "363": "armadillo",
517
+ "364": "three-toed sloth, ai, Bradypus tridactylus",
518
+ "365": "orangutan, orang, orangutang, Pongo pygmaeus",
519
+ "366": "gorilla, Gorilla gorilla",
520
+ "367": "chimpanzee, chimp, Pan troglodytes",
521
+ "368": "gibbon, Hylobates lar",
522
+ "369": "siamang, Hylobates syndactylus, Symphalangus syndactylus",
523
+ "370": "guenon, guenon monkey",
524
+ "371": "patas, hussar monkey, Erythrocebus patas",
525
+ "372": "baboon",
526
+ "373": "macaque",
527
+ "374": "langur",
528
+ "375": "colobus, colobus monkey",
529
+ "376": "proboscis monkey, Nasalis larvatus",
530
+ "377": "marmoset",
531
+ "378": "capuchin, ringtail, Cebus capucinus",
532
+ "379": "howler monkey, howler",
533
+ "380": "titi, titi monkey",
534
+ "381": "spider monkey, Ateles geoffroyi",
535
+ "382": "squirrel monkey, Saimiri sciureus",
536
+ "383": "Madagascar cat, ring-tailed lemur, Lemur catta",
537
+ "384": "indri, indris, Indri indri, Indri brevicaudatus",
538
+ "385": "Indian elephant, Elephas maximus",
539
+ "386": "African elephant, Loxodonta africana",
540
+ "387": "lesser panda, red panda, panda, bear cat, cat bear, Ailurus fulgens",
541
+ "388": "giant panda, panda, panda bear, coon bear, Ailuropoda melanoleuca",
542
+ "389": "barracouta, snoek",
543
+ "390": "eel",
544
+ "391": "coho, cohoe, coho salmon, blue jack, silver salmon, Oncorhynchus kisutch",
545
+ "392": "rock beauty, Holocanthus tricolor",
546
+ "393": "anemone fish",
547
+ "394": "sturgeon",
548
+ "395": "gar, garfish, garpike, billfish, Lepisosteus osseus",
549
+ "396": "lionfish",
550
+ "397": "puffer, pufferfish, blowfish, globefish",
551
+ "398": "abacus",
552
+ "399": "abaya",
553
+ "400": "academic gown, academic robe, judge's robe",
554
+ "401": "accordion, piano accordion, squeeze box",
555
+ "402": "acoustic guitar",
556
+ "403": "aircraft carrier, carrier, flattop, attack aircraft carrier",
557
+ "404": "airliner",
558
+ "405": "airship, dirigible",
559
+ "406": "altar",
560
+ "407": "ambulance",
561
+ "408": "amphibian, amphibious vehicle",
562
+ "409": "analog clock",
563
+ "410": "apiary, bee house",
564
+ "411": "apron",
565
+ "412": "ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, dustbin, trash barrel, trash bin",
566
+ "413": "assault rifle, assault gun",
567
+ "414": "backpack, back pack, knapsack, packsack, rucksack, haversack",
568
+ "415": "bakery, bakeshop, bakehouse",
569
+ "416": "balance beam, beam",
570
+ "417": "balloon",
571
+ "418": "ballpoint, ballpoint pen, ballpen, Biro",
572
+ "419": "Band Aid",
573
+ "420": "banjo",
574
+ "421": "bannister, banister, balustrade, balusters, handrail",
575
+ "422": "barbell",
576
+ "423": "barber chair",
577
+ "424": "barbershop",
578
+ "425": "barn",
579
+ "426": "barometer",
580
+ "427": "barrel, cask",
581
+ "428": "barrow, garden cart, lawn cart, wheelbarrow",
582
+ "429": "baseball",
583
+ "430": "basketball",
584
+ "431": "bassinet",
585
+ "432": "bassoon",
586
+ "433": "bathing cap, swimming cap",
587
+ "434": "bath towel",
588
+ "435": "bathtub, bathing tub, bath, tub",
589
+ "436": "beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon",
590
+ "437": "beacon, lighthouse, beacon light, pharos",
591
+ "438": "beaker",
592
+ "439": "bearskin, busby, shako",
593
+ "440": "beer bottle",
594
+ "441": "beer glass",
595
+ "442": "bell cote, bell cot",
596
+ "443": "bib",
597
+ "444": "bicycle-built-for-two, tandem bicycle, tandem",
598
+ "445": "bikini, two-piece",
599
+ "446": "binder, ring-binder",
600
+ "447": "binoculars, field glasses, opera glasses",
601
+ "448": "birdhouse",
602
+ "449": "boathouse",
603
+ "450": "bobsled, bobsleigh, bob",
604
+ "451": "bolo tie, bolo, bola tie, bola",
605
+ "452": "bonnet, poke bonnet",
606
+ "453": "bookcase",
607
+ "454": "bookshop, bookstore, bookstall",
608
+ "455": "bottlecap",
609
+ "456": "bow",
610
+ "457": "bow tie, bow-tie, bowtie",
611
+ "458": "brass, memorial tablet, plaque",
612
+ "459": "brassiere, bra, bandeau",
613
+ "460": "breakwater, groin, groyne, mole, bulwark, seawall, jetty",
614
+ "461": "breastplate, aegis, egis",
615
+ "462": "broom",
616
+ "463": "bucket, pail",
617
+ "464": "buckle",
618
+ "465": "bulletproof vest",
619
+ "466": "bullet train, bullet",
620
+ "467": "butcher shop, meat market",
621
+ "468": "cab, hack, taxi, taxicab",
622
+ "469": "caldron, cauldron",
623
+ "470": "candle, taper, wax light",
624
+ "471": "cannon",
625
+ "472": "canoe",
626
+ "473": "can opener, tin opener",
627
+ "474": "cardigan",
628
+ "475": "car mirror",
629
+ "476": "carousel, carrousel, merry-go-round, roundabout, whirligig",
630
+ "477": "carpenter's kit, tool kit",
631
+ "478": "carton",
632
+ "479": "car wheel",
633
+ "480": "cash machine, cash dispenser, automated teller machine, automatic teller machine, automated teller, automatic teller, ATM",
634
+ "481": "cassette",
635
+ "482": "cassette player",
636
+ "483": "castle",
637
+ "484": "catamaran",
638
+ "485": "CD player",
639
+ "486": "cello, violoncello",
640
+ "487": "cellular telephone, cellular phone, cellphone, cell, mobile phone",
641
+ "488": "chain",
642
+ "489": "chainlink fence",
643
+ "490": "chain mail, ring mail, mail, chain armor, chain armour, ring armor, ring armour",
644
+ "491": "chain saw, chainsaw",
645
+ "492": "chest",
646
+ "493": "chiffonier, commode",
647
+ "494": "chime, bell, gong",
648
+ "495": "china cabinet, china closet",
649
+ "496": "Christmas stocking",
650
+ "497": "church, church building",
651
+ "498": "cinema, movie theater, movie theatre, movie house, picture palace",
652
+ "499": "cleaver, meat cleaver, chopper",
653
+ "500": "cliff dwelling",
654
+ "501": "cloak",
655
+ "502": "clog, geta, patten, sabot",
656
+ "503": "cocktail shaker",
657
+ "504": "coffee mug",
658
+ "505": "coffeepot",
659
+ "506": "coil, spiral, volute, whorl, helix",
660
+ "507": "combination lock",
661
+ "508": "computer keyboard, keypad",
662
+ "509": "confectionery, confectionary, candy store",
663
+ "510": "container ship, containership, container vessel",
664
+ "511": "convertible",
665
+ "512": "corkscrew, bottle screw",
666
+ "513": "cornet, horn, trumpet, trump",
667
+ "514": "cowboy boot",
668
+ "515": "cowboy hat, ten-gallon hat",
669
+ "516": "cradle",
670
+ "517": "crane",
671
+ "518": "crash helmet",
672
+ "519": "crate",
673
+ "520": "crib, cot",
674
+ "521": "Crock Pot",
675
+ "522": "croquet ball",
676
+ "523": "crutch",
677
+ "524": "cuirass",
678
+ "525": "dam, dike, dyke",
679
+ "526": "desk",
680
+ "527": "desktop computer",
681
+ "528": "dial telephone, dial phone",
682
+ "529": "diaper, nappy, napkin",
683
+ "530": "digital clock",
684
+ "531": "digital watch",
685
+ "532": "dining table, board",
686
+ "533": "dishrag, dishcloth",
687
+ "534": "dishwasher, dish washer, dishwashing machine",
688
+ "535": "disk brake, disc brake",
689
+ "536": "dock, dockage, docking facility",
690
+ "537": "dogsled, dog sled, dog sleigh",
691
+ "538": "dome",
692
+ "539": "doormat, welcome mat",
693
+ "540": "drilling platform, offshore rig",
694
+ "541": "drum, membranophone, tympan",
695
+ "542": "drumstick",
696
+ "543": "dumbbell",
697
+ "544": "Dutch oven",
698
+ "545": "electric fan, blower",
699
+ "546": "electric guitar",
700
+ "547": "electric locomotive",
701
+ "548": "entertainment center",
702
+ "549": "envelope",
703
+ "550": "espresso maker",
704
+ "551": "face powder",
705
+ "552": "feather boa, boa",
706
+ "553": "file, file cabinet, filing cabinet",
707
+ "554": "fireboat",
708
+ "555": "fire engine, fire truck",
709
+ "556": "fire screen, fireguard",
710
+ "557": "flagpole, flagstaff",
711
+ "558": "flute, transverse flute",
712
+ "559": "folding chair",
713
+ "560": "football helmet",
714
+ "561": "forklift",
715
+ "562": "fountain",
716
+ "563": "fountain pen",
717
+ "564": "four-poster",
718
+ "565": "freight car",
719
+ "566": "French horn, horn",
720
+ "567": "frying pan, frypan, skillet",
721
+ "568": "fur coat",
722
+ "569": "garbage truck, dustcart",
723
+ "570": "gasmask, respirator, gas helmet",
724
+ "571": "gas pump, gasoline pump, petrol pump, island dispenser",
725
+ "572": "goblet",
726
+ "573": "go-kart",
727
+ "574": "golf ball",
728
+ "575": "golfcart, golf cart",
729
+ "576": "gondola",
730
+ "577": "gong, tam-tam",
731
+ "578": "gown",
732
+ "579": "grand piano, grand",
733
+ "580": "greenhouse, nursery, glasshouse",
734
+ "581": "grille, radiator grille",
735
+ "582": "grocery store, grocery, food market, market",
736
+ "583": "guillotine",
737
+ "584": "hair slide",
738
+ "585": "hair spray",
739
+ "586": "half track",
740
+ "587": "hammer",
741
+ "588": "hamper",
742
+ "589": "hand blower, blow dryer, blow drier, hair dryer, hair drier",
743
+ "590": "hand-held computer, hand-held microcomputer",
744
+ "591": "handkerchief, hankie, hanky, hankey",
745
+ "592": "hard disc, hard disk, fixed disk",
746
+ "593": "harmonica, mouth organ, harp, mouth harp",
747
+ "594": "harp",
748
+ "595": "harvester, reaper",
749
+ "596": "hatchet",
750
+ "597": "holster",
751
+ "598": "home theater, home theatre",
752
+ "599": "honeycomb",
753
+ "600": "hook, claw",
754
+ "601": "hoopskirt, crinoline",
755
+ "602": "horizontal bar, high bar",
756
+ "603": "horse cart, horse-cart",
757
+ "604": "hourglass",
758
+ "605": "iPod",
759
+ "606": "iron, smoothing iron",
760
+ "607": "jack-o'-lantern",
761
+ "608": "jean, blue jean, denim",
762
+ "609": "jeep, landrover",
763
+ "610": "jersey, T-shirt, tee shirt",
764
+ "611": "jigsaw puzzle",
765
+ "612": "jinrikisha, ricksha, rickshaw",
766
+ "613": "joystick",
767
+ "614": "kimono",
768
+ "615": "knee pad",
769
+ "616": "knot",
770
+ "617": "lab coat, laboratory coat",
771
+ "618": "ladle",
772
+ "619": "lampshade, lamp shade",
773
+ "620": "laptop, laptop computer",
774
+ "621": "lawn mower, mower",
775
+ "622": "lens cap, lens cover",
776
+ "623": "letter opener, paper knife, paperknife",
777
+ "624": "library",
778
+ "625": "lifeboat",
779
+ "626": "lighter, light, igniter, ignitor",
780
+ "627": "limousine, limo",
781
+ "628": "liner, ocean liner",
782
+ "629": "lipstick, lip rouge",
783
+ "630": "Loafer",
784
+ "631": "lotion",
785
+ "632": "loudspeaker, speaker, speaker unit, loudspeaker system, speaker system",
786
+ "633": "loupe, jeweler's loupe",
787
+ "634": "lumbermill, sawmill",
788
+ "635": "magnetic compass",
789
+ "636": "mailbag, postbag",
790
+ "637": "mailbox, letter box",
791
+ "638": "maillot",
792
+ "639": "maillot, tank suit",
793
+ "640": "manhole cover",
794
+ "641": "maraca",
795
+ "642": "marimba, xylophone",
796
+ "643": "mask",
797
+ "644": "matchstick",
798
+ "645": "maypole",
799
+ "646": "maze, labyrinth",
800
+ "647": "measuring cup",
801
+ "648": "medicine chest, medicine cabinet",
802
+ "649": "megalith, megalithic structure",
803
+ "650": "microphone, mike",
804
+ "651": "microwave, microwave oven",
805
+ "652": "military uniform",
806
+ "653": "milk can",
807
+ "654": "minibus",
808
+ "655": "miniskirt, mini",
809
+ "656": "minivan",
810
+ "657": "missile",
811
+ "658": "mitten",
812
+ "659": "mixing bowl",
813
+ "660": "mobile home, manufactured home",
814
+ "661": "Model T",
815
+ "662": "modem",
816
+ "663": "monastery",
817
+ "664": "monitor",
818
+ "665": "moped",
819
+ "666": "mortar",
820
+ "667": "mortarboard",
821
+ "668": "mosque",
822
+ "669": "mosquito net",
823
+ "670": "motor scooter, scooter",
824
+ "671": "mountain bike, all-terrain bike, off-roader",
825
+ "672": "mountain tent",
826
+ "673": "mouse, computer mouse",
827
+ "674": "mousetrap",
828
+ "675": "moving van",
829
+ "676": "muzzle",
830
+ "677": "nail",
831
+ "678": "neck brace",
832
+ "679": "necklace",
833
+ "680": "nipple",
834
+ "681": "notebook, notebook computer",
835
+ "682": "obelisk",
836
+ "683": "oboe, hautboy, hautbois",
837
+ "684": "ocarina, sweet potato",
838
+ "685": "odometer, hodometer, mileometer, milometer",
839
+ "686": "oil filter",
840
+ "687": "organ, pipe organ",
841
+ "688": "oscilloscope, scope, cathode-ray oscilloscope, CRO",
842
+ "689": "overskirt",
843
+ "690": "oxcart",
844
+ "691": "oxygen mask",
845
+ "692": "packet",
846
+ "693": "paddle, boat paddle",
847
+ "694": "paddlewheel, paddle wheel",
848
+ "695": "padlock",
849
+ "696": "paintbrush",
850
+ "697": "pajama, pyjama, pj's, jammies",
851
+ "698": "palace",
852
+ "699": "panpipe, pandean pipe, syrinx",
853
+ "700": "paper towel",
854
+ "701": "parachute, chute",
855
+ "702": "parallel bars, bars",
856
+ "703": "park bench",
857
+ "704": "parking meter",
858
+ "705": "passenger car, coach, carriage",
859
+ "706": "patio, terrace",
860
+ "707": "pay-phone, pay-station",
861
+ "708": "pedestal, plinth, footstall",
862
+ "709": "pencil box, pencil case",
863
+ "710": "pencil sharpener",
864
+ "711": "perfume, essence",
865
+ "712": "Petri dish",
866
+ "713": "photocopier",
867
+ "714": "pick, plectrum, plectron",
868
+ "715": "pickelhaube",
869
+ "716": "picket fence, paling",
870
+ "717": "pickup, pickup truck",
871
+ "718": "pier",
872
+ "719": "piggy bank, penny bank",
873
+ "720": "pill bottle",
874
+ "721": "pillow",
875
+ "722": "ping-pong ball",
876
+ "723": "pinwheel",
877
+ "724": "pirate, pirate ship",
878
+ "725": "pitcher, ewer",
879
+ "726": "plane, carpenter's plane, woodworking plane",
880
+ "727": "planetarium",
881
+ "728": "plastic bag",
882
+ "729": "plate rack",
883
+ "730": "plow, plough",
884
+ "731": "plunger, plumber's helper",
885
+ "732": "Polaroid camera, Polaroid Land camera",
886
+ "733": "pole",
887
+ "734": "police van, police wagon, paddy wagon, patrol wagon, wagon, black Maria",
888
+ "735": "poncho",
889
+ "736": "pool table, billiard table, snooker table",
890
+ "737": "pop bottle, soda bottle",
891
+ "738": "pot, flowerpot",
892
+ "739": "potter's wheel",
893
+ "740": "power drill",
894
+ "741": "prayer rug, prayer mat",
895
+ "742": "printer",
896
+ "743": "prison, prison house",
897
+ "744": "projectile, missile",
898
+ "745": "projector",
899
+ "746": "puck, hockey puck",
900
+ "747": "punching bag, punch bag, punching ball, punchball",
901
+ "748": "purse",
902
+ "749": "quill, quill pen",
903
+ "750": "quilt, comforter, comfort, puff",
904
+ "751": "racer, race car, racing car",
905
+ "752": "racket, racquet",
906
+ "753": "radiator",
907
+ "754": "radio, wireless",
908
+ "755": "radio telescope, radio reflector",
909
+ "756": "rain barrel",
910
+ "757": "recreational vehicle, RV, R.V.",
911
+ "758": "reel",
912
+ "759": "reflex camera",
913
+ "760": "refrigerator, icebox",
914
+ "761": "remote control, remote",
915
+ "762": "restaurant, eating house, eating place, eatery",
916
+ "763": "revolver, six-gun, six-shooter",
917
+ "764": "rifle",
918
+ "765": "rocking chair, rocker",
919
+ "766": "rotisserie",
920
+ "767": "rubber eraser, rubber, pencil eraser",
921
+ "768": "rugby ball",
922
+ "769": "rule, ruler",
923
+ "770": "running shoe",
924
+ "771": "safe",
925
+ "772": "safety pin",
926
+ "773": "saltshaker, salt shaker",
927
+ "774": "sandal",
928
+ "775": "sarong",
929
+ "776": "sax, saxophone",
930
+ "777": "scabbard",
931
+ "778": "scale, weighing machine",
932
+ "779": "school bus",
933
+ "780": "schooner",
934
+ "781": "scoreboard",
935
+ "782": "screen, CRT screen",
936
+ "783": "screw",
937
+ "784": "screwdriver",
938
+ "785": "seat belt, seatbelt",
939
+ "786": "sewing machine",
940
+ "787": "shield, buckler",
941
+ "788": "shoe shop, shoe-shop, shoe store",
942
+ "789": "shoji",
943
+ "790": "shopping basket",
944
+ "791": "shopping cart",
945
+ "792": "shovel",
946
+ "793": "shower cap",
947
+ "794": "shower curtain",
948
+ "795": "ski",
949
+ "796": "ski mask",
950
+ "797": "sleeping bag",
951
+ "798": "slide rule, slipstick",
952
+ "799": "sliding door",
953
+ "800": "slot, one-armed bandit",
954
+ "801": "snorkel",
955
+ "802": "snowmobile",
956
+ "803": "snowplow, snowplough",
957
+ "804": "soap dispenser",
958
+ "805": "soccer ball",
959
+ "806": "sock",
960
+ "807": "solar dish, solar collector, solar furnace",
961
+ "808": "sombrero",
962
+ "809": "soup bowl",
963
+ "810": "space bar",
964
+ "811": "space heater",
965
+ "812": "space shuttle",
966
+ "813": "spatula",
967
+ "814": "speedboat",
968
+ "815": "spider web, spider's web",
969
+ "816": "spindle",
970
+ "817": "sports car, sport car",
971
+ "818": "spotlight, spot",
972
+ "819": "stage",
973
+ "820": "steam locomotive",
974
+ "821": "steel arch bridge",
975
+ "822": "steel drum",
976
+ "823": "stethoscope",
977
+ "824": "stole",
978
+ "825": "stone wall",
979
+ "826": "stopwatch, stop watch",
980
+ "827": "stove",
981
+ "828": "strainer",
982
+ "829": "streetcar, tram, tramcar, trolley, trolley car",
983
+ "830": "stretcher",
984
+ "831": "studio couch, day bed",
985
+ "832": "stupa, tope",
986
+ "833": "submarine, pigboat, sub, U-boat",
987
+ "834": "suit, suit of clothes",
988
+ "835": "sundial",
989
+ "836": "sunglass",
990
+ "837": "sunglasses, dark glasses, shades",
991
+ "838": "sunscreen, sunblock, sun blocker",
992
+ "839": "suspension bridge",
993
+ "840": "swab, swob, mop",
994
+ "841": "sweatshirt",
995
+ "842": "swimming trunks, bathing trunks",
996
+ "843": "swing",
997
+ "844": "switch, electric switch, electrical switch",
998
+ "845": "syringe",
999
+ "846": "table lamp",
1000
+ "847": "tank, army tank, armored combat vehicle, armoured combat vehicle",
1001
+ "848": "tape player",
1002
+ "849": "teapot",
1003
+ "850": "teddy, teddy bear",
1004
+ "851": "television, television system",
1005
+ "852": "tennis ball",
1006
+ "853": "thatch, thatched roof",
1007
+ "854": "theater curtain, theatre curtain",
1008
+ "855": "thimble",
1009
+ "856": "thresher, thrasher, threshing machine",
1010
+ "857": "throne",
1011
+ "858": "tile roof",
1012
+ "859": "toaster",
1013
+ "860": "tobacco shop, tobacconist shop, tobacconist",
1014
+ "861": "toilet seat",
1015
+ "862": "torch",
1016
+ "863": "totem pole",
1017
+ "864": "tow truck, tow car, wrecker",
1018
+ "865": "toyshop",
1019
+ "866": "tractor",
1020
+ "867": "trailer truck, tractor trailer, trucking rig, rig, articulated lorry, semi",
1021
+ "868": "tray",
1022
+ "869": "trench coat",
1023
+ "870": "tricycle, trike, velocipede",
1024
+ "871": "trimaran",
1025
+ "872": "tripod",
1026
+ "873": "triumphal arch",
1027
+ "874": "trolleybus, trolley coach, trackless trolley",
1028
+ "875": "trombone",
1029
+ "876": "tub, vat",
1030
+ "877": "turnstile",
1031
+ "878": "typewriter keyboard",
1032
+ "879": "umbrella",
1033
+ "880": "unicycle, monocycle",
1034
+ "881": "upright, upright piano",
1035
+ "882": "vacuum, vacuum cleaner",
1036
+ "883": "vase",
1037
+ "884": "vault",
1038
+ "885": "velvet",
1039
+ "886": "vending machine",
1040
+ "887": "vestment",
1041
+ "888": "viaduct",
1042
+ "889": "violin, fiddle",
1043
+ "890": "volleyball",
1044
+ "891": "waffle iron",
1045
+ "892": "wall clock",
1046
+ "893": "wallet, billfold, notecase, pocketbook",
1047
+ "894": "wardrobe, closet, press",
1048
+ "895": "warplane, military plane",
1049
+ "896": "washbasin, handbasin, washbowl, lavabo, wash-hand basin",
1050
+ "897": "washer, automatic washer, washing machine",
1051
+ "898": "water bottle",
1052
+ "899": "water jug",
1053
+ "900": "water tower",
1054
+ "901": "whiskey jug",
1055
+ "902": "whistle",
1056
+ "903": "wig",
1057
+ "904": "window screen",
1058
+ "905": "window shade",
1059
+ "906": "Windsor tie",
1060
+ "907": "wine bottle",
1061
+ "908": "wing",
1062
+ "909": "wok",
1063
+ "910": "wooden spoon",
1064
+ "911": "wool, woolen, woollen",
1065
+ "912": "worm fence, snake fence, snake-rail fence, Virginia fence",
1066
+ "913": "wreck",
1067
+ "914": "yawl",
1068
+ "915": "yurt",
1069
+ "916": "web site, website, internet site, site",
1070
+ "917": "comic book",
1071
+ "918": "crossword puzzle, crossword",
1072
+ "919": "street sign",
1073
+ "920": "traffic light, traffic signal, stoplight",
1074
+ "921": "book jacket, dust cover, dust jacket, dust wrapper",
1075
+ "922": "menu",
1076
+ "923": "plate",
1077
+ "924": "guacamole",
1078
+ "925": "consomme",
1079
+ "926": "hot pot, hotpot",
1080
+ "927": "trifle",
1081
+ "928": "ice cream, icecream",
1082
+ "929": "ice lolly, lolly, lollipop, popsicle",
1083
+ "930": "French loaf",
1084
+ "931": "bagel, beigel",
1085
+ "932": "pretzel",
1086
+ "933": "cheeseburger",
1087
+ "934": "hotdog, hot dog, red hot",
1088
+ "935": "mashed potato",
1089
+ "936": "head cabbage",
1090
+ "937": "broccoli",
1091
+ "938": "cauliflower",
1092
+ "939": "zucchini, courgette",
1093
+ "940": "spaghetti squash",
1094
+ "941": "acorn squash",
1095
+ "942": "butternut squash",
1096
+ "943": "cucumber, cuke",
1097
+ "944": "artichoke, globe artichoke",
1098
+ "945": "bell pepper",
1099
+ "946": "cardoon",
1100
+ "947": "mushroom",
1101
+ "948": "Granny Smith",
1102
+ "949": "strawberry",
1103
+ "950": "orange",
1104
+ "951": "lemon",
1105
+ "952": "fig",
1106
+ "953": "pineapple, ananas",
1107
+ "954": "banana",
1108
+ "955": "jackfruit, jak, jack",
1109
+ "956": "custard apple",
1110
+ "957": "pomegranate",
1111
+ "958": "hay",
1112
+ "959": "carbonara",
1113
+ "960": "chocolate sauce, chocolate syrup",
1114
+ "961": "dough",
1115
+ "962": "meat loaf, meatloaf",
1116
+ "963": "pizza, pizza pie",
1117
+ "964": "potpie",
1118
+ "965": "burrito",
1119
+ "966": "red wine",
1120
+ "967": "espresso",
1121
+ "968": "cup",
1122
+ "969": "eggnog",
1123
+ "970": "alp",
1124
+ "971": "bubble",
1125
+ "972": "cliff, drop, drop-off",
1126
+ "973": "coral reef",
1127
+ "974": "geyser",
1128
+ "975": "lakeside, lakeshore",
1129
+ "976": "promontory, headland, head, foreland",
1130
+ "977": "sandbar, sand bar",
1131
+ "978": "seashore, coast, seacoast, sea-coast",
1132
+ "979": "valley, vale",
1133
+ "980": "volcano",
1134
+ "981": "ballplayer, baseball player",
1135
+ "982": "groom, bridegroom",
1136
+ "983": "scuba diver",
1137
+ "984": "rapeseed",
1138
+ "985": "daisy",
1139
+ "986": "yellow lady's slipper, yellow lady-slipper, Cypripedium calceolus, Cypripedium parviflorum",
1140
+ "987": "corn",
1141
+ "988": "acorn",
1142
+ "989": "hip, rose hip, rosehip",
1143
+ "990": "buckeye, horse chestnut, conker",
1144
+ "991": "coral fungus",
1145
+ "992": "agaric",
1146
+ "993": "gyromitra",
1147
+ "994": "stinkhorn, carrion fungus",
1148
+ "995": "earthstar",
1149
+ "996": "hen-of-the-woods, hen of the woods, Polyporus frondosus, Grifola frondosa",
1150
+ "997": "bolete",
1151
+ "998": "ear, spike, capitulum",
1152
+ "999": "toilet tissue, toilet paper, bathroom tissue"
1153
+ },
1154
+ "image_size": 384,
1155
+ "initializer_range": 0.02,
1156
+ "is_decoder": false,
1157
+ "is_encoder_decoder": false,
1158
+ "kernel_qkv": [
1159
+ 3,
1160
+ 3,
1161
+ 3
1162
+ ],
1163
+ "label2id": {
1164
+ "Afghan hound, Afghan": 160,
1165
+ "African chameleon, Chamaeleo chamaeleon": 47,
1166
+ "African crocodile, Nile crocodile, Crocodylus niloticus": 49,
1167
+ "African elephant, Loxodonta africana": 386,
1168
+ "African grey, African gray, Psittacus erithacus": 87,
1169
+ "African hunting dog, hyena dog, Cape hunting dog, Lycaon pictus": 275,
1170
+ "Airedale, Airedale terrier": 191,
1171
+ "American Staffordshire terrier, Staffordshire terrier, American pit bull terrier, pit bull terrier": 180,
1172
+ "American alligator, Alligator mississipiensis": 50,
1173
+ "American black bear, black bear, Ursus americanus, Euarctos americanus": 295,
1174
+ "American chameleon, anole, Anolis carolinensis": 40,
1175
+ "American coot, marsh hen, mud hen, water hen, Fulica americana": 137,
1176
+ "American egret, great white heron, Egretta albus": 132,
1177
+ "American lobster, Northern lobster, Maine lobster, Homarus americanus": 122,
1178
+ "Angora, Angora rabbit": 332,
1179
+ "Appenzeller": 240,
1180
+ "Arabian camel, dromedary, Camelus dromedarius": 354,
1181
+ "Arctic fox, white fox, Alopex lagopus": 279,
1182
+ "Australian terrier": 193,
1183
+ "Band Aid": 419,
1184
+ "Bedlington terrier": 181,
1185
+ "Bernese mountain dog": 239,
1186
+ "Blenheim spaniel": 156,
1187
+ "Border collie": 232,
1188
+ "Border terrier": 182,
1189
+ "Boston bull, Boston terrier": 195,
1190
+ "Bouvier des Flandres, Bouviers des Flandres": 233,
1191
+ "Brabancon griffon": 262,
1192
+ "Brittany spaniel": 215,
1193
+ "CD player": 485,
1194
+ "Cardigan, Cardigan Welsh corgi": 264,
1195
+ "Chesapeake Bay retriever": 209,
1196
+ "Chihuahua": 151,
1197
+ "Christmas stocking": 496,
1198
+ "Crock Pot": 521,
1199
+ "Dandie Dinmont, Dandie Dinmont terrier": 194,
1200
+ "Doberman, Doberman pinscher": 236,
1201
+ "Dungeness crab, Cancer magister": 118,
1202
+ "Dutch oven": 544,
1203
+ "Egyptian cat": 285,
1204
+ "English foxhound": 167,
1205
+ "English setter": 212,
1206
+ "English springer, English springer spaniel": 217,
1207
+ "EntleBucher": 241,
1208
+ "Eskimo dog, husky": 248,
1209
+ "European fire salamander, Salamandra salamandra": 25,
1210
+ "European gallinule, Porphyrio porphyrio": 136,
1211
+ "French bulldog": 245,
1212
+ "French horn, horn": 566,
1213
+ "French loaf": 930,
1214
+ "German shepherd, German shepherd dog, German police dog, alsatian": 235,
1215
+ "German short-haired pointer": 210,
1216
+ "Gila monster, Heloderma suspectum": 45,
1217
+ "Gordon setter": 214,
1218
+ "Granny Smith": 948,
1219
+ "Great Dane": 246,
1220
+ "Great Pyrenees": 257,
1221
+ "Greater Swiss Mountain dog": 238,
1222
+ "Ibizan hound, Ibizan Podenco": 173,
1223
+ "Indian cobra, Naja naja": 63,
1224
+ "Indian elephant, Elephas maximus": 385,
1225
+ "Irish setter, red setter": 213,
1226
+ "Irish terrier": 184,
1227
+ "Irish water spaniel": 221,
1228
+ "Irish wolfhound": 170,
1229
+ "Italian greyhound": 171,
1230
+ "Japanese spaniel": 152,
1231
+ "Kerry blue terrier": 183,
1232
+ "Komodo dragon, Komodo lizard, dragon lizard, giant lizard, Varanus komodoensis": 48,
1233
+ "Labrador retriever": 208,
1234
+ "Lakeland terrier": 189,
1235
+ "Leonberg": 255,
1236
+ "Lhasa, Lhasa apso": 204,
1237
+ "Loafer": 630,
1238
+ "Madagascar cat, ring-tailed lemur, Lemur catta": 383,
1239
+ "Maltese dog, Maltese terrier, Maltese": 153,
1240
+ "Mexican hairless": 268,
1241
+ "Model T": 661,
1242
+ "Newfoundland, Newfoundland dog": 256,
1243
+ "Norfolk terrier": 185,
1244
+ "Norwegian elkhound, elkhound": 174,
1245
+ "Norwich terrier": 186,
1246
+ "Old English sheepdog, bobtail": 229,
1247
+ "Pekinese, Pekingese, Peke": 154,
1248
+ "Pembroke, Pembroke Welsh corgi": 263,
1249
+ "Persian cat": 283,
1250
+ "Petri dish": 712,
1251
+ "Polaroid camera, Polaroid Land camera": 732,
1252
+ "Pomeranian": 259,
1253
+ "Rhodesian ridgeback": 159,
1254
+ "Rottweiler": 234,
1255
+ "Saint Bernard, St Bernard": 247,
1256
+ "Saluki, gazelle hound": 176,
1257
+ "Samoyed, Samoyede": 258,
1258
+ "Scotch terrier, Scottish terrier, Scottie": 199,
1259
+ "Scottish deerhound, deerhound": 177,
1260
+ "Sealyham terrier, Sealyham": 190,
1261
+ "Shetland sheepdog, Shetland sheep dog, Shetland": 230,
1262
+ "Shih-Tzu": 155,
1263
+ "Siamese cat, Siamese": 284,
1264
+ "Siberian husky": 250,
1265
+ "Staffordshire bullterrier, Staffordshire bull terrier": 179,
1266
+ "Sussex spaniel": 220,
1267
+ "Tibetan mastiff": 244,
1268
+ "Tibetan terrier, chrysanthemum dog": 200,
1269
+ "Walker hound, Walker foxhound": 166,
1270
+ "Weimaraner": 178,
1271
+ "Welsh springer spaniel": 218,
1272
+ "West Highland white terrier": 203,
1273
+ "Windsor tie": 906,
1274
+ "Yorkshire terrier": 187,
1275
+ "abacus": 398,
1276
+ "abaya": 399,
1277
+ "academic gown, academic robe, judge's robe": 400,
1278
+ "accordion, piano accordion, squeeze box": 401,
1279
+ "acorn": 988,
1280
+ "acorn squash": 941,
1281
+ "acoustic guitar": 402,
1282
+ "admiral": 321,
1283
+ "affenpinscher, monkey pinscher, monkey dog": 252,
1284
+ "agama": 42,
1285
+ "agaric": 992,
1286
+ "aircraft carrier, carrier, flattop, attack aircraft carrier": 403,
1287
+ "airliner": 404,
1288
+ "airship, dirigible": 405,
1289
+ "albatross, mollymawk": 146,
1290
+ "alligator lizard": 44,
1291
+ "alp": 970,
1292
+ "altar": 406,
1293
+ "ambulance": 407,
1294
+ "amphibian, amphibious vehicle": 408,
1295
+ "analog clock": 409,
1296
+ "anemone fish": 393,
1297
+ "ant, emmet, pismire": 310,
1298
+ "apiary, bee house": 410,
1299
+ "apron": 411,
1300
+ "armadillo": 363,
1301
+ "artichoke, globe artichoke": 944,
1302
+ "ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, dustbin, trash barrel, trash bin": 412,
1303
+ "assault rifle, assault gun": 413,
1304
+ "axolotl, mud puppy, Ambystoma mexicanum": 29,
1305
+ "baboon": 372,
1306
+ "backpack, back pack, knapsack, packsack, rucksack, haversack": 414,
1307
+ "badger": 362,
1308
+ "bagel, beigel": 931,
1309
+ "bakery, bakeshop, bakehouse": 415,
1310
+ "balance beam, beam": 416,
1311
+ "bald eagle, American eagle, Haliaeetus leucocephalus": 22,
1312
+ "balloon": 417,
1313
+ "ballplayer, baseball player": 981,
1314
+ "ballpoint, ballpoint pen, ballpen, Biro": 418,
1315
+ "banana": 954,
1316
+ "banded gecko": 38,
1317
+ "banjo": 420,
1318
+ "bannister, banister, balustrade, balusters, handrail": 421,
1319
+ "barbell": 422,
1320
+ "barber chair": 423,
1321
+ "barbershop": 424,
1322
+ "barn": 425,
1323
+ "barn spider, Araneus cavaticus": 73,
1324
+ "barometer": 426,
1325
+ "barracouta, snoek": 389,
1326
+ "barrel, cask": 427,
1327
+ "barrow, garden cart, lawn cart, wheelbarrow": 428,
1328
+ "baseball": 429,
1329
+ "basenji": 253,
1330
+ "basketball": 430,
1331
+ "basset, basset hound": 161,
1332
+ "bassinet": 431,
1333
+ "bassoon": 432,
1334
+ "bath towel": 434,
1335
+ "bathing cap, swimming cap": 433,
1336
+ "bathtub, bathing tub, bath, tub": 435,
1337
+ "beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon": 436,
1338
+ "beacon, lighthouse, beacon light, pharos": 437,
1339
+ "beagle": 162,
1340
+ "beaker": 438,
1341
+ "bearskin, busby, shako": 439,
1342
+ "beaver": 337,
1343
+ "bee": 309,
1344
+ "bee eater": 92,
1345
+ "beer bottle": 440,
1346
+ "beer glass": 441,
1347
+ "bell cote, bell cot": 442,
1348
+ "bell pepper": 945,
1349
+ "bib": 443,
1350
+ "bicycle-built-for-two, tandem bicycle, tandem": 444,
1351
+ "bighorn, bighorn sheep, cimarron, Rocky Mountain bighorn, Rocky Mountain sheep, Ovis canadensis": 349,
1352
+ "bikini, two-piece": 445,
1353
+ "binder, ring-binder": 446,
1354
+ "binoculars, field glasses, opera glasses": 447,
1355
+ "birdhouse": 448,
1356
+ "bison": 347,
1357
+ "bittern": 133,
1358
+ "black and gold garden spider, Argiope aurantia": 72,
1359
+ "black grouse": 80,
1360
+ "black stork, Ciconia nigra": 128,
1361
+ "black swan, Cygnus atratus": 100,
1362
+ "black widow, Latrodectus mactans": 75,
1363
+ "black-and-tan coonhound": 165,
1364
+ "black-footed ferret, ferret, Mustela nigripes": 359,
1365
+ "bloodhound, sleuthhound": 163,
1366
+ "bluetick": 164,
1367
+ "boa constrictor, Constrictor constrictor": 61,
1368
+ "boathouse": 449,
1369
+ "bobsled, bobsleigh, bob": 450,
1370
+ "bolete": 997,
1371
+ "bolo tie, bolo, bola tie, bola": 451,
1372
+ "bonnet, poke bonnet": 452,
1373
+ "book jacket, dust cover, dust jacket, dust wrapper": 921,
1374
+ "bookcase": 453,
1375
+ "bookshop, bookstore, bookstall": 454,
1376
+ "borzoi, Russian wolfhound": 169,
1377
+ "bottlecap": 455,
1378
+ "bow": 456,
1379
+ "bow tie, bow-tie, bowtie": 457,
1380
+ "box turtle, box tortoise": 37,
1381
+ "boxer": 242,
1382
+ "brain coral": 109,
1383
+ "brambling, Fringilla montifringilla": 10,
1384
+ "brass, memorial tablet, plaque": 458,
1385
+ "brassiere, bra, bandeau": 459,
1386
+ "breakwater, groin, groyne, mole, bulwark, seawall, jetty": 460,
1387
+ "breastplate, aegis, egis": 461,
1388
+ "briard": 226,
1389
+ "broccoli": 937,
1390
+ "broom": 462,
1391
+ "brown bear, bruin, Ursus arctos": 294,
1392
+ "bubble": 971,
1393
+ "bucket, pail": 463,
1394
+ "buckeye, horse chestnut, conker": 990,
1395
+ "buckle": 464,
1396
+ "bulbul": 16,
1397
+ "bull mastiff": 243,
1398
+ "bullet train, bullet": 466,
1399
+ "bulletproof vest": 465,
1400
+ "bullfrog, Rana catesbeiana": 30,
1401
+ "burrito": 965,
1402
+ "bustard": 138,
1403
+ "butcher shop, meat market": 467,
1404
+ "butternut squash": 942,
1405
+ "cab, hack, taxi, taxicab": 468,
1406
+ "cabbage butterfly": 324,
1407
+ "cairn, cairn terrier": 192,
1408
+ "caldron, cauldron": 469,
1409
+ "can opener, tin opener": 473,
1410
+ "candle, taper, wax light": 470,
1411
+ "cannon": 471,
1412
+ "canoe": 472,
1413
+ "capuchin, ringtail, Cebus capucinus": 378,
1414
+ "car mirror": 475,
1415
+ "car wheel": 479,
1416
+ "carbonara": 959,
1417
+ "cardigan": 474,
1418
+ "cardoon": 946,
1419
+ "carousel, carrousel, merry-go-round, roundabout, whirligig": 476,
1420
+ "carpenter's kit, tool kit": 477,
1421
+ "carton": 478,
1422
+ "cash machine, cash dispenser, automated teller machine, automatic teller machine, automated teller, automatic teller, ATM": 480,
1423
+ "cassette": 481,
1424
+ "cassette player": 482,
1425
+ "castle": 483,
1426
+ "catamaran": 484,
1427
+ "cauliflower": 938,
1428
+ "cello, violoncello": 486,
1429
+ "cellular telephone, cellular phone, cellphone, cell, mobile phone": 487,
1430
+ "centipede": 79,
1431
+ "chain": 488,
1432
+ "chain mail, ring mail, mail, chain armor, chain armour, ring armor, ring armour": 490,
1433
+ "chain saw, chainsaw": 491,
1434
+ "chainlink fence": 489,
1435
+ "chambered nautilus, pearly nautilus, nautilus": 117,
1436
+ "cheeseburger": 933,
1437
+ "cheetah, chetah, Acinonyx jubatus": 293,
1438
+ "chest": 492,
1439
+ "chickadee": 19,
1440
+ "chiffonier, commode": 493,
1441
+ "chime, bell, gong": 494,
1442
+ "chimpanzee, chimp, Pan troglodytes": 367,
1443
+ "china cabinet, china closet": 495,
1444
+ "chiton, coat-of-mail shell, sea cradle, polyplacophore": 116,
1445
+ "chocolate sauce, chocolate syrup": 960,
1446
+ "chow, chow chow": 260,
1447
+ "church, church building": 497,
1448
+ "cicada, cicala": 316,
1449
+ "cinema, movie theater, movie theatre, movie house, picture palace": 498,
1450
+ "cleaver, meat cleaver, chopper": 499,
1451
+ "cliff dwelling": 500,
1452
+ "cliff, drop, drop-off": 972,
1453
+ "cloak": 501,
1454
+ "clog, geta, patten, sabot": 502,
1455
+ "clumber, clumber spaniel": 216,
1456
+ "cock": 7,
1457
+ "cocker spaniel, English cocker spaniel, cocker": 219,
1458
+ "cockroach, roach": 314,
1459
+ "cocktail shaker": 503,
1460
+ "coffee mug": 504,
1461
+ "coffeepot": 505,
1462
+ "coho, cohoe, coho salmon, blue jack, silver salmon, Oncorhynchus kisutch": 391,
1463
+ "coil, spiral, volute, whorl, helix": 506,
1464
+ "collie": 231,
1465
+ "colobus, colobus monkey": 375,
1466
+ "combination lock": 507,
1467
+ "comic book": 917,
1468
+ "common iguana, iguana, Iguana iguana": 39,
1469
+ "common newt, Triturus vulgaris": 26,
1470
+ "computer keyboard, keypad": 508,
1471
+ "conch": 112,
1472
+ "confectionery, confectionary, candy store": 509,
1473
+ "consomme": 925,
1474
+ "container ship, containership, container vessel": 510,
1475
+ "convertible": 511,
1476
+ "coral fungus": 991,
1477
+ "coral reef": 973,
1478
+ "corkscrew, bottle screw": 512,
1479
+ "corn": 987,
1480
+ "cornet, horn, trumpet, trump": 513,
1481
+ "coucal": 91,
1482
+ "cougar, puma, catamount, mountain lion, painter, panther, Felis concolor": 286,
1483
+ "cowboy boot": 514,
1484
+ "cowboy hat, ten-gallon hat": 515,
1485
+ "coyote, prairie wolf, brush wolf, Canis latrans": 272,
1486
+ "cradle": 516,
1487
+ "crane": 517,
1488
+ "crash helmet": 518,
1489
+ "crate": 519,
1490
+ "crayfish, crawfish, crawdad, crawdaddy": 124,
1491
+ "crib, cot": 520,
1492
+ "cricket": 312,
1493
+ "croquet ball": 522,
1494
+ "crossword puzzle, crossword": 918,
1495
+ "crutch": 523,
1496
+ "cucumber, cuke": 943,
1497
+ "cuirass": 524,
1498
+ "cup": 968,
1499
+ "curly-coated retriever": 206,
1500
+ "custard apple": 956,
1501
+ "daisy": 985,
1502
+ "dalmatian, coach dog, carriage dog": 251,
1503
+ "dam, dike, dyke": 525,
1504
+ "damselfly": 320,
1505
+ "desk": 526,
1506
+ "desktop computer": 527,
1507
+ "dhole, Cuon alpinus": 274,
1508
+ "dial telephone, dial phone": 528,
1509
+ "diamondback, diamondback rattlesnake, Crotalus adamanteus": 67,
1510
+ "diaper, nappy, napkin": 529,
1511
+ "digital clock": 530,
1512
+ "digital watch": 531,
1513
+ "dingo, warrigal, warragal, Canis dingo": 273,
1514
+ "dining table, board": 532,
1515
+ "dishrag, dishcloth": 533,
1516
+ "dishwasher, dish washer, dishwashing machine": 534,
1517
+ "disk brake, disc brake": 535,
1518
+ "dock, dockage, docking facility": 536,
1519
+ "dogsled, dog sled, dog sleigh": 537,
1520
+ "dome": 538,
1521
+ "doormat, welcome mat": 539,
1522
+ "dough": 961,
1523
+ "dowitcher": 142,
1524
+ "dragonfly, darning needle, devil's darning needle, sewing needle, snake feeder, snake doctor, mosquito hawk, skeeter hawk": 319,
1525
+ "drake": 97,
1526
+ "drilling platform, offshore rig": 540,
1527
+ "drum, membranophone, tympan": 541,
1528
+ "drumstick": 542,
1529
+ "dugong, Dugong dugon": 149,
1530
+ "dumbbell": 543,
1531
+ "dung beetle": 305,
1532
+ "ear, spike, capitulum": 998,
1533
+ "earthstar": 995,
1534
+ "echidna, spiny anteater, anteater": 102,
1535
+ "eel": 390,
1536
+ "eft": 27,
1537
+ "eggnog": 969,
1538
+ "electric fan, blower": 545,
1539
+ "electric guitar": 546,
1540
+ "electric locomotive": 547,
1541
+ "electric ray, crampfish, numbfish, torpedo": 5,
1542
+ "entertainment center": 548,
1543
+ "envelope": 549,
1544
+ "espresso": 967,
1545
+ "espresso maker": 550,
1546
+ "face powder": 551,
1547
+ "feather boa, boa": 552,
1548
+ "fiddler crab": 120,
1549
+ "fig": 952,
1550
+ "file, file cabinet, filing cabinet": 553,
1551
+ "fire engine, fire truck": 555,
1552
+ "fire screen, fireguard": 556,
1553
+ "fireboat": 554,
1554
+ "flagpole, flagstaff": 557,
1555
+ "flamingo": 130,
1556
+ "flat-coated retriever": 205,
1557
+ "flatworm, platyhelminth": 110,
1558
+ "flute, transverse flute": 558,
1559
+ "fly": 308,
1560
+ "folding chair": 559,
1561
+ "football helmet": 560,
1562
+ "forklift": 561,
1563
+ "fountain": 562,
1564
+ "fountain pen": 563,
1565
+ "four-poster": 564,
1566
+ "fox squirrel, eastern fox squirrel, Sciurus niger": 335,
1567
+ "freight car": 565,
1568
+ "frilled lizard, Chlamydosaurus kingi": 43,
1569
+ "frying pan, frypan, skillet": 567,
1570
+ "fur coat": 568,
1571
+ "gar, garfish, garpike, billfish, Lepisosteus osseus": 395,
1572
+ "garbage truck, dustcart": 569,
1573
+ "garden spider, Aranea diademata": 74,
1574
+ "garter snake, grass snake": 57,
1575
+ "gas pump, gasoline pump, petrol pump, island dispenser": 571,
1576
+ "gasmask, respirator, gas helmet": 570,
1577
+ "gazelle": 353,
1578
+ "geyser": 974,
1579
+ "giant panda, panda, panda bear, coon bear, Ailuropoda melanoleuca": 388,
1580
+ "giant schnauzer": 197,
1581
+ "gibbon, Hylobates lar": 368,
1582
+ "go-kart": 573,
1583
+ "goblet": 572,
1584
+ "golden retriever": 207,
1585
+ "goldfinch, Carduelis carduelis": 11,
1586
+ "goldfish, Carassius auratus": 1,
1587
+ "golf ball": 574,
1588
+ "golfcart, golf cart": 575,
1589
+ "gondola": 576,
1590
+ "gong, tam-tam": 577,
1591
+ "goose": 99,
1592
+ "gorilla, Gorilla gorilla": 366,
1593
+ "gown": 578,
1594
+ "grand piano, grand": 579,
1595
+ "grasshopper, hopper": 311,
1596
+ "great grey owl, great gray owl, Strix nebulosa": 24,
1597
+ "great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias": 2,
1598
+ "green lizard, Lacerta viridis": 46,
1599
+ "green mamba": 64,
1600
+ "green snake, grass snake": 55,
1601
+ "greenhouse, nursery, glasshouse": 580,
1602
+ "grey fox, gray fox, Urocyon cinereoargenteus": 280,
1603
+ "grey whale, gray whale, devilfish, Eschrichtius gibbosus, Eschrichtius robustus": 147,
1604
+ "grille, radiator grille": 581,
1605
+ "grocery store, grocery, food market, market": 582,
1606
+ "groenendael": 224,
1607
+ "groom, bridegroom": 982,
1608
+ "ground beetle, carabid beetle": 302,
1609
+ "guacamole": 924,
1610
+ "guenon, guenon monkey": 370,
1611
+ "guillotine": 583,
1612
+ "guinea pig, Cavia cobaya": 338,
1613
+ "gyromitra": 993,
1614
+ "hair slide": 584,
1615
+ "hair spray": 585,
1616
+ "half track": 586,
1617
+ "hammer": 587,
1618
+ "hammerhead, hammerhead shark": 4,
1619
+ "hamper": 588,
1620
+ "hamster": 333,
1621
+ "hand blower, blow dryer, blow drier, hair dryer, hair drier": 589,
1622
+ "hand-held computer, hand-held microcomputer": 590,
1623
+ "handkerchief, hankie, hanky, hankey": 591,
1624
+ "hard disc, hard disk, fixed disk": 592,
1625
+ "hare": 331,
1626
+ "harmonica, mouth organ, harp, mouth harp": 593,
1627
+ "harp": 594,
1628
+ "hartebeest": 351,
1629
+ "harvester, reaper": 595,
1630
+ "harvestman, daddy longlegs, Phalangium opilio": 70,
1631
+ "hatchet": 596,
1632
+ "hay": 958,
1633
+ "head cabbage": 936,
1634
+ "hen": 8,
1635
+ "hen-of-the-woods, hen of the woods, Polyporus frondosus, Grifola frondosa": 996,
1636
+ "hermit crab": 125,
1637
+ "hip, rose hip, rosehip": 989,
1638
+ "hippopotamus, hippo, river horse, Hippopotamus amphibius": 344,
1639
+ "hog, pig, grunter, squealer, Sus scrofa": 341,
1640
+ "hognose snake, puff adder, sand viper": 54,
1641
+ "holster": 597,
1642
+ "home theater, home theatre": 598,
1643
+ "honeycomb": 599,
1644
+ "hook, claw": 600,
1645
+ "hoopskirt, crinoline": 601,
1646
+ "horizontal bar, high bar": 602,
1647
+ "hornbill": 93,
1648
+ "horned viper, cerastes, sand viper, horned asp, Cerastes cornutus": 66,
1649
+ "horse cart, horse-cart": 603,
1650
+ "hot pot, hotpot": 926,
1651
+ "hotdog, hot dog, red hot": 934,
1652
+ "hourglass": 604,
1653
+ "house finch, linnet, Carpodacus mexicanus": 12,
1654
+ "howler monkey, howler": 379,
1655
+ "hummingbird": 94,
1656
+ "hyena, hyaena": 276,
1657
+ "iPod": 605,
1658
+ "ibex, Capra ibex": 350,
1659
+ "ice bear, polar bear, Ursus Maritimus, Thalarctos maritimus": 296,
1660
+ "ice cream, icecream": 928,
1661
+ "ice lolly, lolly, lollipop, popsicle": 929,
1662
+ "impala, Aepyceros melampus": 352,
1663
+ "indigo bunting, indigo finch, indigo bird, Passerina cyanea": 14,
1664
+ "indri, indris, Indri indri, Indri brevicaudatus": 384,
1665
+ "iron, smoothing iron": 606,
1666
+ "isopod": 126,
1667
+ "jacamar": 95,
1668
+ "jack-o'-lantern": 607,
1669
+ "jackfruit, jak, jack": 955,
1670
+ "jaguar, panther, Panthera onca, Felis onca": 290,
1671
+ "jay": 17,
1672
+ "jean, blue jean, denim": 608,
1673
+ "jeep, landrover": 609,
1674
+ "jellyfish": 107,
1675
+ "jersey, T-shirt, tee shirt": 610,
1676
+ "jigsaw puzzle": 611,
1677
+ "jinrikisha, ricksha, rickshaw": 612,
1678
+ "joystick": 613,
1679
+ "junco, snowbird": 13,
1680
+ "keeshond": 261,
1681
+ "kelpie": 227,
1682
+ "killer whale, killer, orca, grampus, sea wolf, Orcinus orca": 148,
1683
+ "kimono": 614,
1684
+ "king crab, Alaska crab, Alaskan king crab, Alaska king crab, Paralithodes camtschatica": 121,
1685
+ "king penguin, Aptenodytes patagonica": 145,
1686
+ "king snake, kingsnake": 56,
1687
+ "kit fox, Vulpes macrotis": 278,
1688
+ "kite": 21,
1689
+ "knee pad": 615,
1690
+ "knot": 616,
1691
+ "koala, koala bear, kangaroo bear, native bear, Phascolarctos cinereus": 105,
1692
+ "komondor": 228,
1693
+ "kuvasz": 222,
1694
+ "lab coat, laboratory coat": 617,
1695
+ "lacewing, lacewing fly": 318,
1696
+ "ladle": 618,
1697
+ "ladybug, ladybeetle, lady beetle, ladybird, ladybird beetle": 301,
1698
+ "lakeside, lakeshore": 975,
1699
+ "lampshade, lamp shade": 619,
1700
+ "langur": 374,
1701
+ "laptop, laptop computer": 620,
1702
+ "lawn mower, mower": 621,
1703
+ "leaf beetle, chrysomelid": 304,
1704
+ "leafhopper": 317,
1705
+ "leatherback turtle, leatherback, leathery turtle, Dermochelys coriacea": 34,
1706
+ "lemon": 951,
1707
+ "lens cap, lens cover": 622,
1708
+ "leopard, Panthera pardus": 288,
1709
+ "lesser panda, red panda, panda, bear cat, cat bear, Ailurus fulgens": 387,
1710
+ "letter opener, paper knife, paperknife": 623,
1711
+ "library": 624,
1712
+ "lifeboat": 625,
1713
+ "lighter, light, igniter, ignitor": 626,
1714
+ "limousine, limo": 627,
1715
+ "limpkin, Aramus pictus": 135,
1716
+ "liner, ocean liner": 628,
1717
+ "lion, king of beasts, Panthera leo": 291,
1718
+ "lionfish": 396,
1719
+ "lipstick, lip rouge": 629,
1720
+ "little blue heron, Egretta caerulea": 131,
1721
+ "llama": 355,
1722
+ "loggerhead, loggerhead turtle, Caretta caretta": 33,
1723
+ "long-horned beetle, longicorn, longicorn beetle": 303,
1724
+ "lorikeet": 90,
1725
+ "lotion": 631,
1726
+ "loudspeaker, speaker, speaker unit, loudspeaker system, speaker system": 632,
1727
+ "loupe, jeweler's loupe": 633,
1728
+ "lumbermill, sawmill": 634,
1729
+ "lycaenid, lycaenid butterfly": 326,
1730
+ "lynx, catamount": 287,
1731
+ "macaque": 373,
1732
+ "macaw": 88,
1733
+ "magnetic compass": 635,
1734
+ "magpie": 18,
1735
+ "mailbag, postbag": 636,
1736
+ "mailbox, letter box": 637,
1737
+ "maillot": 638,
1738
+ "maillot, tank suit": 639,
1739
+ "malamute, malemute, Alaskan malamute": 249,
1740
+ "malinois": 225,
1741
+ "manhole cover": 640,
1742
+ "mantis, mantid": 315,
1743
+ "maraca": 641,
1744
+ "marimba, xylophone": 642,
1745
+ "marmoset": 377,
1746
+ "marmot": 336,
1747
+ "mashed potato": 935,
1748
+ "mask": 643,
1749
+ "matchstick": 644,
1750
+ "maypole": 645,
1751
+ "maze, labyrinth": 646,
1752
+ "measuring cup": 647,
1753
+ "meat loaf, meatloaf": 962,
1754
+ "medicine chest, medicine cabinet": 648,
1755
+ "meerkat, mierkat": 299,
1756
+ "megalith, megalithic structure": 649,
1757
+ "menu": 922,
1758
+ "microphone, mike": 650,
1759
+ "microwave, microwave oven": 651,
1760
+ "military uniform": 652,
1761
+ "milk can": 653,
1762
+ "miniature pinscher": 237,
1763
+ "miniature poodle": 266,
1764
+ "miniature schnauzer": 196,
1765
+ "minibus": 654,
1766
+ "miniskirt, mini": 655,
1767
+ "minivan": 656,
1768
+ "mink": 357,
1769
+ "missile": 657,
1770
+ "mitten": 658,
1771
+ "mixing bowl": 659,
1772
+ "mobile home, manufactured home": 660,
1773
+ "modem": 662,
1774
+ "monarch, monarch butterfly, milkweed butterfly, Danaus plexippus": 323,
1775
+ "monastery": 663,
1776
+ "mongoose": 298,
1777
+ "monitor": 664,
1778
+ "moped": 665,
1779
+ "mortar": 666,
1780
+ "mortarboard": 667,
1781
+ "mosque": 668,
1782
+ "mosquito net": 669,
1783
+ "motor scooter, scooter": 670,
1784
+ "mountain bike, all-terrain bike, off-roader": 671,
1785
+ "mountain tent": 672,
1786
+ "mouse, computer mouse": 673,
1787
+ "mousetrap": 674,
1788
+ "moving van": 675,
1789
+ "mud turtle": 35,
1790
+ "mushroom": 947,
1791
+ "muzzle": 676,
1792
+ "nail": 677,
1793
+ "neck brace": 678,
1794
+ "necklace": 679,
1795
+ "nematode, nematode worm, roundworm": 111,
1796
+ "night snake, Hypsiglena torquata": 60,
1797
+ "nipple": 680,
1798
+ "notebook, notebook computer": 681,
1799
+ "obelisk": 682,
1800
+ "oboe, hautboy, hautbois": 683,
1801
+ "ocarina, sweet potato": 684,
1802
+ "odometer, hodometer, mileometer, milometer": 685,
1803
+ "oil filter": 686,
1804
+ "orange": 950,
1805
+ "orangutan, orang, orangutang, Pongo pygmaeus": 365,
1806
+ "organ, pipe organ": 687,
1807
+ "oscilloscope, scope, cathode-ray oscilloscope, CRO": 688,
1808
+ "ostrich, Struthio camelus": 9,
1809
+ "otter": 360,
1810
+ "otterhound, otter hound": 175,
1811
+ "overskirt": 689,
1812
+ "ox": 345,
1813
+ "oxcart": 690,
1814
+ "oxygen mask": 691,
1815
+ "oystercatcher, oyster catcher": 143,
1816
+ "packet": 692,
1817
+ "paddle, boat paddle": 693,
1818
+ "paddlewheel, paddle wheel": 694,
1819
+ "padlock": 695,
1820
+ "paintbrush": 696,
1821
+ "pajama, pyjama, pj's, jammies": 697,
1822
+ "palace": 698,
1823
+ "panpipe, pandean pipe, syrinx": 699,
1824
+ "paper towel": 700,
1825
+ "papillon": 157,
1826
+ "parachute, chute": 701,
1827
+ "parallel bars, bars": 702,
1828
+ "park bench": 703,
1829
+ "parking meter": 704,
1830
+ "partridge": 86,
1831
+ "passenger car, coach, carriage": 705,
1832
+ "patas, hussar monkey, Erythrocebus patas": 371,
1833
+ "patio, terrace": 706,
1834
+ "pay-phone, pay-station": 707,
1835
+ "peacock": 84,
1836
+ "pedestal, plinth, footstall": 708,
1837
+ "pelican": 144,
1838
+ "pencil box, pencil case": 709,
1839
+ "pencil sharpener": 710,
1840
+ "perfume, essence": 711,
1841
+ "photocopier": 713,
1842
+ "pick, plectrum, plectron": 714,
1843
+ "pickelhaube": 715,
1844
+ "picket fence, paling": 716,
1845
+ "pickup, pickup truck": 717,
1846
+ "pier": 718,
1847
+ "piggy bank, penny bank": 719,
1848
+ "pill bottle": 720,
1849
+ "pillow": 721,
1850
+ "pineapple, ananas": 953,
1851
+ "ping-pong ball": 722,
1852
+ "pinwheel": 723,
1853
+ "pirate, pirate ship": 724,
1854
+ "pitcher, ewer": 725,
1855
+ "pizza, pizza pie": 963,
1856
+ "plane, carpenter's plane, woodworking plane": 726,
1857
+ "planetarium": 727,
1858
+ "plastic bag": 728,
1859
+ "plate": 923,
1860
+ "plate rack": 729,
1861
+ "platypus, duckbill, duckbilled platypus, duck-billed platypus, Ornithorhynchus anatinus": 103,
1862
+ "plow, plough": 730,
1863
+ "plunger, plumber's helper": 731,
1864
+ "pole": 733,
1865
+ "polecat, fitch, foulmart, foumart, Mustela putorius": 358,
1866
+ "police van, police wagon, paddy wagon, patrol wagon, wagon, black Maria": 734,
1867
+ "pomegranate": 957,
1868
+ "poncho": 735,
1869
+ "pool table, billiard table, snooker table": 736,
1870
+ "pop bottle, soda bottle": 737,
1871
+ "porcupine, hedgehog": 334,
1872
+ "pot, flowerpot": 738,
1873
+ "potpie": 964,
1874
+ "potter's wheel": 739,
1875
+ "power drill": 740,
1876
+ "prairie chicken, prairie grouse, prairie fowl": 83,
1877
+ "prayer rug, prayer mat": 741,
1878
+ "pretzel": 932,
1879
+ "printer": 742,
1880
+ "prison, prison house": 743,
1881
+ "proboscis monkey, Nasalis larvatus": 376,
1882
+ "projectile, missile": 744,
1883
+ "projector": 745,
1884
+ "promontory, headland, head, foreland": 976,
1885
+ "ptarmigan": 81,
1886
+ "puck, hockey puck": 746,
1887
+ "puffer, pufferfish, blowfish, globefish": 397,
1888
+ "pug, pug-dog": 254,
1889
+ "punching bag, punch bag, punching ball, punchball": 747,
1890
+ "purse": 748,
1891
+ "quail": 85,
1892
+ "quill, quill pen": 749,
1893
+ "quilt, comforter, comfort, puff": 750,
1894
+ "racer, race car, racing car": 751,
1895
+ "racket, racquet": 752,
1896
+ "radiator": 753,
1897
+ "radio telescope, radio reflector": 755,
1898
+ "radio, wireless": 754,
1899
+ "rain barrel": 756,
1900
+ "ram, tup": 348,
1901
+ "rapeseed": 984,
1902
+ "recreational vehicle, RV, R.V.": 757,
1903
+ "red fox, Vulpes vulpes": 277,
1904
+ "red wine": 966,
1905
+ "red wolf, maned wolf, Canis rufus, Canis niger": 271,
1906
+ "red-backed sandpiper, dunlin, Erolia alpina": 140,
1907
+ "red-breasted merganser, Mergus serrator": 98,
1908
+ "redbone": 168,
1909
+ "redshank, Tringa totanus": 141,
1910
+ "reel": 758,
1911
+ "reflex camera": 759,
1912
+ "refrigerator, icebox": 760,
1913
+ "remote control, remote": 761,
1914
+ "restaurant, eating house, eating place, eatery": 762,
1915
+ "revolver, six-gun, six-shooter": 763,
1916
+ "rhinoceros beetle": 306,
1917
+ "rifle": 764,
1918
+ "ringlet, ringlet butterfly": 322,
1919
+ "ringneck snake, ring-necked snake, ring snake": 53,
1920
+ "robin, American robin, Turdus migratorius": 15,
1921
+ "rock beauty, Holocanthus tricolor": 392,
1922
+ "rock crab, Cancer irroratus": 119,
1923
+ "rock python, rock snake, Python sebae": 62,
1924
+ "rocking chair, rocker": 765,
1925
+ "rotisserie": 766,
1926
+ "rubber eraser, rubber, pencil eraser": 767,
1927
+ "ruddy turnstone, Arenaria interpres": 139,
1928
+ "ruffed grouse, partridge, Bonasa umbellus": 82,
1929
+ "rugby ball": 768,
1930
+ "rule, ruler": 769,
1931
+ "running shoe": 770,
1932
+ "safe": 771,
1933
+ "safety pin": 772,
1934
+ "saltshaker, salt shaker": 773,
1935
+ "sandal": 774,
1936
+ "sandbar, sand bar": 977,
1937
+ "sarong": 775,
1938
+ "sax, saxophone": 776,
1939
+ "scabbard": 777,
1940
+ "scale, weighing machine": 778,
1941
+ "schipperke": 223,
1942
+ "school bus": 779,
1943
+ "schooner": 780,
1944
+ "scoreboard": 781,
1945
+ "scorpion": 71,
1946
+ "screen, CRT screen": 782,
1947
+ "screw": 783,
1948
+ "screwdriver": 784,
1949
+ "scuba diver": 983,
1950
+ "sea anemone, anemone": 108,
1951
+ "sea cucumber, holothurian": 329,
1952
+ "sea lion": 150,
1953
+ "sea slug, nudibranch": 115,
1954
+ "sea snake": 65,
1955
+ "sea urchin": 328,
1956
+ "seashore, coast, seacoast, sea-coast": 978,
1957
+ "seat belt, seatbelt": 785,
1958
+ "sewing machine": 786,
1959
+ "shield, buckler": 787,
1960
+ "shoe shop, shoe-shop, shoe store": 788,
1961
+ "shoji": 789,
1962
+ "shopping basket": 790,
1963
+ "shopping cart": 791,
1964
+ "shovel": 792,
1965
+ "shower cap": 793,
1966
+ "shower curtain": 794,
1967
+ "siamang, Hylobates syndactylus, Symphalangus syndactylus": 369,
1968
+ "sidewinder, horned rattlesnake, Crotalus cerastes": 68,
1969
+ "silky terrier, Sydney silky": 201,
1970
+ "ski": 795,
1971
+ "ski mask": 796,
1972
+ "skunk, polecat, wood pussy": 361,
1973
+ "sleeping bag": 797,
1974
+ "slide rule, slipstick": 798,
1975
+ "sliding door": 799,
1976
+ "slot, one-armed bandit": 800,
1977
+ "sloth bear, Melursus ursinus, Ursus ursinus": 297,
1978
+ "slug": 114,
1979
+ "snail": 113,
1980
+ "snorkel": 801,
1981
+ "snow leopard, ounce, Panthera uncia": 289,
1982
+ "snowmobile": 802,
1983
+ "snowplow, snowplough": 803,
1984
+ "soap dispenser": 804,
1985
+ "soccer ball": 805,
1986
+ "sock": 806,
1987
+ "soft-coated wheaten terrier": 202,
1988
+ "solar dish, solar collector, solar furnace": 807,
1989
+ "sombrero": 808,
1990
+ "sorrel": 339,
1991
+ "soup bowl": 809,
1992
+ "space bar": 810,
1993
+ "space heater": 811,
1994
+ "space shuttle": 812,
1995
+ "spaghetti squash": 940,
1996
+ "spatula": 813,
1997
+ "speedboat": 814,
1998
+ "spider monkey, Ateles geoffroyi": 381,
1999
+ "spider web, spider's web": 815,
2000
+ "spindle": 816,
2001
+ "spiny lobster, langouste, rock lobster, crawfish, crayfish, sea crawfish": 123,
2002
+ "spoonbill": 129,
2003
+ "sports car, sport car": 817,
2004
+ "spotlight, spot": 818,
2005
+ "spotted salamander, Ambystoma maculatum": 28,
2006
+ "squirrel monkey, Saimiri sciureus": 382,
2007
+ "stage": 819,
2008
+ "standard poodle": 267,
2009
+ "standard schnauzer": 198,
2010
+ "starfish, sea star": 327,
2011
+ "steam locomotive": 820,
2012
+ "steel arch bridge": 821,
2013
+ "steel drum": 822,
2014
+ "stethoscope": 823,
2015
+ "stingray": 6,
2016
+ "stinkhorn, carrion fungus": 994,
2017
+ "stole": 824,
2018
+ "stone wall": 825,
2019
+ "stopwatch, stop watch": 826,
2020
+ "stove": 827,
2021
+ "strainer": 828,
2022
+ "strawberry": 949,
2023
+ "street sign": 919,
2024
+ "streetcar, tram, tramcar, trolley, trolley car": 829,
2025
+ "stretcher": 830,
2026
+ "studio couch, day bed": 831,
2027
+ "stupa, tope": 832,
2028
+ "sturgeon": 394,
2029
+ "submarine, pigboat, sub, U-boat": 833,
2030
+ "suit, suit of clothes": 834,
2031
+ "sulphur butterfly, sulfur butterfly": 325,
2032
+ "sulphur-crested cockatoo, Kakatoe galerita, Cacatua galerita": 89,
2033
+ "sundial": 835,
2034
+ "sunglass": 836,
2035
+ "sunglasses, dark glasses, shades": 837,
2036
+ "sunscreen, sunblock, sun blocker": 838,
2037
+ "suspension bridge": 839,
2038
+ "swab, swob, mop": 840,
2039
+ "sweatshirt": 841,
2040
+ "swimming trunks, bathing trunks": 842,
2041
+ "swing": 843,
2042
+ "switch, electric switch, electrical switch": 844,
2043
+ "syringe": 845,
2044
+ "tabby, tabby cat": 281,
2045
+ "table lamp": 846,
2046
+ "tailed frog, bell toad, ribbed toad, tailed toad, Ascaphus trui": 32,
2047
+ "tank, army tank, armored combat vehicle, armoured combat vehicle": 847,
2048
+ "tape player": 848,
2049
+ "tarantula": 76,
2050
+ "teapot": 849,
2051
+ "teddy, teddy bear": 850,
2052
+ "television, television system": 851,
2053
+ "tench, Tinca tinca": 0,
2054
+ "tennis ball": 852,
2055
+ "terrapin": 36,
2056
+ "thatch, thatched roof": 853,
2057
+ "theater curtain, theatre curtain": 854,
2058
+ "thimble": 855,
2059
+ "three-toed sloth, ai, Bradypus tridactylus": 364,
2060
+ "thresher, thrasher, threshing machine": 856,
2061
+ "throne": 857,
2062
+ "thunder snake, worm snake, Carphophis amoenus": 52,
2063
+ "tick": 78,
2064
+ "tiger beetle": 300,
2065
+ "tiger cat": 282,
2066
+ "tiger shark, Galeocerdo cuvieri": 3,
2067
+ "tiger, Panthera tigris": 292,
2068
+ "tile roof": 858,
2069
+ "timber wolf, grey wolf, gray wolf, Canis lupus": 269,
2070
+ "titi, titi monkey": 380,
2071
+ "toaster": 859,
2072
+ "tobacco shop, tobacconist shop, tobacconist": 860,
2073
+ "toilet seat": 861,
2074
+ "toilet tissue, toilet paper, bathroom tissue": 999,
2075
+ "torch": 862,
2076
+ "totem pole": 863,
2077
+ "toucan": 96,
2078
+ "tow truck, tow car, wrecker": 864,
2079
+ "toy poodle": 265,
2080
+ "toy terrier": 158,
2081
+ "toyshop": 865,
2082
+ "tractor": 866,
2083
+ "traffic light, traffic signal, stoplight": 920,
2084
+ "trailer truck, tractor trailer, trucking rig, rig, articulated lorry, semi": 867,
2085
+ "tray": 868,
2086
+ "tree frog, tree-frog": 31,
2087
+ "trench coat": 869,
2088
+ "triceratops": 51,
2089
+ "tricycle, trike, velocipede": 870,
2090
+ "trifle": 927,
2091
+ "trilobite": 69,
2092
+ "trimaran": 871,
2093
+ "tripod": 872,
2094
+ "triumphal arch": 873,
2095
+ "trolleybus, trolley coach, trackless trolley": 874,
2096
+ "trombone": 875,
2097
+ "tub, vat": 876,
2098
+ "turnstile": 877,
2099
+ "tusker": 101,
2100
+ "typewriter keyboard": 878,
2101
+ "umbrella": 879,
2102
+ "unicycle, monocycle": 880,
2103
+ "upright, upright piano": 881,
2104
+ "vacuum, vacuum cleaner": 882,
2105
+ "valley, vale": 979,
2106
+ "vase": 883,
2107
+ "vault": 884,
2108
+ "velvet": 885,
2109
+ "vending machine": 886,
2110
+ "vestment": 887,
2111
+ "viaduct": 888,
2112
+ "vine snake": 59,
2113
+ "violin, fiddle": 889,
2114
+ "vizsla, Hungarian pointer": 211,
2115
+ "volcano": 980,
2116
+ "volleyball": 890,
2117
+ "vulture": 23,
2118
+ "waffle iron": 891,
2119
+ "walking stick, walkingstick, stick insect": 313,
2120
+ "wall clock": 892,
2121
+ "wallaby, brush kangaroo": 104,
2122
+ "wallet, billfold, notecase, pocketbook": 893,
2123
+ "wardrobe, closet, press": 894,
2124
+ "warplane, military plane": 895,
2125
+ "warthog": 343,
2126
+ "washbasin, handbasin, washbowl, lavabo, wash-hand basin": 896,
2127
+ "washer, automatic washer, washing machine": 897,
2128
+ "water bottle": 898,
2129
+ "water buffalo, water ox, Asiatic buffalo, Bubalus bubalis": 346,
2130
+ "water jug": 899,
2131
+ "water ouzel, dipper": 20,
2132
+ "water snake": 58,
2133
+ "water tower": 900,
2134
+ "weasel": 356,
2135
+ "web site, website, internet site, site": 916,
2136
+ "weevil": 307,
2137
+ "whippet": 172,
2138
+ "whiptail, whiptail lizard": 41,
2139
+ "whiskey jug": 901,
2140
+ "whistle": 902,
2141
+ "white stork, Ciconia ciconia": 127,
2142
+ "white wolf, Arctic wolf, Canis lupus tundrarum": 270,
2143
+ "wig": 903,
2144
+ "wild boar, boar, Sus scrofa": 342,
2145
+ "window screen": 904,
2146
+ "window shade": 905,
2147
+ "wine bottle": 907,
2148
+ "wing": 908,
2149
+ "wire-haired fox terrier": 188,
2150
+ "wok": 909,
2151
+ "wolf spider, hunting spider": 77,
2152
+ "wombat": 106,
2153
+ "wood rabbit, cottontail, cottontail rabbit": 330,
2154
+ "wooden spoon": 910,
2155
+ "wool, woolen, woollen": 911,
2156
+ "worm fence, snake fence, snake-rail fence, Virginia fence": 912,
2157
+ "wreck": 913,
2158
+ "yawl": 914,
2159
+ "yellow lady's slipper, yellow lady-slipper, Cypripedium calceolus, Cypripedium parviflorum": 986,
2160
+ "yurt": 915,
2161
+ "zebra": 340,
2162
+ "zucchini, courgette": 939
2163
+ },
2164
+ "layer_norm_eps": 1e-12,
2165
+ "length_penalty": 1.0,
2166
+ "max_length": 20,
2167
+ "min_length": 0,
2168
+ "mlp_ratio": [
2169
+ 4.0,
2170
+ 4.0,
2171
+ 4.0
2172
+ ],
2173
+ "model_type": "cvt",
2174
+ "no_repeat_ngram_size": 0,
2175
+ "num_beam_groups": 1,
2176
+ "num_beams": 1,
2177
+ "num_channels": 3,
2178
+ "num_heads": [
2179
+ 1,
2180
+ 3,
2181
+ 6
2182
+ ],
2183
+ "num_return_sequences": 1,
2184
+ "num_stages": 3,
2185
+ "output_attentions": false,
2186
+ "output_hidden_states": false,
2187
+ "output_scores": false,
2188
+ "pad_token_id": null,
2189
+ "padding_kv": [
2190
+ 1,
2191
+ 1,
2192
+ 1
2193
+ ],
2194
+ "padding_q": [
2195
+ 1,
2196
+ 1,
2197
+ 1
2198
+ ],
2199
+ "patch_padding": [
2200
+ 2,
2201
+ 1,
2202
+ 1
2203
+ ],
2204
+ "patch_sizes": [
2205
+ 7,
2206
+ 3,
2207
+ 3
2208
+ ],
2209
+ "patch_stride": [
2210
+ 4,
2211
+ 2,
2212
+ 2
2213
+ ],
2214
+ "pos_embed": [
2215
+ false,
2216
+ false,
2217
+ false
2218
+ ],
2219
+ "prefix": null,
2220
+ "problem_type": null,
2221
+ "projection_size": 768,
2222
+ "pruned_heads": {},
2223
+ "qkv_bias": [
2224
+ true,
2225
+ true,
2226
+ true
2227
+ ],
2228
+ "qkv_projection_method": [
2229
+ "dw_bn",
2230
+ "dw_bn",
2231
+ "dw_bn"
2232
+ ],
2233
+ "remove_invalid_values": false,
2234
+ "repetition_penalty": 1.0,
2235
+ "return_dict": true,
2236
+ "return_dict_in_generate": false,
2237
+ "sep_token_id": null,
2238
+ "stride_kv": [
2239
+ 2,
2240
+ 2,
2241
+ 2
2242
+ ],
2243
+ "stride_q": [
2244
+ 1,
2245
+ 1,
2246
+ 1
2247
+ ],
2248
+ "suppress_tokens": null,
2249
+ "task_specific_params": null,
2250
+ "temperature": 1.0,
2251
+ "tf_legacy_loss": false,
2252
+ "tie_encoder_decoder": false,
2253
+ "tie_word_embeddings": true,
2254
+ "tokenizer_class": null,
2255
+ "top_k": 50,
2256
+ "top_p": 1.0,
2257
+ "torch_dtype": "float32",
2258
+ "torchscript": false,
2259
+ "transformers_version": "4.31.0",
2260
+ "typical_p": 1.0,
2261
+ "use_bfloat16": false
2262
+ },
2263
+ "is_encoder_decoder": true,
2264
+ "model_type": "vision-encoder-decoder",
2265
+ "tie_word_embeddings": false,
2266
+ "torch_dtype": "float32",
2267
+ "transformers_version": null
2268
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 50256,
4
+ "eos_token_id": 50256,
5
+ "transformers_version": "4.31.0"
6
+ }
modelling_medicap.py ADDED
@@ -0,0 +1,518 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from typing import Any, Optional, Tuple, Union
3
+
4
+ import torch
5
+ import transformers
6
+ from torch.nn import CrossEntropyLoss
7
+ from transformers import PreTrainedTokenizerFast, VisionEncoderDecoderModel
8
+ from transformers.configuration_utils import PretrainedConfig
9
+ from transformers.modeling_outputs import BaseModelOutput, Seq2SeqLMOutput
10
+ from transformers.modeling_utils import PreTrainedModel
11
+ from transformers.models.vision_encoder_decoder.configuration_vision_encoder_decoder import \
12
+ VisionEncoderDecoderConfig
13
+ from transformers.utils import logging
14
+
15
+ logger = logging.get_logger(__name__)
16
+
17
+
18
+ class CvtWithProjectionHeadConfig(transformers.CvtConfig):
19
+ def __init__(self, projection_size: int = None, **kwargs: Any) -> None:
20
+ super().__init__(**kwargs)
21
+ self.projection_size = projection_size
22
+
23
+
24
+ class ModelOutputWithProjectionEmbedding(transformers.modeling_outputs.ModelOutput):
25
+ last_hidden_state: torch.FloatTensor
26
+
27
+
28
+ class CvtProjectionHead(torch.nn.Module):
29
+
30
+ def __init__(self, config) -> None:
31
+ super().__init__()
32
+
33
+ # https://github.com/huggingface/transformers/blob/68287689f2f0d8b7063c400230b3766987abf18d/src/transformers/models/cvt/modeling_cvt.py#L657
34
+ self.layer_norm = torch.nn.LayerNorm(config.embed_dim[-1], eps=config.layer_norm_eps)
35
+
36
+ # No bias as following layer normalisation with bias:
37
+ self.projection = torch.nn.Linear(config.embed_dim[-1], config.projection_size, bias=False)
38
+
39
+
40
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
41
+ x = self.layer_norm(x)
42
+ x = self.projection(x)
43
+ return x
44
+
45
+
46
+ class CvtWithProjectionHead(transformers.CvtPreTrainedModel):
47
+ def __init__(self, config):
48
+ super().__init__(config)
49
+
50
+ self.cvt = transformers.CvtModel(config, add_pooling_layer=False)
51
+ self.projection_head = CvtProjectionHead(config)
52
+
53
+ # Initialize weights and apply final processing:
54
+ self.post_init()
55
+
56
+ def forward(
57
+ self,
58
+ pixel_values: Optional[torch.Tensor] = None,
59
+ output_hidden_states: Optional[bool] = None,
60
+ return_dict: Optional[bool] = None,
61
+ ) -> Union[Tuple, ModelOutputWithProjectionEmbedding]:
62
+
63
+ return_dict = return_dict if return_dict is not None else self.config.use_return_dict
64
+
65
+ outputs = self.cvt(
66
+ pixel_values,
67
+ output_hidden_states=output_hidden_states,
68
+ return_dict=return_dict,
69
+ )
70
+
71
+ projection = self.projection_head(
72
+ torch.permute(torch.flatten(outputs.last_hidden_state, 2), [0, 2, 1]),
73
+ )
74
+
75
+ if not return_dict:
76
+ return projection
77
+
78
+ return ModelOutputWithProjectionEmbedding(
79
+ last_hidden_state=projection,
80
+ )
81
+
82
+
83
+ class MedICapEncoderDecoderModel(VisionEncoderDecoderModel):
84
+
85
+ config_class = VisionEncoderDecoderConfig
86
+ base_model_prefix = "vision_encoder_decoder"
87
+ main_input_name = "pixel_values"
88
+ supports_gradient_checkpointing = True
89
+
90
+ def __init__(
91
+ self,
92
+ config: Optional[PretrainedConfig] = None,
93
+ encoder: Optional[PreTrainedModel] = None,
94
+ decoder: Optional[PreTrainedModel] = None,
95
+ ):
96
+
97
+ if decoder:
98
+ assert not decoder.config.add_cross_attention, '"add_cross_attention" must be False for the given decoder'
99
+ assert decoder.config.is_decoder, '"is_decoder" must be True for the given decoder'
100
+
101
+ if config is None and (encoder is None or decoder is None):
102
+ raise ValueError("Either a configuration or an encoder and a decoder has to be provided.")
103
+ if config is None:
104
+ config = VisionEncoderDecoderConfig.from_encoder_decoder_configs(encoder.config, decoder.config)
105
+ else:
106
+ if not isinstance(config, self.config_class):
107
+ raise ValueError(f"Config: {config} has to be of type {self.config_class}")
108
+
109
+ config.tie_word_embeddings = False
110
+
111
+ # initialize with config
112
+ PreTrainedModel.__init__(self, config)
113
+
114
+ # Encoder:
115
+ if encoder is None:
116
+ encoder = CvtWithProjectionHead(config=config.encoder)
117
+
118
+ # Decoder:
119
+ if decoder is None:
120
+ decoder = transformers.GPT2LMHeadModel(config=config.decoder)
121
+
122
+ # Resize GPT2 token embedding to include the padding and beginning of sentence tokens:
123
+ decoder.resize_token_embeddings(config.decoder.vocab_size + 2)
124
+
125
+ self.encoder = encoder
126
+ self.decoder = decoder
127
+
128
+ if self.encoder.config.to_dict() != self.config.encoder.to_dict():
129
+ logger.warning(
130
+ f"Config of the encoder: {self.encoder.__class__} is overwritten by shared encoder config:"
131
+ f" {self.config.encoder}"
132
+ )
133
+ if self.decoder.config.to_dict() != self.config.decoder.to_dict():
134
+ logger.warning(
135
+ f"Config of the decoder: {self.decoder.__class__} is overwritten by shared decoder config:"
136
+ f" {self.config.decoder}"
137
+ )
138
+
139
+ self.encoder.config = self.config.encoder
140
+ self.decoder.config = self.config.decoder
141
+
142
+ @classmethod
143
+ def from_encoder_decoder_pretrained(
144
+ cls,
145
+ encoder_pretrained_model_name_or_path: str = None,
146
+ decoder_pretrained_model_name_or_path: str = None,
147
+ *model_args,
148
+ **kwargs,
149
+ ) -> PreTrainedModel:
150
+ kwargs_encoder = {
151
+ argument[len("encoder_") :]: value for argument, value in kwargs.items() if argument.startswith("encoder_")
152
+ }
153
+
154
+ kwargs_decoder = {
155
+ argument[len("decoder_") :]: value for argument, value in kwargs.items() if argument.startswith("decoder_")
156
+ }
157
+
158
+ # remove encoder, decoder kwargs from kwargs
159
+ for key in kwargs_encoder.keys():
160
+ del kwargs["encoder_" + key]
161
+ for key in kwargs_decoder.keys():
162
+ del kwargs["decoder_" + key]
163
+
164
+ # Load and initialize the encoder and decoder
165
+ # The distinction between encoder and decoder at the model level is made
166
+ # by the value of the flag `is_decoder` that we need to set correctly.
167
+ encoder = kwargs_encoder.pop("model", None)
168
+ if encoder is None:
169
+ if encoder_pretrained_model_name_or_path is None:
170
+ raise ValueError(
171
+ "If `encoder_model` is not defined as an argument, a `encoder_pretrained_model_name_or_path` has "
172
+ "to be defined."
173
+ )
174
+
175
+ if "config" not in kwargs_encoder:
176
+ encoder_config, kwargs_encoder = AutoConfig.from_pretrained(
177
+ encoder_pretrained_model_name_or_path, **kwargs_encoder, return_unused_kwargs=True
178
+ )
179
+
180
+ if encoder_config.is_decoder is True or encoder_config.add_cross_attention is True:
181
+ logger.info(
182
+ f"Initializing {encoder_pretrained_model_name_or_path} as a encoder model "
183
+ "from a decoder model. Cross-attention and casual mask are disabled."
184
+ )
185
+ encoder_config.is_decoder = False
186
+ encoder_config.add_cross_attention = False
187
+
188
+ kwargs_encoder["config"] = encoder_config
189
+
190
+ encoder = AutoModel.from_pretrained(encoder_pretrained_model_name_or_path, *model_args, **kwargs_encoder)
191
+
192
+ decoder = kwargs_decoder.pop("model", None)
193
+ if decoder is None:
194
+ if decoder_pretrained_model_name_or_path is None:
195
+ raise ValueError(
196
+ "If `decoder_model` is not defined as an argument, a `decoder_pretrained_model_name_or_path` has "
197
+ "to be defined."
198
+ )
199
+
200
+ if "config" not in kwargs_decoder:
201
+ decoder_config, kwargs_decoder = AutoConfig.from_pretrained(
202
+ decoder_pretrained_model_name_or_path, **kwargs_decoder, return_unused_kwargs=True
203
+ )
204
+
205
+ if decoder_config.is_decoder is False or decoder_config.add_cross_attention is False:
206
+ logger.info(
207
+ f"Initializing {decoder_pretrained_model_name_or_path} as a decoder model. Cross attention"
208
+ f" layers are added to {decoder_pretrained_model_name_or_path} and randomly initialized if"
209
+ f" {decoder_pretrained_model_name_or_path}'s architecture allows for cross attention layers."
210
+ )
211
+ decoder_config.is_decoder = True
212
+ decoder_config.add_cross_attention = True
213
+
214
+ kwargs_decoder["config"] = decoder_config
215
+
216
+ if kwargs_decoder["config"].is_decoder is False or kwargs_decoder["config"].add_cross_attention is False:
217
+ logger.warning(
218
+ f"Decoder model {decoder_pretrained_model_name_or_path} is not initialized as a decoder. "
219
+ f"In order to initialize {decoder_pretrained_model_name_or_path} as a decoder, "
220
+ "make sure that the attributes `is_decoder` and `add_cross_attention` of `decoder_config` "
221
+ "passed to `.from_encoder_decoder_pretrained(...)` are set to `True` or do not pass a "
222
+ "`decoder_config` to `.from_encoder_decoder_pretrained(...)`"
223
+ )
224
+
225
+ decoder = AutoModelForCausalLM.from_pretrained(decoder_pretrained_model_name_or_path, **kwargs_decoder)
226
+
227
+ # instantiate config with corresponding kwargs
228
+ config = VisionEncoderDecoderConfig.from_encoder_decoder_configs(encoder.config, decoder.config, **kwargs)
229
+
230
+ # make sure input & output embeddings is not tied
231
+ config.tie_word_embeddings = False
232
+ return cls(encoder=encoder, decoder=decoder, config=config)
233
+
234
+ def forward(
235
+ self,
236
+ pixel_values: Optional[torch.FloatTensor] = None,
237
+ decoder_input_ids: Optional[torch.LongTensor] = None,
238
+ decoder_attention_mask: Optional[torch.BoolTensor] = None,
239
+ encoder_outputs: Optional[Tuple[torch.FloatTensor]] = None,
240
+ past_key_values: Optional[Tuple[Tuple[torch.FloatTensor]]] = None,
241
+ decoder_inputs_embeds: Optional[torch.FloatTensor] = None,
242
+ labels: Optional[torch.LongTensor] = None,
243
+ use_cache: Optional[bool] = None,
244
+ output_attentions: Optional[bool] = None,
245
+ output_hidden_states: Optional[bool] = None,
246
+ return_dict: Optional[bool] = None,
247
+ **kwargs,
248
+ ) -> Union[Tuple[torch.FloatTensor], Seq2SeqLMOutput]:
249
+
250
+ return_dict = return_dict if return_dict is not None else self.config.use_return_dict
251
+
252
+ kwargs_encoder = {argument: value for argument, value in kwargs.items() if not argument.startswith("decoder_")}
253
+
254
+ kwargs_decoder = {
255
+ argument[len("decoder_") :]: value for argument, value in kwargs.items() if argument.startswith("decoder_")
256
+ }
257
+
258
+ if encoder_outputs is None:
259
+ if pixel_values is None:
260
+ raise ValueError("You have to specify pixel_values")
261
+
262
+ encoder_outputs = self.encoder(
263
+ pixel_values,
264
+ output_hidden_states=output_hidden_states,
265
+ return_dict=return_dict,
266
+ **kwargs_encoder,
267
+ ) # CvT does not support output_attentions.
268
+ elif isinstance(encoder_outputs, tuple):
269
+ encoder_outputs = BaseModelOutput(*encoder_outputs)
270
+
271
+ # encoder_hidden_states = encoder_outputs[0]
272
+ # encoder_attention_mask = None
273
+
274
+ # image_features = self.encoder(images).projected_last_hidden_state
275
+
276
+ embeddings = self.decoder.transformer.wte(decoder_input_ids)
277
+ embeddings = torch.cat([encoder_outputs[0], embeddings], dim=1)
278
+
279
+ decoder_attention_mask = torch.cat(
280
+ [
281
+ torch.ones(encoder_outputs[0].shape[:-1], dtype=decoder_attention_mask.dtype, device=self.device),
282
+ decoder_attention_mask
283
+ ],
284
+ dim=1,
285
+ )
286
+
287
+ decoder_outputs = self.decoder(
288
+ input_ids=decoder_input_ids,
289
+ attention_mask=decoder_attention_mask,
290
+ inputs_embeds=decoder_inputs_embeds,
291
+ output_attentions=output_attentions,
292
+ output_hidden_states=output_hidden_states,
293
+ use_cache=use_cache,
294
+ past_key_values=past_key_values,
295
+ return_dict=return_dict,
296
+ **kwargs_decoder,
297
+ )
298
+
299
+ # Loss:
300
+ loss = None
301
+ if labels is not None:
302
+ logits = decoder_outputs.logits if return_dict else decoder_outputs[0]
303
+ loss_fct = CrossEntropyLoss()
304
+ loss = loss_fct(logits.reshape(-1, self.decoder.config.vocab_size), labels.reshape(-1))
305
+
306
+ if not return_dict:
307
+ if loss is not None:
308
+ return (loss,) + decoder_outputs + encoder_outputs
309
+ else:
310
+ return decoder_outputs + encoder_outputs
311
+
312
+ return Seq2SeqLMOutput(
313
+ loss=loss,
314
+ logits=decoder_outputs.logits,
315
+ past_key_values=decoder_outputs.past_key_values,
316
+ decoder_hidden_states=decoder_outputs.hidden_states,
317
+ decoder_attentions=decoder_outputs.attentions,
318
+ cross_attentions=decoder_outputs.cross_attentions,
319
+ encoder_last_hidden_state=encoder_outputs.last_hidden_state,
320
+ # encoder_hidden_states=encoder_outputs.hidden_states,
321
+ # encoder_attentions=encoder_outputs.attentions,
322
+ )
323
+
324
+ def prepare_inputs_for_generation(
325
+ self,
326
+ input_ids,
327
+ special_token_ids,
328
+ past_key_values=None,
329
+ attention_mask=None,
330
+ use_cache=None,
331
+ encoder_outputs=None,
332
+ **kwargs,
333
+ ):
334
+ """
335
+ Modification of:
336
+ https://github.com/huggingface/transformers/blob/main/src/transformers/models/encoder_decoder/modeling_encoder_decoder.py#L660
337
+ """
338
+
339
+ decoder_inputs = self.decoder.prepare_inputs_for_generation(input_ids, past_key_values=past_key_values)
340
+ decoder_attention_mask = decoder_inputs['attention_mask'] if 'attention_mask' in decoder_inputs else None
341
+
342
+ if not past_key_values:
343
+ token_type_ids = self.token_ids_to_token_type_ids(input_ids, special_token_ids)
344
+ else:
345
+ token_type_ids = self.token_ids_to_token_type_ids_past(input_ids, special_token_ids)
346
+
347
+ input_dict = {
348
+ 'attention_mask': attention_mask,
349
+ 'decoder_attention_mask': decoder_attention_mask,
350
+ 'decoder_input_ids': decoder_inputs['input_ids'],
351
+ 'decoder_token_type_ids': token_type_ids,
352
+ 'encoder_outputs': encoder_outputs,
353
+ 'past_key_values': decoder_inputs['past_key_values'],
354
+ 'use_cache': use_cache,
355
+ }
356
+ return input_dict
357
+
358
+ def token_ids_to_token_type_ids(self, token_ids, special_token_ids, token_type_id_sections=None):
359
+ """
360
+ Extract token type identifiers from the token identifiers.
361
+
362
+ Argument/s:
363
+ token_ids - token identifiers.
364
+ special_token_ids - special token identifiers that indicate the separation between sections.
365
+ token_type_id_section - token type identifier for each section.
366
+
367
+ Returns:
368
+ token_type_ids - token type identifiers.
369
+ """
370
+
371
+ token_type_id_sections = token_type_id_sections if token_type_id_sections is not None else list(range(len(special_token_ids) + 1))
372
+
373
+ mbatch_size, seq_len = token_ids.shape
374
+ token_type_ids = torch.full_like(token_ids, token_type_id_sections[0], dtype=torch.long, device=token_ids.device)
375
+
376
+ for i, j in enumerate(special_token_ids):
377
+ # Find first occurrence of special tokens that indicate the boundary between sections:
378
+ cols = (token_ids == j).int().argmax(dim=1)
379
+ rows = torch.arange(mbatch_size, device=token_ids.device)
380
+
381
+ # https://huggingface.co/docs/transformers/model_doc/bert#transformers.BertTokenizer.create_token_type_ids_from_sequences.example
382
+ cols += 1
383
+
384
+ # Ensure that the column index is not out of bounds. If 0, then token_id not present.
385
+ # This is safe as index 0 is always a special token (now equal to 1 due to +1):
386
+ rows = rows[torch.logical_and(cols != 1, cols < seq_len)]
387
+ cols = cols[torch.logical_and(cols != 1, cols < seq_len)]
388
+
389
+ # Indices to that correspond to the second sequence:
390
+ if rows.nelement() != 0:
391
+ ids = torch.stack([
392
+ torch.stack([x, z]) for (x, y) in zip(rows, cols) for z in torch.arange(
393
+ y, seq_len, device=token_ids.device,
394
+ )
395
+ ])
396
+
397
+ token_type_ids[ids[:, 0], ids[:, 1]] = token_type_id_sections[i + 1]
398
+
399
+ return token_type_ids
400
+
401
+ def token_ids_to_token_type_ids_past(self, token_ids, special_token_ids, token_type_id_sections=None):
402
+ """
403
+ Extract token type identifiers from the token identifiers if past != None.
404
+
405
+ Argument/s:
406
+ token_ids - token identifiers.
407
+ special_token_ids - special token identifiers that indicate the separation between sections.
408
+
409
+ Returns:
410
+ token_type_ids - token type identifiers.
411
+ """
412
+
413
+ token_type_id_sections = token_type_id_sections if token_type_id_sections is not None else list(range(len(special_token_ids) + 1))
414
+ token_type_ids = torch.full([token_ids.shape[0], 1], token_type_id_sections[0], dtype=torch.long, device=token_ids.device)
415
+
416
+ # https://huggingface.co/docs/transformers/model_doc/bert#transformers.BertTokenizer.create_token_type_ids_from_sequences.example
417
+ token_ids = token_ids[:, :-1]
418
+
419
+ for i, j in enumerate(special_token_ids):
420
+
421
+ # Find first occurrence of special token, which indicates the boundary between sections:
422
+ exists = torch.any(token_ids == j, dim=1, keepdim=True)
423
+ token_type_ids[exists] = token_type_id_sections[i + 1]
424
+
425
+ return token_type_ids
426
+
427
+ def tokenize_report_teacher_forcing(self, findings: str, impression: str, tokenizer: PreTrainedTokenizerFast, max_len: int):
428
+ """
429
+ Tokenize the reports and creates the inputs and targets for teacher forcing.
430
+
431
+ Argument/s:
432
+ findings - findings section.
433
+ impression - impression section.
434
+ return_token_type_ids - return the token type identifiers.
435
+ tokenizer - Hugging Face tokenizer.
436
+ max_len - maximum number of tokens.
437
+
438
+ Returns:
439
+ decoder_input_ids - the token identifiers for the input of the decoder.
440
+ decoder_attention_mask - the attention mask for the decoder_input_ids.
441
+ label_ids - the label token identifiers for the decoder.
442
+ """
443
+
444
+ # Prepare the sections for the tokenizer by placing special tokens between each section:
445
+ report = [f'{tokenizer.bos_token}{i}{tokenizer.sep_token}{j}{tokenizer.eos_token}' for i, j in
446
+ zip(findings, impression)]
447
+
448
+ # Tokenize the report:
449
+ tokenized = tokenizer(
450
+ report,
451
+ padding='longest',
452
+ truncation=True,
453
+ max_length=max_len + 1, # +1 to account for the bias between input and target.
454
+ return_tensors='pt',
455
+ return_token_type_ids=False,
456
+ add_special_tokens=False,
457
+ ).to(self.device)
458
+
459
+ # Modify for language modelling:
460
+ batch_dict = {
461
+
462
+ # Labels for the decoder (shifted right by one for autoregression):
463
+ 'label_ids': tokenized['input_ids'][:, 1:].detach().clone(),
464
+
465
+ # Remove last token identifier to match the sequence length of the labels:
466
+ 'decoder_input_ids': tokenized['input_ids'][:, :-1],
467
+
468
+ # Attention mask for the decoder_input_ids (remove first token so that the eos_token_id is not considered):
469
+ 'decoder_attention_mask': tokenized['attention_mask'][:, 1:],
470
+ }
471
+
472
+ return batch_dict
473
+
474
+ def split_and_decode_sections(self, token_ids, special_token_ids, tokenizer: PreTrainedTokenizerFast):
475
+ """
476
+ Split the token identifiers into sections, then convert the token identifiers into strings.
477
+
478
+ Argument/s:
479
+ token_ids - token identifiers.
480
+ special_token_ids - special token identifiers that indicate the end of each section.
481
+ tokenizer - Hugging Face tokenizer.
482
+
483
+ Returns:
484
+ token_type_ids - token type identifiers.
485
+ """
486
+
487
+ _, seq_len = token_ids.shape
488
+
489
+ # The number of sections is the same as the number of special_token_ids:
490
+ num_sections = len(special_token_ids)
491
+
492
+ sections = {k: [] for k in range(num_sections)}
493
+
494
+ for i in token_ids:
495
+ prev_col = 0
496
+ for j, k in enumerate(special_token_ids):
497
+
498
+ # The maximum sequence length was exceeded, thus no more tokens:
499
+ if prev_col >= seq_len:
500
+ sections[j].append('')
501
+ continue
502
+
503
+ # Find first occurrence of special tokens that indicate the boundary between sections:
504
+ col = (i == k).int().argmax().item()
505
+
506
+ # If equal to 0, token was not found, set the column to the sequence length (as the decoder exceeded
507
+ # the maximum sequence length):
508
+ if col == 0:
509
+ col = seq_len
510
+
511
+ # Extract section token identifiers:
512
+ section_token_ids = i[prev_col:col]
513
+ prev_col = col
514
+ section_string = tokenizer.decode(section_token_ids, skip_special_tokens=True)
515
+
516
+ sections[j].append(section_string)
517
+
518
+ return tuple(sections.values())
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:24d381da8c400df77a3c0584d68395b1f3c35c83162bea3f0221facbbbc2cb55
3
+ size 454257509