Open jmhummel opened 3 years ago
@jmhummel Thanks for reporting this bug. I will fix it later :-)
You're welcome. If it helps, I made these changes in my copy so I could modify both the min and max kernel size:
self.blur_kernel_range = opt['blur_kernel_range']
self.kernel_range = list(range(blur_kernel_range[0], blur_kernel_range[1] + 1, 2))
I also updated the YAML configs to use blur_kernel_range: [7, 21]
, and changed any hard-coded values of 21
to use self.blur_kernel_range[1]
Hi, I noticed that the
blur_kernel_size
andblur_kernel_size2
configuration variable are read here: https://github.com/xinntao/Real-ESRGAN/blob/f83472d0113b8af82b5c5dcaa6e5a9dc88e466a7/realesrgan/data/realesrgan_dataset.py#L43But they are not used when generating the kernel size range to sample from (or anywhere else in the codebase) The range is hardcoded to always sample from [7, 9, ... 19, 21]: https://github.com/xinntao/Real-ESRGAN/blob/f83472d0113b8af82b5c5dcaa6e5a9dc88e466a7/realesrgan/data/realesrgan_dataset.py#L63