coco_semantic.py 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # Copyright (c) OpenMMLab. All rights reserved.
  2. from mmdet.registry import DATASETS
  3. from .ade20k import ADE20KSegDataset
  4. @DATASETS.register_module()
  5. class CocoSegDataset(ADE20KSegDataset):
  6. """COCO dataset.
  7. In segmentation map annotation for COCO. The ``img_suffix`` is fixed to
  8. '.jpg', and ``seg_map_suffix`` is fixed to '.png'.
  9. """
  10. METAINFO = dict(
  11. classes=(
  12. 'person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus',
  13. 'train', 'truck', 'boat', 'traffic light', 'fire hydrant',
  14. 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog',
  15. 'horse', 'sheep', 'cow', 'elephant', 'bear', 'zebra', 'giraffe',
  16. 'backpack', 'umbrella', 'handbag', 'tie', 'suitcase', 'frisbee',
  17. 'skis', 'snowboard', 'sports ball', 'kite', 'baseball bat',
  18. 'baseball glove', 'skateboard', 'surfboard', 'tennis racket',
  19. 'bottle', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl',
  20. 'banana', 'apple', 'sandwich', 'orange', 'broccoli', 'carrot',
  21. 'hot dog', 'pizza', 'donut', 'cake', 'chair', 'couch',
  22. 'potted plant', 'bed', 'dining table', 'toilet', 'tv', 'laptop',
  23. 'mouse', 'remote', 'keyboard', 'cell phone', 'microwave', 'oven',
  24. 'toaster', 'sink', 'refrigerator', 'book', 'clock', 'vase',
  25. 'scissors', 'teddy bear', 'hair drier', 'toothbrush', 'banner',
  26. 'blanket', 'branch', 'bridge', 'building-other', 'bush', 'cabinet',
  27. 'cage', 'cardboard', 'carpet', 'ceiling-other', 'ceiling-tile',
  28. 'cloth', 'clothes', 'clouds', 'counter', 'cupboard', 'curtain',
  29. 'desk-stuff', 'dirt', 'door-stuff', 'fence', 'floor-marble',
  30. 'floor-other', 'floor-stone', 'floor-tile', 'floor-wood', 'flower',
  31. 'fog', 'food-other', 'fruit', 'furniture-other', 'grass', 'gravel',
  32. 'ground-other', 'hill', 'house', 'leaves', 'light', 'mat', 'metal',
  33. 'mirror-stuff', 'moss', 'mountain', 'mud', 'napkin', 'net',
  34. 'paper', 'pavement', 'pillow', 'plant-other', 'plastic',
  35. 'platform', 'playingfield', 'railing', 'railroad', 'river', 'road',
  36. 'rock', 'roof', 'rug', 'salad', 'sand', 'sea', 'shelf',
  37. 'sky-other', 'skyscraper', 'snow', 'solid-other', 'stairs',
  38. 'stone', 'straw', 'structural-other', 'table', 'tent',
  39. 'textile-other', 'towel', 'tree', 'vegetable', 'wall-brick',
  40. 'wall-concrete', 'wall-other', 'wall-panel', 'wall-stone',
  41. 'wall-tile', 'wall-wood', 'water-other', 'waterdrops',
  42. 'window-blind', 'window-other', 'wood'),
  43. palette=[(120, 120, 120), (180, 120, 120), (6, 230, 230), (80, 50, 50),
  44. (4, 200, 3), (120, 120, 80), (140, 140, 140), (204, 5, 255),
  45. (230, 230, 230), (4, 250, 7), (224, 5, 255), (235, 255, 7),
  46. (150, 5, 61), (120, 120, 70), (8, 255, 51), (255, 6, 82),
  47. (143, 255, 140), (204, 255, 4), (255, 51, 7), (204, 70, 3),
  48. (0, 102, 200), (61, 230, 250), (255, 6, 51), (11, 102, 255),
  49. (255, 7, 71), (255, 9, 224), (9, 7, 230), (220, 220, 220),
  50. (255, 9, 92), (112, 9, 255), (8, 255, 214), (7, 255, 224),
  51. (255, 184, 6), (10, 255, 71), (255, 41, 10), (7, 255, 255),
  52. (224, 255, 8), (102, 8, 255), (255, 61, 6), (255, 194, 7),
  53. (255, 122, 8), (0, 255, 20), (255, 8, 41), (255, 5, 153),
  54. (6, 51, 255), (235, 12, 255), (160, 150, 20), (0, 163, 255),
  55. (140, 140, 140), (250, 10, 15), (20, 255, 0), (31, 255, 0),
  56. (255, 31, 0), (255, 224, 0), (153, 255, 0), (0, 0, 255),
  57. (255, 71, 0), (0, 235, 255), (0, 173, 255), (31, 0, 255),
  58. (11, 200, 200), (255, 82, 0), (0, 255, 245), (0, 61, 255),
  59. (0, 255, 112), (0, 255, 133), (255, 0, 0), (255, 163, 0),
  60. (255, 102, 0), (194, 255, 0), (0, 143, 255), (51, 255, 0),
  61. (0, 82, 255), (0, 255, 41), (0, 255, 173), (10, 0, 255),
  62. (173, 255, 0), (0, 255, 153), (255, 92, 0), (255, 0, 255),
  63. (255, 0, 245), (255, 0, 102), (255, 173, 0), (255, 0, 20),
  64. (255, 184, 184), (0, 31, 255), (0, 255, 61), (0, 71, 255),
  65. (255, 0, 204), (0, 255, 194), (0, 255, 82), (0, 10, 255),
  66. (0, 112, 255), (51, 0, 255), (0, 194, 255), (0, 122, 255),
  67. (0, 255, 163), (255, 153, 0), (0, 255, 10), (255, 112, 0),
  68. (143, 255, 0), (82, 0, 255), (163, 255, 0), (255, 235, 0),
  69. (8, 184, 170), (133, 0, 255), (0, 255, 92), (184, 0, 255),
  70. (255, 0, 31), (0, 184, 255), (0, 214, 255), (255, 0, 112),
  71. (92, 255, 0), (0, 224, 255), (112, 224, 255), (70, 184, 160),
  72. (163, 0, 255), (153, 0, 255), (71, 255, 0), (255, 0, 163),
  73. (255, 204, 0), (255, 0, 143), (0, 255, 235), (133, 255, 0),
  74. (255, 0, 235), (245, 0, 255), (255, 0, 122), (255, 245, 0),
  75. (10, 190, 212), (214, 255, 0), (0, 204, 255), (20, 0, 255),
  76. (255, 255, 0), (0, 153, 255), (0, 41, 255), (0, 255, 204),
  77. (41, 0, 255), (41, 255, 0), (173, 0, 255), (0, 245, 255),
  78. (71, 0, 255), (122, 0, 255), (0, 255, 184), (0, 92, 255),
  79. (184, 255, 0), (0, 133, 255), (255, 214, 0), (25, 194, 194),
  80. (102, 255, 0), (92, 0, 255), (107, 255, 200), (58, 41, 149),
  81. (183, 121, 142), (255, 73, 97), (107, 142, 35),
  82. (190, 153, 153), (146, 139, 141), (70, 130, 180),
  83. (134, 199, 156), (209, 226, 140), (96, 36, 108), (96, 96, 96),
  84. (64, 170, 64), (152, 251, 152), (208, 229, 228),
  85. (206, 186, 171), (152, 161, 64), (116, 112, 0), (0, 114, 143),
  86. (102, 102, 156), (250, 141, 255)])