# toshas/torch-fidelity

High-fidelity performance metrics for generative models in PyTorch

Repository: https://github.com/toshas/torch-fidelity
Canonical: https://ross.abutalabs.com/products/torch-fidelity
Language: Python
License: NOASSERTION
License Family: other
Topics: pytorch, metrics, gan, generative-model, evaluation, inception-score, frechet-inception-distance, kernel-inception-distance, perceptual-path-length, precision, reproducibility, reproducible-research
Last push: 2026-05-11T17:16:03+00:00

## Health v2 (maintenance only)
Score: 70/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 81, release rhythm 39, longevity 100
- inputs: {"age_days": 2323, "days_push": 114, "days_rel": 197, "gap_med": null, "n_releases_24m": 1}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1197, forks 88 (observed 2026-08-28T04:03:57.437702+00:00)

## What it is
A PyTorch library providing accurate and efficient implementations of generative model evaluation metrics such as FID, Inception Score, KID, Precision/Recall, and Perceptual Path Length. It offers both a CLI and Python API, with feature caching and extensibility for custom feature extractors.

## Use cases
- compute FID between two image datasets
- calculate inception score for generated images
- evaluate GAN quality during training loop
- reproduce paper metrics for generative models
- measure precision and recall of generated samples
- evaluate diffusion model sample quality
- compute perceptual path length for GANs

## When to choose
- you need numerically precise metrics matching reference implementations for papers
- you want fast metric computation with feature caching inside a training loop
- you need both CLI and programmatic evaluation in PyTorch
- you want to evaluate non-image modalities via custom feature extractors

## When to avoid
- you need metrics for frameworks other than PyTorch
- you only need quick qualitative visual inspection of samples
- you require metrics not covered by the supported set without writing a custom extractor

## Facets
- artifact type: library
- maturity: active
- function: benchmarking, machine-learning, cli
- domain: machine-learning, deep-learning, computer-vision, artificial-intelligence
- platform: python, cli, cross-platform
- tags: pytorch, gan-evaluation, fid, inception-score, kid, perceptual-path-length, precision-recall, generative-models, metrics, gpu

## Member repositories
- toshas/torch-fidelity (main) score 70

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:57.437702+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:22:00.189280+00:00, confidence not recorded.
  - readme: https://github.com/toshas/torch-fidelity (fetched 2026-08-28T04:03:57.437702+00:00, sha 0fc4cd7c96ba)
- Data as of 2026-08-30T08:39:29.467469+00:00.
