bonlime / keras-deeplab-v3-plus

Keras implementation of Deeplab v3+ with pretrained weights
MIT License
1.35k stars 428 forks source link

Why does cityscapes only have 19 classes? The dataset has 30 classes #80

Open Skylerly opened 5 years ago

bonlime commented 5 years ago

That's a good question. I simply merged this PR: https://github.com/bonlime/keras-deeplab-v3-plus/pull/67 In the original TF Deeplab repo they also only have 19 classes in Cityscapes dataset. Check it here. You could investigate this question further and report your finding here.

penguinmenac3 commented 5 years ago

@bonlime and @Skylerly Why it should be 19 classes? See this issue on cityscapes scripts repo: https://github.com/mcordts/cityscapesScripts/issues/8 If you want to know what the 19 classes mean, have a look at the train_id here: https://github.molgen.mpg.de/mohomran/cityscapes/blob/master/scripts/helpers/labels.py#L55

Actually, when you run the model it has 21 outputs. I suppose the two extra are for train_id=-1 and train_id=255. Which are license plate (-1) and some kind of don't care class. However, that makes no sense, since the official preparation script just ignores polygons with the class -1 in the generation of the label images (so training and testing data does not contain any instances of class -1). The official images contain training_ids 0-18 and 255.

I hope the first part brought some insight, before confusing you and myself with the second part.