HasnainRaz / FC-DenseNet-TensorFlow

Fully Convolutional DenseNet (A.K.A 100 layer tiramisu) for semantic segmentation of images implemented in TensorFlow.
MIT License
123 stars 41 forks source link

the iou always equals to 0.5 when I use my dataset to train the model #16

Closed yangyang9706 closed 5 years ago

yangyang9706 commented 5 years ago

Thank you for your work. I have the problem that the iou always equals to 0.5 when I use my dataset to train the model. I am looking forward to your answers.

HasnainRaz commented 5 years ago

Did you make any changes to the code?

yangyang9706 commented 5 years ago

I didn't change the code

HasnainRaz commented 5 years ago

What format are your ground truth labels?

yangyang9706 commented 5 years ago

the input image is 250*395, the mask is binarized images whose pixel values are 0 and 1.

HasnainRaz commented 5 years ago

You need to comment out the normalization function in the dataloader, since it divides the groundtruth labels by 255. Your labels are 0 and 1, 1/255 becomes 0, so the network never learns the foreground class, leading to a 0.5 iou.

yangyang9706 commented 5 years ago

thank you so much! I have solved my problem!