Image-Super-Resolution-via-Iterative-Refinement icon indicating copy to clipboard operation
Image-Super-Resolution-via-Iterative-Refinement copied to clipboard

A little question about val.py

Open Zanghu-ze opened this issue 1 year ago • 2 comments
trafficstars

Hi, thank you for sharing this work! When I tried to run the Test/Evaluation code, I found there was a small error in your code(Probably?) In the val.py's col 23 and 24. The original code is

ridx = rname.rsplit("_hr")[0]
fidx = fname.rsplit("_sr")[0]

But when I ran this val.py code I found that it had the following error message:

File "/home/Image-Super-Resolution-via-Iterative-Refinement/eval.py", line 24, in assert ridx == fidx, 'Image ridx:{ridx}!=fidx:{fidx}'.format(ridx, fidx) KeyError: 'ridx'

I think the col 23 should be fixed as: fidx = fname.rsplit("_sr")[0]

Hoping for your reply!

Zanghu-ze avatar Jan 08 '24 01:01 Zanghu-ze

I have meet the same question,had you solved it?

Jakkiabc avatar Feb 03 '24 20:02 Jakkiabc

Hi @Jakkiabc Yes, I have solved this question.
You can refer to the method I mentioned above and try to modify the code. Once you have modified the code, I think it will be fine!

Zanghu-ze avatar Feb 12 '24 17:02 Zanghu-ze

Hi, thank you for sharing this work! When I tried to run the Test/Evaluation code, I found there was a small error in your code(Probably?) In the val.py's col 23 and 24. The original code is

ridx = rname.rsplit("_hr")[0]
fidx = fname.rsplit("_sr")[0]

But when I ran this val.py code I found that it had the following error message:

File "/home/Image-Super-Resolution-via-Iterative-Refinement/eval.py", line 24, in assert ridx == fidx, 'Image ridx:{ridx}!=fidx:{fidx}'.format(ridx, fidx) KeyError: 'ridx'

I think the col 23 should be fixed as: fidx = fname.rsplit("_sr")[0]

Hoping for your reply!

但是你这个改的和源代码不是一致吗?

One1209 avatar Apr 16 '24 11:04 One1209

Hi @One1209 Thanks for your comments! I think you are right. I double-checked the code and my comments above. I think I type the wrong code line. The correct answer is:

fidx = rname.rsplit("_sr")[0]

Zanghu-ze avatar Apr 16 '24 20:04 Zanghu-ze

Hi @One1209 Thanks for your comments! I think you are right. I double-checked the code and my comments above. I think I type the wrong code line. The correct answer is:

fidx = rname.rsplit("_sr")[0]

我也遇到了同样的问题,但是您发的这个还是和源代码一致?

d-linlin avatar Apr 28 '24 12:04 d-linlin

改为:

ridx = rname.rsplit("_hr.png")[0] fidx = fname.rsplit("_sr.png")[0] 因为差了一下,因为路径中间有_sr出现,它会直接从中间就截掉,加上png,保证从最后的sr截。 另:这里应该是fname

cementwise avatar Jun 03 '24 17:06 cementwise