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