Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'color' when running panoptic2detection_coco_format.py #33

Open
vighneshbirodkar opened this issue Mar 3, 2020 · 2 comments

Comments

@vighneshbirodkar
Copy link

Hello

I am trying to run the script panoptic2detection_coco_format.py

My full command is

python converters/panoptic2detection_coco_format.py   --input_json_file ~/data/coco_panoptic/annotations/panoptic_val2017.json --categories_json_file ./panoptic_coco_categories.json  --segmentations_folder ~/data/coco_panoptic/annotations/panoptic_val2017  --output_json_file ~/data/coco_panoptic/annotations/converted/panoptic2det_val2017.json

However, after a few seconds of processing the script errors out with

Traceback (most recent call last):
  File "converters/panoptic2detection_coco_format.py", line 153, in <module>
    args.things_only)
  File "converters/panoptic2detection_coco_format.py", line 120, in convert_panoptic_to_detection_coco_format
    category.pop('color')
KeyError: 'color'

I was wondering is this was a bug or a mistake in how I am invoking the converter. Any help would be appreciated.

Thanks
Vighnesh

@gouthamvgk
Copy link

Comment out line 120 in panoptic2detection_coco_format.py and it runs fine. They are poping the key 'color' from the dictionary of each category, but the key 'color' is actually not present in the annotations.

@zeng-hello-world
Copy link

I tried the same operation with yours.
The coco detection annotaion json file does not have color in categories, but the coco detection examples json file in this panoptic folder does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants