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

如何制作自己的训练集 #22

Closed tongchangD closed 2 years ago

tongchangD commented 2 years ago
from utils import utils_blindsr as blindsr
img_lq, img_hq = blindsr.degradation_bsrgan(img, sf=4, lq_patchsize=72)

但是报错,这这这咋办 h1, w1 = img.shape[:2] AttributeError: 'str' object has no attribute 'shape'

tongchangD commented 2 years ago

8023_______ 8023______1

使用这个方法生成的LR图和HR 是错的

Magauiya commented 1 year ago

@tongchangD Probably your image range is in [0-255], while degradation function requires it to be in [0-1].

tongchangD commented 1 year ago

@tongchangD Probably your image range is in [0-255], while degradation function requires it to be in [0-1].

Okay, thank you. I already knew why last year