yttdebaba commited on
Commit
9d5f243
·
verified ·
1 Parent(s): 9975c05

Upload 5 files

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