HasnainRaz/FC-DenseNet-TensorFlow

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

yangyang9706 opened this issue · 6 comments

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.

Did you make any changes to the code?

I didn't change the code

What format are your ground truth labels?

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

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.

thank you so much! I have solved my problem!