qqlu / Entity

EntitySeg Toolbox: Towards Open-World and High-Quality Image Segmentation
Other
698 stars 58 forks source link

KeyError: 'supercategory' #11

Open yajieC opened 2 years ago

yajieC commented 2 years ago

When I run "python3 entity_to_json.py", the following problems occur: Traceback (most recent call last): File "entity_to_json.py", line 23, in catid_map = {category['id']: [cid, category["isthing"], category["name"], category["supercategory"]] for cid, category in enumerate(categories_list)} File "entity_to_json.py", line 23, in catid_map = {category['id']: [cid, category["isthing"], category["name"], category["supercategory"]] for cid, category in enumerate(categories_list)} KeyError: 'supercategory'

I find that the problem occurs in categories_list, and there is no "supercategory" key in categories_list(from detectron2.data.datasets.builtin_meta import COCO_CATEGORIES) .

Chuny1 commented 2 years ago

Same Problem. You can download the json file from 'https://github.com/cocodataset/panopticapi/blob/master/panoptic_coco_categories.json' and load it as 'COCO_CATEGORIES'.