sefibk / KernelGAN

Other
337 stars 77 forks source link

Estimating SR kernel for an odd scaling factor (x3 or x5) #50

Open aakif1996-blip opened 3 years ago

aakif1996-blip commented 3 years ago

Hi, I was able to estimate x2 and x4 SR kernels easily thanks to your implementation. And I also had a look at the derivation for estimating the x4 kernel from the x2 kernel. However, I wonder if it would be possible to estimate a similar SR kernel with an odd scaling factor such as 3. If you could give me some hints or directions on how to achieve this it would be great! Thanks in advance.

sefibk commented 3 years ago

Thanks you for the kind words. I don’t think there is a straight forward, nor simple, way to analytically derive the x3,x5 kernels from the x2. Note, That since the theory behind Kernel GAN is true for any scale factor - you should be able to adjust the Generator’s architecture to recover the x3 kernel. However, the farther down you go the harder it will be to recover it. When I experimented with the x4 it was unstable so I do not have a good suggestion regarding your issue

samtwiappayaic commented 3 years ago

Hello. Is there a way to analytically derive the x8 kernel from the x2 kernel? Any suggestions will be appreciated! Thank you.

sefibk commented 3 years ago

The math behind calculating the x4 kernel would be correct for calculating the x8. So all you have to do is replace the first k_2 In the equation with The k_4, and multiply it with the original k_2. I don’t have an implementation for it but it should be very simple to write IMO