# GaParmar/clean-fid

PyTorch - FID calculation with proper image resizing and quantization steps [CVPR 2022]

Repository: https://github.com/GaParmar/clean-fid
Canonical: https://ross.abutalabs.com/products/clean-fid
Homepage: https://www.cs.cmu.edu/~clean-fid/
Language: Python
License: MIT
License Family: permissive
Topics: computer-vision, deep-learning, computer-graphics, pytorch, generative-adversarial-network, gan, image-manipulation, image-generation, fid-score, fid-calculation, fid, frechet-inception-distance, frechet-distance
Last push: 2025-08-02T02:33:50+00:00

## Health v2 (maintenance only)
Score: 48/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 34, release rhythm 35, longevity 100
- inputs: {"age_days": 1959, "days_push": 397, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1166, forks 81 (observed 2026-08-28T04:03:50.301000+00:00)

## What it is
Clean-FID is a PyTorch library for computing the Frechet Inception Distance (FID) with correct image resizing and quantization steps, fixing inconsistencies across common implementations. It also supports KID and CLIP-feature-based FID, and was published at CVPR 2022.

## Use cases
- calculate fid score between two image folders
- evaluate gan image generation quality
- compare fid scores across papers reproducibly
- compute kid metric for generated images
- compute fid using clip features
- fix incorrect image resizing in fid calculation

## When to choose
- you need reproducible, comparable FID scores for generative model evaluation
- you want correct anti-aliased resizing and quantization in the metric pipeline
- you need FID, KID, or CLIP-FID in a PyTorch workflow

## When to avoid
- you need metrics other than FID/KID/CLIP-FID, such as Inception Score or precision-recall
- you are not working with image generation evaluation
- you need a framework-agnostic solution outside PyTorch

## Facets
- artifact type: library
- maturity: stable
- function: image-processing, machine-learning, benchmarking
- domain: computer-vision, deep-learning, machine-learning, image-processing
- platform: python, cross-platform
- tags: fid-score, gan-evaluation, pytorch, frechet-inception-distance, kid, clip-features, generative-models, cvpr-2022, gpu

## Member repositories
- GaParmar/clean-fid (main) score 48

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:50.301000+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:28:58.043863+00:00, confidence not recorded.
  - readme: https://github.com/GaParmar/clean-fid (fetched 2026-08-28T04:03:50.301000+00:00, sha 3e0b5179801f)
  - homepage: https://www.cs.cmu.edu/~clean-fid/ (fetched 2026-08-29T12:35:10.454349+00:00, sha ad73efa37c79)
  - registry_pypi: https://pypi.org/pypi/clean-fid/json (fetched 2026-08-29T12:35:10.464336+00:00, sha 967b6240fff8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
