pix2pix icon indicating copy to clipboard operation
pix2pix copied to clipboard

Mean class IoU of photo2label

Open mxkai opened this issue 5 years ago • 13 comments

Hello,can you tell me how to calculate Mean class IoU, Mean class accuracy and Mean pixel accuracy of photo2label

mxkai avatar Jan 05 '20 01:01 mxkai

See the function get_score here.

junyanz avatar Jan 05 '20 06:01 junyanz

I want to calculate the scores of the original label,but I meet some difficulties. I use the script of cityscapes to generate file "_gtFine_labelTrainIds.png", and then replace the FCN output with these files: image but the output is bad: image

mxkai avatar Jan 05 '20 08:01 mxkai

Hello, I evaluated the results after using the cityscape dataset, and the values obtained are far from those mentioned in the paper. So I would like to ask, is the code given by 'evaluate.py' only used to evaluate the results of label2image? Can I evaluate image2label? After I use RGB image to generate semantic segmentation results, how do I evaluate the segmentation results? Thanks a lot!

ZhangCZhen avatar Jan 05 '20 08:01 ZhangCZhen

I want to train photo2label on cityscapes,Can you tell me whether the training label is "_gtFine_color.png" or "_gtFine_labelTrainIds.png"? _gtFine_color.png: aachen_000000_000019_gtFine_color _gtFine_labelTrainIds.png: aachen_000000_000019_gtFine_labelTrainIds

mxkai avatar Jan 06 '20 05:01 mxkai

I use the "_gtFine_color.png", but I don't know if it is possible to evaluate the results of semantic segmentation with the Fcn model.

ZhangCZhen avatar Jan 06 '20 06:01 ZhangCZhen

Is the semantic color of the generated image random? Whether it can correspond to the label?

mxkai avatar Jan 06 '20 06:01 mxkai

I think it depends on your generator performance.

ZhangCZhen avatar Jan 06 '20 06:01 ZhangCZhen

I have the same question. Sorry.

ZhangCZhen avatar Jan 06 '20 07:01 ZhangCZhen

@mxkai Hello.

  1. My experimental results are the same as yours, they are 0.997, 0.209, 0.2058. If you uncomment this line of code 'scipy.misc.imresize(im, (256,256))' , the value will become 0.93, 0.597, 0.452. I think it should be this reason.
  2. I think the training label should be '_gtFine_color.png'.
  3. Do you know how to convert those color label into gray label (or TrainId) easily? Thanks a lot. Looking forward to your reply.

ZhangCZhen avatar Jan 14 '20 14:01 ZhangCZhen

@ZhangCZhen
Have you solved the problem how to evaluate on cityscapes? I meet the same problem. Can you help me? How should I change the original code?

A-Little-Nut avatar Apr 24 '20 04:04 A-Little-Nut

@ZhangCZhen Have you solved the problem how to evaluate on cityscapes? I meet the same problem. Can you help me? How should I change the original code?

I have evaluate 'label2photo'. I am also confused how to evaluate 'photo2label'.

ZhangCZhen avatar Jun 27 '20 12:06 ZhangCZhen

See this post for more details regarding photo2label evaluation.

junyanz avatar Jun 27 '20 18:06 junyanz

I want to calculate the scores of the original label,but I meet some difficulties. I use the script of cityscapes to generate file "_gtFine_labelTrainIds.png", and then replace the FCN output with these files: image but the output is bad: image

@mxkai I would like to ask if you solved the problem of evaluating photo2label? I'm also having the same issue and look forward to your reply.

HuXiaokai12138 avatar Oct 24 '23 08:10 HuXiaokai12138