Entity icon indicating copy to clipboard operation
Entity copied to clipboard

KeyError: 'supercategory'

Open yajieC opened this issue 3 years ago • 1 comments

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) .

yajieC avatar Nov 30 '21 10:11 yajieC

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'.

Chuny1 avatar Dec 31 '21 07:12 Chuny1