greatlog / DAN

This is an official implementation of Unfolding the Alternating Optimization for Blind Super Resolution
231 stars 41 forks source link

About test results #31

Closed Young-Zzz closed 3 years ago

Young-Zzz commented 3 years ago

抱歉,因为我的英文可能表达的不太准确,我在test Set5数据集x2时,PSNR=28.85,我还是没能找到问题的所在,我可以把我操作的过程说明一下吗? Step1:设置generate_mod_blur_LR_bic.py

up_scale = 2
mod_scale = 2
sourcedir = '/datasets/Set5'
savedir = '/datasets/DAN/Set5'
'rate_iso' : 1.0

其他的都没有更改,点击Run,生成的四个文件夹,HR和LRblur都是40张图片,不同的siga。 Step2:之后将这两个数据集放入create_lmdb.py

ima_folder = '/datasets/DAN/Set5/HR/x2/*'#../LRblur/x2/*
lmdb_save_path = '/datasets/DAN_lmdb/Set5/HR.lmdb'#../LRblur.lmdb
meta_info = {"name":"Set5"}

其他内容也没有更改,点击Run,HR.lmdb和LRblur.lmdb都有三个文件. Sept3:分别放入option/test/test_setting1_x2.yml文件中

suffix : x2
scale: 2
pca_matrix_path:'/DAN/pca_matrix/DANv2/pca_aniso_matrix_x2.pth'
datasets:
    test1:
    dataroot_GT: /datasets/DAN_lmdb/Set5/HR.lmdb
    dataroot_LQ: /datasets/DAN_lmdb/Set5/LRblur.lmdb
pretain_model_G: ../../danv2_x2_setting1.pth

结果报了错:

RuntimeError: Expected tensor to have size 144 at dimension1, but got size 121 for argument #2 'batch2'(while checking argument for bmm)

如果将pca_matrix_path改为pca_matrix.pth就可以正常跑程序,但是结果PSNR=28.648437dB,SSIM=0.817695 这个问题我一直没能解决,不知道那里操作有误导致结果和论文中的结果不相同,还请您指正!

Young-Zzz commented 3 years ago

请问最终的结果是看average PSNR/SSIM还是Y channel average PSNR/SSIM....

1LOVESJohnny commented 3 years ago

请问最终的结果是看average PSNR/SSIM还是Y channel average PSNR/SSIM....

论文里的表格通常都是Y channel的数值

Young-Zzz commented 3 years ago

请问最终的结果是看average PSNR/SSIM还是Y channel average PSNR/SSIM....

论文里的表格通常都是Y channel的数值

谢谢!那我的结果是符合的,我一直看的是average PSNR,以为是操作有误,谢谢回复!

1LOVESJohnny commented 3 years ago

谢谢!那我的结果是符合的,我一直看的是average PSNR,以为是操作有误,谢谢回复!

乐意效劳 :)

Young-Zzz commented 3 years ago

Hi! I have a question about execute time when run the inference.py. For example test on Set5: x2: 5it, 9.01it/s, so average time is 0.1s/it(5/9.01=total time,total time/5=average time) x4:5it, 16.00it/s, so average time is 0.06s/it? Is my calculation correct? Why x4 time is less than x2 time.. I think I have made some problem..

greatlog commented 3 years ago

The calculation is correct.

The x4 model is faster than the x2 model because the sizes of their inputs are different. The input size of the x2 model is twice the input size of the x4 model.