Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the code for the quantitative analysis #30

Open
godchengzhihang opened this issue Sep 22, 2019 · 8 comments
Open

the code for the quantitative analysis #30

godchengzhihang opened this issue Sep 22, 2019 · 8 comments

Comments

@godchengzhihang
Copy link

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

@shepnerd
Copy link
Owner

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
Copy link
Author

Thank you very much!

@godchengzhihang
Copy link
Author

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
Copy link
Owner

shepnerd commented Sep 24, 2019

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
Copy link
Author

thank you for your help!

@godchengzhihang
Copy link
Author

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
Copy link
Owner

shepnerd commented Sep 27, 2019

You can refer to this.

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

@godchengzhihang
Copy link
Author

thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants