shepnerd / inpainting_gmcnn

Image Inpainting via Generative Multi-column Convolutional Neural Networks, NeurIPS2018
MIT License
427 stars 97 forks source link

the code for the quantitative analysis #30

Open godchengzhihang opened 5 years ago

godchengzhihang commented 5 years ago

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

shepnerd commented 5 years ago

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).

godchengzhihang commented 5 years ago

Thank you very much!

godchengzhihang commented 5 years ago

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?

shepnerd commented 5 years ago

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.

godchengzhihang commented 5 years ago

thank you for your help!

godchengzhihang commented 5 years ago

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

shepnerd commented 5 years ago

You can refer to this.

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

godchengzhihang commented 5 years ago

thank you very much!