sniklaus / softmax-splatting

an implementation of softmax splatting for differentiable forward warping using PyTorch
468 stars 58 forks source link

question on how to calculate the PSNR metric #22

Closed zhuyeye closed 4 years ago

zhuyeye commented 4 years ago

How did you calculate the PSNR metric reported in the paper? Matlab or python? RGB or gray?

sniklaus commented 4 years ago

I computed the PSNR in RGB, converting the results to grayscale before computing the PSNR would have been odd. I should not matter whether you use Matlab or Python for computing this metric, I used the following.

skimage.measure.compare_psnr(im_true=npyReference, im_test=npyEstimate, data_range=255)

As for SSIM, I used the following (other papers may or may not compute the SSIM across channels).

skimage.measure.compare_ssim(X=npyReference, Y=npyEstimate, data_range=255, multichannel=True)

For more information, please see the provided benchmark.py.

https://github.com/sniklaus/softmax-splatting/blob/3ac4e52d86b0508c9a31613f371955e401c18846/benchmark.py#L105-L106

zhuyeye commented 4 years ago

Thanks for your reply. I have another question: How did you get the results of Middlebury dataset (the image size cannot be divisible by 64 which is requied for PWCNet), padding , crop or resize?

sniklaus commented 4 years ago

We process the input as is, without any modifications. All of our components (PWC-Net, Feature Pyramid Extractor, Synthesis Network) are implemented such that they work on arbitrary resolutions.