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

Generate semantic segmentation output as png #17

Closed
digvijayad opened this issue Jul 18, 2022 · 2 comments
Closed

Generate semantic segmentation output as png #17

digvijayad opened this issue Jul 18, 2022 · 2 comments

Comments

@digvijayad
Copy link

Hello,

I'm generating semantic segmentation using the following command.

python ./test.py ~/config.py --show-dir ~/Documents/bdd100k-models/data/bdd100k/labels/seg_track_20/val --opacity 1

This generates the colormaps for the images, however, the output produced is in .jpg format which results in blur within the labels (as shown below.) How can I update the script so that it generates the labels in png format. My input images are from the MOTS 2020 Images dataset, which are in jpg format.

image

@thomasehuang
Copy link
Collaborator

You may have to modify the mmsegmentation inference code to modify the saving of the images (see https://github.com/open-mmlab/mmsegmentation/blob/master/mmseg/apis/test.py). Or you can copy the function over to ./test.py and modify it there.

@digvijayad
Copy link
Author

Thanks, I modified the BDD100KSemSegDataset's format_results function based on the the cityscapes CustomDataset definition.

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