#163 · Primary category: MLOps & Evaluation

pytorch-fid

deep-learning fid fid-score frechet-distance gan generative-adversarial-network inception-score pytorch

Compute FID scores with PyTorch.

Project last updated:07/03/24

GitHub Stars

3.9K

Forks

528

Contributors

16

License

Apache-2.0

Why we included this project

For anyone training image generation models, FID is the number most papers quote to show a new model beats the baseline, and this is the PyTorch port most people reach for when they need it. The score compares two image sets by fitting Gaussians to Inception feature statistics and measuring the Fréchet distance between them, which lines up with human judgment of visual quality far better than pixel-level losses do. You run it as a plain command-line tool over two folders, and you can save a dataset's statistics once to a reusable .npz archive so later comparisons against several models skip re-running feature extraction. There's also a way to use lower Inception feature layers when your dataset falls short of the roughly 2000 images the default setup expects, though scores computed from different feature dimensions aren't directly comparable. One caveat: because of backend and interpolation differences, results won't match the original TensorFlow implementation exactly, so read the docs if you need scores to line up precisely with published numbers.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category