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

How can we convert the panoptic annotations to coco instance.json format? #4

Open
yaoshanliang opened this issue Oct 18, 2024 · 1 comment

Comments

@yaoshanliang
Copy link

The original Mask2Former repo requires instance.json labels. However, I faced challenges when I tried to convert panoptic.json to instance.json. Could you please provide the instance labels, or do you know how to do the convertion? Thanks in advance.

@lojzezust
Copy link
Owner

It should be possible to convert labels in the COCO panoptic format (JSON + mask PNGs) to the COCO instance format. Details about the formats can be found here. The difficult part might be RLE encoding the masks (only the part inside the bbox).

However, I believe Mask2Former should support training from panoptic annotations only. Note that sometimes instances.json are used for evaluation only, and not needed for training.

You can also take a look at the mmdetection implementation of Mask2Former. For that one I know it's possible to train without instance JSON files. This fork even contains some basic configs and conversion scripts for LaRS, you might find useful.

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

2 participants