GuoLanqing / ShadowFormer

ShadowFormer (AAAI2023), Pytorch implementation
MIT License
141 stars 16 forks source link

About the calculation of PSNR and SSIM #38

Open RICKand-MORTY opened 1 month ago

RICKand-MORTY commented 1 month ago

Hi, when I use test.py to evaluate the PSNR and SSIM of the results, I have encountered an error while executing the code: ssim_val_rgb.append(ssim_loss(gray_restored, gray_gt, channel_axis=None)) the error message is: ValueError: Since image dtype is floating point, you must specify the data_range parameter. Please read the documentation carefully (including the note). It is recommended that you always specify the data_range anyway. I think that it need to specify the parameter of data_range, could you please provide this parameter,thanks!

RICKand-MORTY commented 1 month ago

I installed an earlier package of the to ensure the progress of the evaluation, I evaluated the model on ISTD+ dataset but the results were pretty strange, Is there anything I forgot or made a mistake? My results on ISTD+ are the following: PSNR: 25.448642, SSIM: 0.951459, RMSE: 7.791862 SPSNR: 33.511993, SSSIM: 0.988814, SRMSE: 9.262710 NSPSNR: 26.501147, NSSSIM: 0.963846, NSRMSE: 7.612985