category.py 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827
  1. # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. from __future__ import absolute_import
  15. from __future__ import division
  16. from __future__ import print_function
  17. import os
  18. from paddlex.ppdet.data.source.voc import pascalvoc_label
  19. from paddlex.ppdet.data.source.widerface import widerface_label
  20. from paddlex.ppdet.utils.logger import setup_logger
  21. logger = setup_logger(__name__)
  22. __all__ = ['get_categories']
  23. def get_categories(metric_type, anno_file=None, arch=None):
  24. """
  25. Get class id to category id map and category id
  26. to category name map from annotation file.
  27. Args:
  28. metric_type (str): metric type, currently support 'coco', 'voc', 'oid'
  29. and 'widerface'.
  30. anno_file (str): annotation file path
  31. """
  32. if arch == 'keypoint_arch':
  33. return (None, {'id': 'keypoint'})
  34. if metric_type.lower() == 'coco' or metric_type.lower() == 'rbox':
  35. if anno_file and os.path.isfile(anno_file):
  36. # lazy import pycocotools here
  37. from pycocotools.coco import COCO
  38. coco = COCO(anno_file)
  39. cats = coco.loadCats(coco.getCatIds())
  40. clsid2catid = {i: cat['id'] for i, cat in enumerate(cats)}
  41. catid2name = {cat['id']: cat['name'] for cat in cats}
  42. return clsid2catid, catid2name
  43. # anno file not exist, load default categories of COCO17
  44. else:
  45. return _coco17_category()
  46. elif metric_type.lower() == 'voc':
  47. if anno_file and os.path.isfile(anno_file):
  48. cats = []
  49. with open(anno_file) as f:
  50. for line in f.readlines():
  51. cats.append(line.strip())
  52. if cats[0] == 'background':
  53. cats = cats[1:]
  54. clsid2catid = {i: i for i in range(len(cats))}
  55. catid2name = {i: name for i, name in enumerate(cats)}
  56. return clsid2catid, catid2name
  57. # anno file not exist, load default categories of
  58. # VOC all 20 categories
  59. else:
  60. return _vocall_category()
  61. elif metric_type.lower() == 'oid':
  62. if anno_file and os.path.isfile(anno_file):
  63. logger.warning("only default categories support for OID19")
  64. return _oid19_category()
  65. elif metric_type.lower() == 'widerface':
  66. return _widerface_category()
  67. elif metric_type.lower() == 'keypointtopdowncocoeval' or metric_type.lower(
  68. ) == 'keypointtopdownmpiieval':
  69. return (None, {'id': 'keypoint'})
  70. elif metric_type.lower() in ['mot', 'motdet', 'reid']:
  71. return _mot_category()
  72. elif metric_type.lower() in ['kitti', 'bdd100k']:
  73. return _mot_category(category='car')
  74. else:
  75. raise ValueError("unknown metric type {}".format(metric_type))
  76. def _mot_category(category='person'):
  77. """
  78. Get class id to category id map and category id
  79. to category name map of mot dataset
  80. """
  81. label_map = {category: 0}
  82. label_map = sorted(label_map.items(), key=lambda x: x[1])
  83. cats = [l[0] for l in label_map]
  84. clsid2catid = {i: i for i in range(len(cats))}
  85. catid2name = {i: name for i, name in enumerate(cats)}
  86. return clsid2catid, catid2name
  87. def _coco17_category():
  88. """
  89. Get class id to category id map and category id
  90. to category name map of COCO2017 dataset
  91. """
  92. clsid2catid = {
  93. 1: 1,
  94. 2: 2,
  95. 3: 3,
  96. 4: 4,
  97. 5: 5,
  98. 6: 6,
  99. 7: 7,
  100. 8: 8,
  101. 9: 9,
  102. 10: 10,
  103. 11: 11,
  104. 12: 13,
  105. 13: 14,
  106. 14: 15,
  107. 15: 16,
  108. 16: 17,
  109. 17: 18,
  110. 18: 19,
  111. 19: 20,
  112. 20: 21,
  113. 21: 22,
  114. 22: 23,
  115. 23: 24,
  116. 24: 25,
  117. 25: 27,
  118. 26: 28,
  119. 27: 31,
  120. 28: 32,
  121. 29: 33,
  122. 30: 34,
  123. 31: 35,
  124. 32: 36,
  125. 33: 37,
  126. 34: 38,
  127. 35: 39,
  128. 36: 40,
  129. 37: 41,
  130. 38: 42,
  131. 39: 43,
  132. 40: 44,
  133. 41: 46,
  134. 42: 47,
  135. 43: 48,
  136. 44: 49,
  137. 45: 50,
  138. 46: 51,
  139. 47: 52,
  140. 48: 53,
  141. 49: 54,
  142. 50: 55,
  143. 51: 56,
  144. 52: 57,
  145. 53: 58,
  146. 54: 59,
  147. 55: 60,
  148. 56: 61,
  149. 57: 62,
  150. 58: 63,
  151. 59: 64,
  152. 60: 65,
  153. 61: 67,
  154. 62: 70,
  155. 63: 72,
  156. 64: 73,
  157. 65: 74,
  158. 66: 75,
  159. 67: 76,
  160. 68: 77,
  161. 69: 78,
  162. 70: 79,
  163. 71: 80,
  164. 72: 81,
  165. 73: 82,
  166. 74: 84,
  167. 75: 85,
  168. 76: 86,
  169. 77: 87,
  170. 78: 88,
  171. 79: 89,
  172. 80: 90
  173. }
  174. catid2name = {
  175. 0: 'background',
  176. 1: 'person',
  177. 2: 'bicycle',
  178. 3: 'car',
  179. 4: 'motorcycle',
  180. 5: 'airplane',
  181. 6: 'bus',
  182. 7: 'train',
  183. 8: 'truck',
  184. 9: 'boat',
  185. 10: 'traffic light',
  186. 11: 'fire hydrant',
  187. 13: 'stop sign',
  188. 14: 'parking meter',
  189. 15: 'bench',
  190. 16: 'bird',
  191. 17: 'cat',
  192. 18: 'dog',
  193. 19: 'horse',
  194. 20: 'sheep',
  195. 21: 'cow',
  196. 22: 'elephant',
  197. 23: 'bear',
  198. 24: 'zebra',
  199. 25: 'giraffe',
  200. 27: 'backpack',
  201. 28: 'umbrella',
  202. 31: 'handbag',
  203. 32: 'tie',
  204. 33: 'suitcase',
  205. 34: 'frisbee',
  206. 35: 'skis',
  207. 36: 'snowboard',
  208. 37: 'sports ball',
  209. 38: 'kite',
  210. 39: 'baseball bat',
  211. 40: 'baseball glove',
  212. 41: 'skateboard',
  213. 42: 'surfboard',
  214. 43: 'tennis racket',
  215. 44: 'bottle',
  216. 46: 'wine glass',
  217. 47: 'cup',
  218. 48: 'fork',
  219. 49: 'knife',
  220. 50: 'spoon',
  221. 51: 'bowl',
  222. 52: 'banana',
  223. 53: 'apple',
  224. 54: 'sandwich',
  225. 55: 'orange',
  226. 56: 'broccoli',
  227. 57: 'carrot',
  228. 58: 'hot dog',
  229. 59: 'pizza',
  230. 60: 'donut',
  231. 61: 'cake',
  232. 62: 'chair',
  233. 63: 'couch',
  234. 64: 'potted plant',
  235. 65: 'bed',
  236. 67: 'dining table',
  237. 70: 'toilet',
  238. 72: 'tv',
  239. 73: 'laptop',
  240. 74: 'mouse',
  241. 75: 'remote',
  242. 76: 'keyboard',
  243. 77: 'cell phone',
  244. 78: 'microwave',
  245. 79: 'oven',
  246. 80: 'toaster',
  247. 81: 'sink',
  248. 82: 'refrigerator',
  249. 84: 'book',
  250. 85: 'clock',
  251. 86: 'vase',
  252. 87: 'scissors',
  253. 88: 'teddy bear',
  254. 89: 'hair drier',
  255. 90: 'toothbrush'
  256. }
  257. clsid2catid = {k - 1: v for k, v in clsid2catid.items()}
  258. catid2name.pop(0)
  259. return clsid2catid, catid2name
  260. def _vocall_category():
  261. """
  262. Get class id to category id map and category id
  263. to category name map of mixup voc dataset
  264. """
  265. label_map = pascalvoc_label()
  266. label_map = sorted(label_map.items(), key=lambda x: x[1])
  267. cats = [l[0] for l in label_map]
  268. clsid2catid = {i: i for i in range(len(cats))}
  269. catid2name = {i: name for i, name in enumerate(cats)}
  270. return clsid2catid, catid2name
  271. def _widerface_category():
  272. label_map = widerface_label()
  273. label_map = sorted(label_map.items(), key=lambda x: x[1])
  274. cats = [l[0] for l in label_map]
  275. clsid2catid = {i: i for i in range(len(cats))}
  276. catid2name = {i: name for i, name in enumerate(cats)}
  277. return clsid2catid, catid2name
  278. def _oid19_category():
  279. clsid2catid = {k: k + 1 for k in range(500)}
  280. catid2name = {
  281. 0: "background",
  282. 1: "Infant bed",
  283. 2: "Rose",
  284. 3: "Flag",
  285. 4: "Flashlight",
  286. 5: "Sea turtle",
  287. 6: "Camera",
  288. 7: "Animal",
  289. 8: "Glove",
  290. 9: "Crocodile",
  291. 10: "Cattle",
  292. 11: "House",
  293. 12: "Guacamole",
  294. 13: "Penguin",
  295. 14: "Vehicle registration plate",
  296. 15: "Bench",
  297. 16: "Ladybug",
  298. 17: "Human nose",
  299. 18: "Watermelon",
  300. 19: "Flute",
  301. 20: "Butterfly",
  302. 21: "Washing machine",
  303. 22: "Raccoon",
  304. 23: "Segway",
  305. 24: "Taco",
  306. 25: "Jellyfish",
  307. 26: "Cake",
  308. 27: "Pen",
  309. 28: "Cannon",
  310. 29: "Bread",
  311. 30: "Tree",
  312. 31: "Shellfish",
  313. 32: "Bed",
  314. 33: "Hamster",
  315. 34: "Hat",
  316. 35: "Toaster",
  317. 36: "Sombrero",
  318. 37: "Tiara",
  319. 38: "Bowl",
  320. 39: "Dragonfly",
  321. 40: "Moths and butterflies",
  322. 41: "Antelope",
  323. 42: "Vegetable",
  324. 43: "Torch",
  325. 44: "Building",
  326. 45: "Power plugs and sockets",
  327. 46: "Blender",
  328. 47: "Billiard table",
  329. 48: "Cutting board",
  330. 49: "Bronze sculpture",
  331. 50: "Turtle",
  332. 51: "Broccoli",
  333. 52: "Tiger",
  334. 53: "Mirror",
  335. 54: "Bear",
  336. 55: "Zucchini",
  337. 56: "Dress",
  338. 57: "Volleyball",
  339. 58: "Guitar",
  340. 59: "Reptile",
  341. 60: "Golf cart",
  342. 61: "Tart",
  343. 62: "Fedora",
  344. 63: "Carnivore",
  345. 64: "Car",
  346. 65: "Lighthouse",
  347. 66: "Coffeemaker",
  348. 67: "Food processor",
  349. 68: "Truck",
  350. 69: "Bookcase",
  351. 70: "Surfboard",
  352. 71: "Footwear",
  353. 72: "Bench",
  354. 73: "Necklace",
  355. 74: "Flower",
  356. 75: "Radish",
  357. 76: "Marine mammal",
  358. 77: "Frying pan",
  359. 78: "Tap",
  360. 79: "Peach",
  361. 80: "Knife",
  362. 81: "Handbag",
  363. 82: "Laptop",
  364. 83: "Tent",
  365. 84: "Ambulance",
  366. 85: "Christmas tree",
  367. 86: "Eagle",
  368. 87: "Limousine",
  369. 88: "Kitchen & dining room table",
  370. 89: "Polar bear",
  371. 90: "Tower",
  372. 91: "Football",
  373. 92: "Willow",
  374. 93: "Human head",
  375. 94: "Stop sign",
  376. 95: "Banana",
  377. 96: "Mixer",
  378. 97: "Binoculars",
  379. 98: "Dessert",
  380. 99: "Bee",
  381. 100: "Chair",
  382. 101: "Wood-burning stove",
  383. 102: "Flowerpot",
  384. 103: "Beaker",
  385. 104: "Oyster",
  386. 105: "Woodpecker",
  387. 106: "Harp",
  388. 107: "Bathtub",
  389. 108: "Wall clock",
  390. 109: "Sports uniform",
  391. 110: "Rhinoceros",
  392. 111: "Beehive",
  393. 112: "Cupboard",
  394. 113: "Chicken",
  395. 114: "Man",
  396. 115: "Blue jay",
  397. 116: "Cucumber",
  398. 117: "Balloon",
  399. 118: "Kite",
  400. 119: "Fireplace",
  401. 120: "Lantern",
  402. 121: "Missile",
  403. 122: "Book",
  404. 123: "Spoon",
  405. 124: "Grapefruit",
  406. 125: "Squirrel",
  407. 126: "Orange",
  408. 127: "Coat",
  409. 128: "Punching bag",
  410. 129: "Zebra",
  411. 130: "Billboard",
  412. 131: "Bicycle",
  413. 132: "Door handle",
  414. 133: "Mechanical fan",
  415. 134: "Ring binder",
  416. 135: "Table",
  417. 136: "Parrot",
  418. 137: "Sock",
  419. 138: "Vase",
  420. 139: "Weapon",
  421. 140: "Shotgun",
  422. 141: "Glasses",
  423. 142: "Seahorse",
  424. 143: "Belt",
  425. 144: "Watercraft",
  426. 145: "Window",
  427. 146: "Giraffe",
  428. 147: "Lion",
  429. 148: "Tire",
  430. 149: "Vehicle",
  431. 150: "Canoe",
  432. 151: "Tie",
  433. 152: "Shelf",
  434. 153: "Picture frame",
  435. 154: "Printer",
  436. 155: "Human leg",
  437. 156: "Boat",
  438. 157: "Slow cooker",
  439. 158: "Croissant",
  440. 159: "Candle",
  441. 160: "Pancake",
  442. 161: "Pillow",
  443. 162: "Coin",
  444. 163: "Stretcher",
  445. 164: "Sandal",
  446. 165: "Woman",
  447. 166: "Stairs",
  448. 167: "Harpsichord",
  449. 168: "Stool",
  450. 169: "Bus",
  451. 170: "Suitcase",
  452. 171: "Human mouth",
  453. 172: "Juice",
  454. 173: "Skull",
  455. 174: "Door",
  456. 175: "Violin",
  457. 176: "Chopsticks",
  458. 177: "Digital clock",
  459. 178: "Sunflower",
  460. 179: "Leopard",
  461. 180: "Bell pepper",
  462. 181: "Harbor seal",
  463. 182: "Snake",
  464. 183: "Sewing machine",
  465. 184: "Goose",
  466. 185: "Helicopter",
  467. 186: "Seat belt",
  468. 187: "Coffee cup",
  469. 188: "Microwave oven",
  470. 189: "Hot dog",
  471. 190: "Countertop",
  472. 191: "Serving tray",
  473. 192: "Dog bed",
  474. 193: "Beer",
  475. 194: "Sunglasses",
  476. 195: "Golf ball",
  477. 196: "Waffle",
  478. 197: "Palm tree",
  479. 198: "Trumpet",
  480. 199: "Ruler",
  481. 200: "Helmet",
  482. 201: "Ladder",
  483. 202: "Office building",
  484. 203: "Tablet computer",
  485. 204: "Toilet paper",
  486. 205: "Pomegranate",
  487. 206: "Skirt",
  488. 207: "Gas stove",
  489. 208: "Cookie",
  490. 209: "Cart",
  491. 210: "Raven",
  492. 211: "Egg",
  493. 212: "Burrito",
  494. 213: "Goat",
  495. 214: "Kitchen knife",
  496. 215: "Skateboard",
  497. 216: "Salt and pepper shakers",
  498. 217: "Lynx",
  499. 218: "Boot",
  500. 219: "Platter",
  501. 220: "Ski",
  502. 221: "Swimwear",
  503. 222: "Swimming pool",
  504. 223: "Drinking straw",
  505. 224: "Wrench",
  506. 225: "Drum",
  507. 226: "Ant",
  508. 227: "Human ear",
  509. 228: "Headphones",
  510. 229: "Fountain",
  511. 230: "Bird",
  512. 231: "Jeans",
  513. 232: "Television",
  514. 233: "Crab",
  515. 234: "Microphone",
  516. 235: "Home appliance",
  517. 236: "Snowplow",
  518. 237: "Beetle",
  519. 238: "Artichoke",
  520. 239: "Jet ski",
  521. 240: "Stationary bicycle",
  522. 241: "Human hair",
  523. 242: "Brown bear",
  524. 243: "Starfish",
  525. 244: "Fork",
  526. 245: "Lobster",
  527. 246: "Corded phone",
  528. 247: "Drink",
  529. 248: "Saucer",
  530. 249: "Carrot",
  531. 250: "Insect",
  532. 251: "Clock",
  533. 252: "Castle",
  534. 253: "Tennis racket",
  535. 254: "Ceiling fan",
  536. 255: "Asparagus",
  537. 256: "Jaguar",
  538. 257: "Musical instrument",
  539. 258: "Train",
  540. 259: "Cat",
  541. 260: "Rifle",
  542. 261: "Dumbbell",
  543. 262: "Mobile phone",
  544. 263: "Taxi",
  545. 264: "Shower",
  546. 265: "Pitcher",
  547. 266: "Lemon",
  548. 267: "Invertebrate",
  549. 268: "Turkey",
  550. 269: "High heels",
  551. 270: "Bust",
  552. 271: "Elephant",
  553. 272: "Scarf",
  554. 273: "Barrel",
  555. 274: "Trombone",
  556. 275: "Pumpkin",
  557. 276: "Box",
  558. 277: "Tomato",
  559. 278: "Frog",
  560. 279: "Bidet",
  561. 280: "Human face",
  562. 281: "Houseplant",
  563. 282: "Van",
  564. 283: "Shark",
  565. 284: "Ice cream",
  566. 285: "Swim cap",
  567. 286: "Falcon",
  568. 287: "Ostrich",
  569. 288: "Handgun",
  570. 289: "Whiteboard",
  571. 290: "Lizard",
  572. 291: "Pasta",
  573. 292: "Snowmobile",
  574. 293: "Light bulb",
  575. 294: "Window blind",
  576. 295: "Muffin",
  577. 296: "Pretzel",
  578. 297: "Computer monitor",
  579. 298: "Horn",
  580. 299: "Furniture",
  581. 300: "Sandwich",
  582. 301: "Fox",
  583. 302: "Convenience store",
  584. 303: "Fish",
  585. 304: "Fruit",
  586. 305: "Earrings",
  587. 306: "Curtain",
  588. 307: "Grape",
  589. 308: "Sofa bed",
  590. 309: "Horse",
  591. 310: "Luggage and bags",
  592. 311: "Desk",
  593. 312: "Crutch",
  594. 313: "Bicycle helmet",
  595. 314: "Tick",
  596. 315: "Airplane",
  597. 316: "Canary",
  598. 317: "Spatula",
  599. 318: "Watch",
  600. 319: "Lily",
  601. 320: "Kitchen appliance",
  602. 321: "Filing cabinet",
  603. 322: "Aircraft",
  604. 323: "Cake stand",
  605. 324: "Candy",
  606. 325: "Sink",
  607. 326: "Mouse",
  608. 327: "Wine",
  609. 328: "Wheelchair",
  610. 329: "Goldfish",
  611. 330: "Refrigerator",
  612. 331: "French fries",
  613. 332: "Drawer",
  614. 333: "Treadmill",
  615. 334: "Picnic basket",
  616. 335: "Dice",
  617. 336: "Cabbage",
  618. 337: "Football helmet",
  619. 338: "Pig",
  620. 339: "Person",
  621. 340: "Shorts",
  622. 341: "Gondola",
  623. 342: "Honeycomb",
  624. 343: "Doughnut",
  625. 344: "Chest of drawers",
  626. 345: "Land vehicle",
  627. 346: "Bat",
  628. 347: "Monkey",
  629. 348: "Dagger",
  630. 349: "Tableware",
  631. 350: "Human foot",
  632. 351: "Mug",
  633. 352: "Alarm clock",
  634. 353: "Pressure cooker",
  635. 354: "Human hand",
  636. 355: "Tortoise",
  637. 356: "Baseball glove",
  638. 357: "Sword",
  639. 358: "Pear",
  640. 359: "Miniskirt",
  641. 360: "Traffic sign",
  642. 361: "Girl",
  643. 362: "Roller skates",
  644. 363: "Dinosaur",
  645. 364: "Porch",
  646. 365: "Human beard",
  647. 366: "Submarine sandwich",
  648. 367: "Screwdriver",
  649. 368: "Strawberry",
  650. 369: "Wine glass",
  651. 370: "Seafood",
  652. 371: "Racket",
  653. 372: "Wheel",
  654. 373: "Sea lion",
  655. 374: "Toy",
  656. 375: "Tea",
  657. 376: "Tennis ball",
  658. 377: "Waste container",
  659. 378: "Mule",
  660. 379: "Cricket ball",
  661. 380: "Pineapple",
  662. 381: "Coconut",
  663. 382: "Doll",
  664. 383: "Coffee table",
  665. 384: "Snowman",
  666. 385: "Lavender",
  667. 386: "Shrimp",
  668. 387: "Maple",
  669. 388: "Cowboy hat",
  670. 389: "Goggles",
  671. 390: "Rugby ball",
  672. 391: "Caterpillar",
  673. 392: "Poster",
  674. 393: "Rocket",
  675. 394: "Organ",
  676. 395: "Saxophone",
  677. 396: "Traffic light",
  678. 397: "Cocktail",
  679. 398: "Plastic bag",
  680. 399: "Squash",
  681. 400: "Mushroom",
  682. 401: "Hamburger",
  683. 402: "Light switch",
  684. 403: "Parachute",
  685. 404: "Teddy bear",
  686. 405: "Winter melon",
  687. 406: "Deer",
  688. 407: "Musical keyboard",
  689. 408: "Plumbing fixture",
  690. 409: "Scoreboard",
  691. 410: "Baseball bat",
  692. 411: "Envelope",
  693. 412: "Adhesive tape",
  694. 413: "Briefcase",
  695. 414: "Paddle",
  696. 415: "Bow and arrow",
  697. 416: "Telephone",
  698. 417: "Sheep",
  699. 418: "Jacket",
  700. 419: "Boy",
  701. 420: "Pizza",
  702. 421: "Otter",
  703. 422: "Office supplies",
  704. 423: "Couch",
  705. 424: "Cello",
  706. 425: "Bull",
  707. 426: "Camel",
  708. 427: "Ball",
  709. 428: "Duck",
  710. 429: "Whale",
  711. 430: "Shirt",
  712. 431: "Tank",
  713. 432: "Motorcycle",
  714. 433: "Accordion",
  715. 434: "Owl",
  716. 435: "Porcupine",
  717. 436: "Sun hat",
  718. 437: "Nail",
  719. 438: "Scissors",
  720. 439: "Swan",
  721. 440: "Lamp",
  722. 441: "Crown",
  723. 442: "Piano",
  724. 443: "Sculpture",
  725. 444: "Cheetah",
  726. 445: "Oboe",
  727. 446: "Tin can",
  728. 447: "Mango",
  729. 448: "Tripod",
  730. 449: "Oven",
  731. 450: "Mouse",
  732. 451: "Barge",
  733. 452: "Coffee",
  734. 453: "Snowboard",
  735. 454: "Common fig",
  736. 455: "Salad",
  737. 456: "Marine invertebrates",
  738. 457: "Umbrella",
  739. 458: "Kangaroo",
  740. 459: "Human arm",
  741. 460: "Measuring cup",
  742. 461: "Snail",
  743. 462: "Loveseat",
  744. 463: "Suit",
  745. 464: "Teapot",
  746. 465: "Bottle",
  747. 466: "Alpaca",
  748. 467: "Kettle",
  749. 468: "Trousers",
  750. 469: "Popcorn",
  751. 470: "Centipede",
  752. 471: "Spider",
  753. 472: "Sparrow",
  754. 473: "Plate",
  755. 474: "Bagel",
  756. 475: "Personal care",
  757. 476: "Apple",
  758. 477: "Brassiere",
  759. 478: "Bathroom cabinet",
  760. 479: "studio couch",
  761. 480: "Computer keyboard",
  762. 481: "Table tennis racket",
  763. 482: "Sushi",
  764. 483: "Cabinetry",
  765. 484: "Street light",
  766. 485: "Towel",
  767. 486: "Nightstand",
  768. 487: "Rabbit",
  769. 488: "Dolphin",
  770. 489: "Dog",
  771. 490: "Jug",
  772. 491: "Wok",
  773. 492: "Fire hydrant",
  774. 493: "Human eye",
  775. 494: "Skyscraper",
  776. 495: "Backpack",
  777. 496: "Potato",
  778. 497: "Paper towel",
  779. 498: "Lifejacket",
  780. 499: "Bicycle wheel",
  781. 500: "Toilet",
  782. }
  783. return clsid2catid, catid2name