Can FID returns a negative number?
iumyx2612 opened this issue · comments
I tried to calculated FID on 2 images that are the same, and it returns a negative number that's really close to 0
Hi! Thanks for your message! The frechet distance measures the distance between distributions. It doesn't make much sense to calculate it between two samples. The technical reason why you might get negative values is the following: to calculate the frechet distance at some point you need to calculate the square root of the product of covariance matrices. Your covariance matrices have rank 1. It seems that we do not properly handle this case code wise though. I will take a look into that. But the main point is: if you want to compare two distributions take as many samples as possible (but at least d samples, where d is the dimension of the coding layer) :)
Thank you so much, I get it now