the iou always equals to 0.5 when I use my dataset to train the model
yangyang9706 opened this issue · 6 comments
yangyang9706 commented
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
Did you make any changes to the code?
yangyang9706 commented
I didn't change the code
HasnainRaz commented
What format are your ground truth labels?
yangyang9706 commented
the input image is 250*395, the mask is binarized images whose pixel values are 0 and 1.
HasnainRaz commented
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
thank you so much! I have solved my problem!