cszn / BSRGAN

Designing a Practical Degradation Model for Deep Blind Image Super-Resolution (ICCV, 2021) (PyTorch) - We released the training code!
Apache License 2.0
1.17k stars 177 forks source link

Possible bug in degradation_bsrgan #33

Closed DanilKonon closed 2 years ago

DanilKonon commented 2 years ago

It is possible that dimensions are permutated in the cropping operation in degradation_bsrgan_plus, degradation_bsrgan functions in 541, 450 lines.

It should be img = img.copy()[:h1 - h1 % sf, :w1 - w1 % sf, ...] # mod crop instead of img = img.copy()[:w1 - w1 % sf, :h1 - h1 % sf, ...] # mod crop

XiaoqiangZhou commented 2 years ago

I have the same question.

junseokoh1 commented 2 years ago

I think this is bug. I also change the code to use degradation model

cszn commented 2 years ago

Thanks. Fixed.