alexgkendall / caffe-segnet

Implementation of SegNet: A Deep Convolutional Encoder-Decoder Architecture for Semantic Pixel-Wise Labelling
http://mi.eng.cam.ac.uk/projects/segnet/
Other
1.08k stars 452 forks source link

Hey - it doesn't make sense to train segnet on a single class. In this situation, segnet will simply learn to predict every pixel as this class, and you will see loss=0. #145

Open ArunJ1 opened 5 years ago

ArunJ1 commented 5 years ago

Hey - it doesn't make sense to train segnet on a single class. In this situation, segnet will simply learn to predict every pixel as this class, and you will see loss=0.

Instead, you need to have a background class that isn't ignored. It is essential to have a background class to learn what isn't your object of interest.

Therefore you should set num_output: 2, label your object and background classes as 0 and 1 and have no ignore label.

Cheers.

Originally posted by @alexgkendall in https://github.com/alexgkendall/caffe-segnet/issues/31#issuecomment-221227301

ArunJ1 commented 5 years ago

Thanks for your advice @alexgkendall ....I have found this after searching around for long time....Thanks Again..

Pls could you confirm whether it is mandatory to calculate the class weighting and add??

As mentioned above, I have only single class to predict. That's why i would like to confirm whether it is mandatory.

Thanks in advance