pytorch-deeplab-resnet icon indicating copy to clipboard operation
pytorch-deeplab-resnet copied to clipboard

Bad mIOU tested with provided model

Open tengteng95 opened this issue 6 years ago • 8 comments

Hello! I follow the Readme to test the mIOU with given pretrained caffe model on VOC. However, I get unexpected Mean iou = 0.046470389101241724. Do you have any suggestions about this problem? By the way, why the image is only substracted by the mean value of each channel without normlization to range such as [0,1] or [-1,1] in the code?

tengteng95 avatar Sep 24 '18 13:09 tengteng95

I use the model downloaded from here

tengteng95 avatar Sep 25 '18 03:09 tengteng95

I am facing the same issue. The number I got is 0.04647076057203757. Using the provided .pth file without any code modification.

suhangpro avatar Oct 05 '18 19:10 suhangpro

@suhangpro hi, the problem is that opencv cannot read image in mode 'p' correctly. Reading gt image with PIL.Image will solve the problem.

tengteng95 avatar Oct 06 '18 06:10 tengteng95

Thanks, @h982639009 ! After that change, I got: pytorch 20 Mean iou = 0.7645974317511359. This is even higher than the number 76.35 reported in the paper (Table. 4 row 6). Someone reported 76.42 in #5 . I don't see any randomness in the forward network inference, so the slight difference is still strange.

suhangpro avatar Oct 08 '18 02:10 suhangpro

@suhangpro, hi, may I ask how do you get the mean iou of 0.7645? Through evalpyt.py or evalpyt2.py? Becausce I got 0.7802 through evalpyt2.py and 0.7180 through evalpyt.py.

chenyzh28 avatar Oct 24 '18 08:10 chenyzh28

I did the fix @h982639009 mentioned, and made no other changes.

suhangpro avatar Oct 24 '18 19:10 suhangpro

@suhangpro , do you know how to convert the gt and the output images to color images?

chenyzh28 avatar Nov 07 '18 08:11 chenyzh28

@h982639009 , may I ask what mode 'p' means? How can i can convert images of mode 'p' to RGB images?

chenyzh28 avatar Nov 07 '18 08:11 chenyzh28