torch-fidelity

High-fidelity performance metrics for generative models in PyTorch

Apache License 2.0 4 个版本 Python >=3.6
Anton Obukhov
安装
pip install torch-fidelity
poetry add torch-fidelity
pipenv install torch-fidelity
conda install torch-fidelity
描述

torch-fidelity is the reference implementation of generative image model evaluation metrics in PyTorch, providing epsilon-exact computation of Inception Score (ISC), Fréchet Inception Distance (FID), Kernel Inception Distance (KID), and Precision and Recall (PRC). It supports multiple feature extractors including InceptionV3, CLIP, DINOv2, and VGG16.

Originally created to bring numerically faithful metric implementations to the PyTorch ecosystem — matching TensorFlow reference code to machine precision — torch-fidelity is now widely adopted as a foundational dependency (e.g., by torchmetrics) and a standard tool for benchmarking GANs, diffusion models, flow-matching, and other generative approaches.

Key features:

  • Epsilon-exact: values match reference implementations to floating-point precision
  • Efficient: feature sharing and multi-level caching minimize redundant computation
  • Extensible: register custom feature extractors to evaluate any modality — images, video, audio, 3D volumes, or anything else with a suitable learned representation

Find more details and the most up-to-date information on the project webpage: https://www.github.com/toshas/torch-fidelity

版本列表
0.4.0 2026-02-17
0.3.0 2021-06-15
0.2.0 2020-05-05
0.1.0 2020-04-29