inpainting_gmcnn icon indicating copy to clipboard operation
inpainting_gmcnn copied to clipboard

the code for the quantitative analysis

Open godchengzhihang opened this issue 5 years ago • 8 comments

Hello, is there a tensorflow version of the code for the quantitative analysis part of the paper?

godchengzhihang avatar Sep 22 '19 12:09 godchengzhihang

No, there is not currently. The PSRN and SSIM values are measured by the built-in functions in matlab 2018. For the tensorflow version of psnr and ssim, you may refer to https://www.tensorflow.org/api_docs/python/tf/image/psnr and https://www.tensorflow.org/api_docs/python/tf/image/ssim. If you just wanna compute the psnr and ssim using python, you can refer to the following codes from skimage import measure Then, psnr = measure.compare_psnr(im1, im2) ssim = measure.compare_ssim(im1, im2, multichannel=True).

shepnerd avatar Sep 23 '19 01:09 shepnerd

Thank you very much!

godchengzhihang avatar Sep 23 '19 11:09 godchengzhihang

First of all, thank you very much for your help. I still have a problem and I don't see the code for quantitative analysis in your code. How do you implement the code for quantitative analysis?

godchengzhihang avatar Sep 23 '19 11:09 godchengzhihang

For imagenet and place2, we randomly pick n (200 for imagenet since msnps takes minutes to complete one image, and 2k for places2) images from the validation set and conduct inpainting on these images with the central rectangle mask. The psnr and ssim values are evaluated on the inpainting output and their corresponding ground truth. For paris streetview and celeba-hq, all validation/test images are used. The evaluations are also with central rectangle mask.

shepnerd avatar Sep 24 '19 06:09 shepnerd

thank you for your help!

godchengzhihang avatar Sep 25 '19 00:09 godchengzhihang

I am sorry to bother you again. Can you send me a reference for this part of the code? Because I really need this part of the code. @shepnerd

godchengzhihang avatar Sep 27 '19 05:09 godchengzhihang

You can refer to this.

If you cannot access to that file, you can email me for it.

shepnerd avatar Sep 27 '19 09:09 shepnerd

thank you very much!

godchengzhihang avatar Oct 07 '19 07:10 godchengzhihang