mil-tokyo / MCD_DA

MIT License
559 stars 153 forks source link

Segmentation labels #2

Open kukuruza opened 6 years ago

kukuruza commented 6 years ago

Thank you for sharing the code! I am trying to run the segmentation task, and I am really confused about the segmentation labels.

What code do you run to transfer the original colored ground truth images of GTAV into the grayscale images with the 20 classes that you report on? The same question about Cityscrapes - the dataset has 33 classes. How do you turn them into 20?

kukuruza commented 6 years ago

I wrote two gists to convert GTAV and Cityscrapes labels to the format that MCA_DA expects. The links I used for the mappings are referenced in the gists.

labels_gtav_to_20classes.py labels_cityscrapes_to_20classes.py

LittleWat commented 6 years ago

Thank you for sharing the code!

It is one way to prepare the dataset whose class labels are converted before training models as you did.

However, there is another way to convert class labels if you just want to evaluate. The way is to prepare json files such as this (https://github.com/mil-tokyo/MCD_DA/blob/master/segmentation/dataset/synthia2cityscapes_info.json) and then to change this line (https://github.com/mil-tokyo/MCD_DA/blob/dca0861f0e5a6ca5558819182bbf9f0305750f14/segmentation/eval.py#L231 ) This way does not consume your data capacity because you can use the original dataset (do not have to prepare the dataset whose class ids are converted).