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

labeltrainId.png #6

Closed
anqingjianke opened this issue Nov 17, 2017 · 6 comments
Closed

labeltrainId.png #6

anqingjianke opened this issue Nov 17, 2017 · 6 comments

Comments

@anqingjianke
Copy link

Hi, I have a small question.
I didn't find labeltrainId.png data that list in your "train_list.txt". The Cityscapes dataset only includes labelId.png. So are they same data? Since I used labelId.png instead, training model can not converge.
Thank you.

@hellochick
Copy link
Owner

Hey, they are data converted by the code in https://github.com/mcordts/cityscapesScripts/tree/master/cityscapesscripts/preparation
You can take a look on it

@anqingjianke
Copy link
Author

@hellochick Thanks a lot, I got it.
So, I also confused about whether should I change "tf.one_hot" to "true"? I also do not understand how the net can get label ID in preprocessing step.
Thanks again!

@hellochick
Copy link
Owner

@anqingjianke, since tf.nn.sparse_softmax_cross_entropy_with_logits has the definition like following:

A common use case is to have logits of shape [batch_size, num_classes] and labels of shape [batch_size]. 

So, we can just feed the label without one_hot signal.

For another question, we can get label ID according to the pixel value in the image ( gray scale 0-255 )

@anqingjianke
Copy link
Author

However, for instance, if I use "labelId.png" as ground-truth, the pixel value is not from 0 to 19(20 classes).
I got that the pixel value of road is 7(class 0), building is 11(class 2), and so on.
So without one-hot, I wonder how can we change label to "(1,class_number)" vector?

@hellochick
Copy link
Owner

hellochick commented Nov 17, 2017

So, We need to transform labelId.png to labelTrainIds.png. You can take a look on the content of it.

frankfurt_000000_000294_gtfine_labeltrainids

@anqingjianke
Copy link
Author

I got it.
Thank you very much for your answer!

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