Closed zhiqiangfu closed 3 years ago
In addition, I found a code in the '_util.py line 354 shiftedl = 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 https://github.com/JingyunLiang/MANet/blob/34f90ba8888f4a1dd2a1127b97c2ec3706f06598/codes/utils/util.py#L234
Feel free to open it if you have more questions.
I noticed that the function for creating kernel ('_anisotropic_gaussian_kernelmatlab') 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.