JingyunLiang / MANet

Official PyTorch code for Mutual Affine Network for Spatially Variant Kernel Estimation in Blind Image Super-Resolution (MANet, ICCV2021)

Home Page:https://arxiv.org/abs/2108.05302

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The method of creating kernels

zhiqiangfu opened this issue · comments

I noticed that the function for creating kernel ('anisotropic_gaussian_kernel_matlab') is different from the standard gaussian distribution (e.g. the method that used in IKC, https://github.com/yuanjunchai/IKC/blob/2a846cf1194cd9bace08973d55ecd8fd3179fe48/codes/utils/util.py#L244). I am wondering why a different way is used here. Actually, a test dataset created by IKC with same sigma range seems to have poor performance on MANet, and vice versa.

In addition, I found a code in the 'util.py line 354 shifted_l = l - scale + 1'. I am curious why a shifting process is needed here to make the maximum point away from the center.

Thanks for your questions. We basically follow the implementations of Kernel-GAN, NeurIPS2019, Sec. 5.2 and USRNet, CVPR2020, Sec. 3.1, in which the blur kernel is shifted and the upper-left pixels are kept in downsampling to avoid subpixel misalignments. The generation of blur kernel is identical to Matlab, as note in

# anisotropic gaussian kernels, identical to 'mvnpdf(X,mu,sigma)' in matlab

Feel free to open it if you have more questions.

ezoic increase your site revenue