hellochick / ICNet-tensorflow

TensorFlow-based implementation of "ICNet for Real-Time Semantic Segmentation on High-Resolution Images".
405 stars 153 forks source link

train 2class dataset from strach has nothing result #86

Open zhangyunming opened 5 years ago

zhangyunming commented 5 years ago

hi,hellochick: i use the code you release severel days ago , i use my data in two class(background,foreground) to train from strach

  1. the input i set 512*512 2, class_num=2,(8bit label image are 0 &1),ignore_label set 0,later 100, 255 and so on 3, the loss is about 0.5

i test on the code in your demo.py(changed by your demo.) ,but it has nothing result.

whats wrong

zhangyunming commented 5 years ago

Almost all the test images are foreground..

zhangyunming commented 5 years ago

icnet_tf

0oshowero0 commented 5 years ago

I have met the same issue. I trained my own data from scratch and got nothing output. My data has three classes, that is 0, 1 and 2, where 0 stands for background. I set n_classes to 3 & ignore 255 and n_classes to 2 & ignore 0, both got nothing. The output image is all 1.

hellochick commented 5 years ago

Hey guys, you can refer to #50, there are some advices which can help you to solve the problems!

0oshowero0 commented 5 years ago

Well, the code can run but it learnt nothing. When I start training, it has outputs other than 1. But later on the output is all 1.

zhangyunming commented 5 years ago

Yes,when i do everything same with issue50,its still the problem

hellochick commented 5 years ago

Do you guys load the pre-trained model? I think you should do that, or the network might learned nothing. If you trained from scratch, you should teach the model to classify object first (trained on ImageNet or something else).