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

Segmentation labels #2

Open
kukuruza opened this issue May 5, 2018 · 2 comments
Open

Segmentation labels #2

kukuruza opened this issue May 5, 2018 · 2 comments

Comments

@kukuruza
Copy link

kukuruza commented May 5, 2018

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
Copy link
Author

kukuruza commented May 7, 2018

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
Copy link
Contributor

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 (

mapping = np.array(info['label2train'], dtype=np.int) # Not use

) 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).

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