SysCV / bdd100k-models

Model Zoo of BDD100K Dataset
https://www.bdd100k.com/
Apache License 2.0
300 stars 40 forks source link

Generate semantic segmentation output as png #17

Closed digvijayad closed 2 years ago

digvijayad commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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