jakeret / tf_unet

Generic U-Net Tensorflow implementation for image segmentation
GNU General Public License v3.0
1.9k stars 748 forks source link

Binary Classification #112

Open sevamoo opened 6 years ago

sevamoo commented 6 years ago

Thanks for the great work. This is more a question rather than an issue. While I get good results as expected with the known data set. In my data set (satellite images with labels on informal settlements or slums), if I increase the layers the models learns to predict only one label and if shallow definitely the loss is just fluctuating. I am wondering if there are some tips regarding the loss function or regularization that I need to know. My current guess is that my data is not informative enough, though visually it is possible to classes. I use different training sizes with different image sizes. Thanks in advance.

jakeret commented 6 years ago

On thing that might be worth to look into is image normalization. If your dataset is unbalance it could help to over/undersample the data. Another thing you could try is to train one model per class

sevamoo commented 6 years ago

Thanks for the reply. Currently, I am working on class balancing. But can you explain more on one model per class? How would it be possible for a two class problem? Sorry, if this is going to be off topic to the library.

jakeret commented 6 years ago

If I understand correctly you have 3 classes: settlements / slums / background. Hence, I would try to train a model that is able to distinguish settlements from anything else and another model that learns to detect slums

sevamoo commented 6 years ago

Thanks for your answer. No, actually I have two labels (slums/non-slums). I read all the other issues, but I think at the moment either the problem is the resolution of my satellite images, which are not informative or most likely the same issue discussed here before. First the loss doesn't converge, but at the same time I don't understand why it always the softmax output is very small and therefore, always class 0 is predicted.