clean-fid icon indicating copy to clipboard operation
clean-fid copied to clipboard

Questions regarding the KID score implementation

Open hubert0527 opened this issue 2 years ago • 1 comments

Hi,

Thanks for maintaining the library for GAN research! I noticed that the KID implementation in this repository is quite different from the official KID implementation Could the author explain a bit about the differences?

Best, Hubert

hubert0527 avatar Jan 19 '22 06:01 hubert0527

Hi Hubert,

Even though the implementations look different, they are computing the same function.

More specifically, KID is defined as the squared MMD distance where the kernel k(x,y) is standard polynomial kernel. (d is the dimension x, y).

In the official KID implementation you linked, this kernel is computed using the sklearn (from sklearn.metrics.pairwise import polynomial_kernel). However, in the implementation here, we compute it directly in PyTorch. The differences can be attributed to different code organization preferences.

Regards, Gaurav

GaParmar avatar Feb 16 '22 21:02 GaParmar