Image-Super-Resolution-via-Iterative-Refinement
Image-Super-Resolution-via-Iterative-Refinement copied to clipboard
A little question about val.py
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!
I have meet the same question,had you solved it?
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!
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!
但是你这个改的和源代码不是一致吗?
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]
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]
我也遇到了同样的问题,但是您发的这个还是和源代码一致?
改为:
ridx = rname.rsplit("_hr.png")[0] fidx = fname.rsplit("_sr.png")[0] 因为差了一下,因为路径中间有_sr出现,它会直接从中间就截掉,加上png,保证从最后的sr截。 另:这里应该是fname