assafshocher / ZSSR

"Zero-Shot" Super-Resolution using Deep Internal Learning
Other
399 stars 102 forks source link

KeyError: 'Kernel #3

Closed Rainyliuliu closed 5 years ago

Rainyliuliu commented 5 years ago

Hello, i meet a problem:KeyError: 'Kernel' , i think the problem is caused by following function. I wish for your reply. Thank you very much. def preprocess_kernels(kernels, conf):

Load kernels if given files. if not just use the downscaling method from the configs.

# output is a list of kernel-arrays or a a list of strings indicating downscaling method.
# In case of arrays, we shift the kernels (see next function for explanation why).
# Kernel is a .mat file (MATLAB) containing a variable called 'Kernel' which is a 2-dim matrix.
if kernels is not None:

    return [kernel_shift(loadmat(kernel)['Kernel'], sf)
            for kernel, sf in zip(kernels, conf.scale_factors)]
else:
    return [conf.downscale_method] * len(conf.scale_factors)
assafshocher commented 5 years ago

Thanks for letting me know! That was a bug. The name of the variable inside the mat file was 'ker' and not 'Kernel' as it needs to be. Fixed now, Thanks!

Rainyliuliu commented 5 years ago

Thank you for your reply! I

liu 邮箱:13233975665@163.com

Signature is customized by Netease Mail Master

On 10/10/2018 20:32, Assaf Shocher wrote:

Thanks for letting me know! That was a bug. The name of the variable inside the mat file was 'ker' and not 'Kernel' as it needs to be. Fixed now, Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.