SeungjunNah/DeepDeblur_release

SSIM result issue

Jerry0103240 opened this issue · 4 comments

Hi, I would like to confirm what metric is used in paper, cause I use SSIM get about 0.87, but use CW_SSIM get 0.93 (by Pyssim package) in GoPro gamma subset (1111 images for testing, 720 x 1280 resolutions), and the value in paper is about 0.9135
Thanks for replying!

SSIM functions from various packages have different implementations and options.
When I wrote this paper, I used MATLAB to measure SSIM of the RGB images which was wrong.
MATLAB has wrong SSIM implementation on RGB images as it extends its 1D implementation to 2D and 3D. RGB images are considered 3D array (H x W x C) and padded in C dimension before SSIM calculation to apply 11x11x11 kernel. (RRRRRGBBBBB)

These days, I don't use MATLAB and use skimage.metrics.structural_similarity.

from skimage.metrics import structural_similarity
ssim = structural_similarity(ref_im, res_im, multichannel=True, gaussian_weights=True, use_sample_covariance=False)

Thanks for the prompt reply and sorry for my late response, the answer is helpful!

BTW, I was testing with “scale_levels 1” which is an option to change in opts.lua file, but the results seems the same. (the downloaded weight file name are related to scale level 3, I’m not sure if this is the main reason). Is there anything I didn’t notice?

And what are the correct results if I change type Cudahalf to Cuda, (The inference time is longer, but results may not change a lot, It’s correct or not?)

Thanks for your patience!

When loading a saved model, the options related to the models are ignored. (including scale_levels)
The inference result of cudaHalf and cuda equal to each other. 16 bits are enough for general image restoration tasks at test time.

Thanks for your patience to this issue and clear explanation!