-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FID distance does not return value close to zero for the same distribution #277
Comments
Hi @gursimar import torch
import piq
x_feats = torch.rand(10000, 32)
y_feats = torch.rand(10000, 32)
piq.FID()(x_feats, y_feats)
>>> tensor(0.0043, dtype=torch.float64) For higher dimensionality (like 2048 in your example), you'll need much larger number of distinct samples for distributions to be considered equal. Also when passing exactly same features as both x and y you may encounter singular matrix, so it's better to have them different. |
@zakajd, I think dimension might not be the cause. Try these code snippets. `import torch x_feats = torch.rand(10000, 32) * 5000
Or try this `import torch x_feats = torch.rand(10000, 32) * 5000
Why does the output change a lot (from your output 0.0043) if you shift the distribution? |
@gursimar Good point, thanks. Our implementation is based on original code, but doesn't match it with 100% due to different covariant matrix computation. |
Describe the bug
The piq.FID(x_feats, x_feats) does not return a value close to zero. Is it expected? I was wondering since its' a distance, if the two distributions are the same multivariate Gaussian, it should return a value close to zero.
To Reproduce
x_feats = torch.rand(10000, 2048)*5000
piq.FID()(x_feats, x_feats)
The text was updated successfully, but these errors were encountered: