ZhengyuLiang24 / EPIT

Official implementation of "Learning Non-Local Spatial-Angular Correlation for Light Field Image Super-Resolution", ICCV 2023.
https://zhengyuliang24.github.io/EPIT/
22 stars 3 forks source link

low ssim #1

Open cgwu1999 opened 7 months ago

cgwu1999 commented 7 months ago

When I run python test.py, I get a lower SSIM than the paper, but the PSNR is right. Datasets Scenes PSNR SSIM EPFL Palais_du_Luxembourg 31.190500 0.954360 EPFL Sphynx 35.332766 0.953847 EPFL Perforated_Metal3 34.517805 0.969151 EPFL Red&_White_Building 38.273115 0.976280 EPFL Books__Decoded 37.935669 0.954743 EPFL Paved_Road 30.984080 0.914900 EPFL Rusty_Fence 33.171431 0.975351 EPFL Friends_1 36.845723 0.978412 EPFL ISO_Chart_1__Decoded 32.815969 0.947113 EPFL Bikes 37.196052 0.982676 EPFL Average 34.826311 0.960683

HCI_new herbs 37.828406 0.957506 HCI_new origami 42.680361 0.988477 HCI_new bicycle 35.849714 0.961522 HCI_new bedroom 36.552109 0.943146 HCI_new Average 38.227648 0.962663

HCI_old buddha 44.500942 0.987852 HCI_old monasRoom 45.649912 0.988633 HCI_old Average 45.075427 0.988242

INRIA_Lytro HublaisDecoded 37.312627 0.965913 INRIA_Lytro MessyDesk__Decoded 36.601587 0.985613 INRIA_Lytro BuildingDecoded 34.723867 0.962017 INRIA_Lytro Bee_1__Decoded 38.862253 0.956419 INRIA_Lytro Sculpture__Decoded 35.859014 0.965512 INRIA_Lytro Average 36.671870 0.967095

Stanford_Gantry Tarot Cards S 38.706790 0.990934 Stanford_Gantry Lego Knights 45.625415 0.995736 Stanford_Gantry Average 42.166102 0.993335

ALL Average 39.393472 0.974404

cgwu1999 commented 7 months ago

If I directly run python test.py, i meet the error:

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. File "/opt/data/private/PAPER4_LFSR/_other_methods/EPIT-main/utils/utils.py", line 100, in cal_metrics SSIM[b, u, v] = cal_SSIM(label[b, u, v, :, :].numpy(), out[b, u, v, :, :].numpy(), File "/opt/data/private/PAPER4_LFSR/_other_methods/EPIT-main/common.py", line 271, in test psnr, ssim = cal_metrics(args, LF_target, LF_out) File "/opt/data/private/PAPER4_LFSR/_other_methods/EPIT-main/common.py", line 366, in main_test psnr, ssim = test(args, test_name, test_loader, net, excel_file, save_dir) File "/opt/data/private/PAPER4_LFSR/_other_methods/EPIT-main/test.py", line 21, in main(args) 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 added data_range=1.0 to deal with it, but the SSIM result is not right.

cgwu1999 commented 7 months ago

I have identified the issue in the old version where the data_range parameter is set to 2 by default for float data type. However, it should actually be set to 1.