facebookresearch / detectron2

Detectron2 is a platform for object detection, segmentation and other visual recognition tasks.
https://detectron2.readthedocs.io/en/latest/
Apache License 2.0
29.92k stars 7.4k forks source link

KeyError: "Encountered category_id=2 but this id does not exist in 'categories' of the json file." #5335

Closed ALIOSKUPER closed 1 month ago

ALIOSKUPER commented 1 month ago

Hello, in using your own coco format dataset for data registration (register_coco_instances), use coco_val_metadata = metadatacatalg.get ("self_coco_val") dataset_dicts = DatasetCatalog.get("self_coco_val") The following problems arise when looking at the registered datasets KeyError: "Encountered category_id=2 but this id does not exist in 'categories' of the json file." Where my tag is labeled as DATA_ALL_CATEGORIES = [ {'id': 0, 'name': 'embedded'}, {'id': 1, 'name': 'isolated'}, ] I don't know how to deal with this problem. I hope to get your help

github-actions[bot] commented 1 month ago

You've chosen to report an unexpected problem or bug. Unless you already know the root cause of it, please include details about it by filling the issue template. The following information is missing: "Instructions To Reproduce the Issue and Full Logs"; "Your Environment";

github-actions[bot] commented 1 month ago

Requested information was not provided in 7 days, so we're closing this issue.

Please open new issue if information becomes available. Otherwise, use github discussions for free-form discussions.