SGDepth icon indicating copy to clipboard operation
SGDepth copied to clipboard

Semantic Labels for The Training

Open csBob123 opened this issue 4 years ago • 6 comments

Could I know whether you use the KITTI semantic labels for the training? I guess you only use the semantic labels on Cityscapes.

Thank you for your work.

csBob123 avatar Aug 26 '21 07:08 csBob123

Hi, I did not use the KITTI semantic labels for training but only the ones from Cityscapes.

klingner avatar Aug 30 '21 07:08 klingner

Hi, I did not use the KITTI semantic labels for training but only the ones from Cityscapes.

Hi, Thank you for your reply. The number of classes on Cityscape is 19, but I found the final output of 'segdecoder' has 20 classes(20 channels).

Could I know the reason and its impacts?

Thank you for your attention.

csBob123 avatar Sep 20 '21 05:09 csBob123

Hi,

the 20th class is the background class. It is essentially not trained, as in the wieghted cross-entropy loss its weight is set to 0. For the evaluation only the 19 classes of the Cityscapes dataset are considered. In theory it should not really matter, if you only train 19 classes or 19 classes + 1 background class, if the weight of the background class in the loss is set to 0.

klingner avatar Sep 20 '21 08:09 klingner

Hi @klingner I had a small query about which part of Cityscapes Dataset to download. Up to my understanding we have to use the gtFine_trainvaltest.zip. But it has 30 classes and @csBob123 said the model is trained on 20. Is that okay or do I need to change anything in the code in order to do the segmentation training?

Thanks in Advance :)

bansilol avatar Sep 20 '21 12:09 bansilol

Hi, the Cityscapes dataset has 30 classes, but only 19 of them are used for training and the other classes are set to background when training. Effectively, I always use the 19 classes as defined by Cityscapes.

klingner avatar Sep 20 '21 12:09 klingner

Okay. Thanks for clearing up the query. :)

bansilol avatar Sep 20 '21 13:09 bansilol