clean-fid
FID calculation in PyTorch with proper image resizing and quantization steps
Decision gist · record as of 2026-08-14
Yes, if you are actively evaluating generative models and need reproducible FID/KID scores. The library solves a real standardization problem in GAN evaluation. However, consider that maintenance is aging (last release December 2022); verify compatibility with your current PyTorch version before relying on it for new research, and monitor the repository for updates or consider alternatives if critical bugs emerge.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires torch, torchvision, and their system dependencies; no explicit Python version constraint stated in the package metadata.
- Low install friction with a pure Python wheel.
- Maintenance is aging—last release was 2022-12-18 and the repository has not been updated since 2025-08-02, though it remains unarchived and has moderate community interest (1168 stars).
License · maintenance · safety
permissive license (permissive) — BSD License (permissive) allows commercial and private use with minimal restrictions.
last release 2022-12-18 (1335 days) · last repo commit 2025-08-02 · 1,168 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 406,980 downloads/mo, #6,891 on PyPI
Alternatives
Verify before relying
pip install clean-fid
from cleanfid import fid
score = fid.compute_fid(fdir1, fdir2)
# or with precomputed dataset statistics:
score = fid.compute_fid(fdir1, dataset_name="FFHQ", dataset_res=1024)- Whether the package works with recent PyTorch versions given the aging maintenance status.
- Whether precomputed dataset statistics are still available and up-to-date.
- Compatibility with modern Python versions beyond what the classifier 'Programming Language :: Python :: 3' implies.
What it is and what it does
Clean-fid is a library for computing FID and KID metrics used to evaluate the quality of images generated by generative models like GANs. The core problem it solves is that different implementations of FID use different image resizing and quantization methods, leading to inconsistent scores across papers and groups. This library standardizes those operations—particularly addressing aliasing issues in resizing functions and JPEG compression effects—so that FID scores become comparable.
The package wraps PyTorch and provides a simple API to compute FID between two image folders, between a folder and precomputed dataset statistics (for datasets like CIFAR-10, FFHQ, and LSUN), or between a generative function and precomputed statistics. It also supports KID computation and CLIP-based FID variants. Its main dependencies are torch, torchvision, numpy, scipy, pillow, requests, and tqdm.
Use it for
- Evaluate a trained GAN or diffusion model against standard benchmarks like FFHQ or CIFAR-10 using precomputed statistics.
- Compare FID scores across different generative models or training runs with consistent resizing and quantization.
- Compute KID scores for few-shot generation tasks on smaller datasets like AFHQ or BreCaHAD.
- Debug image generation quality by computing FID between generated and real image folders with controlled resizing methods.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are actively evaluating generative models and need reproducible FID/KID scores.
The library solves a real standardization problem in GAN evaluation. However, consider that maintenance is aging (last release December 2022); verify compatibility with your current PyTorch version before relying on it for new research, and monitor the repository for updates or consider alternatives if critical bugs emerge.
Install
clean-fid on PyPI
Before you install
Low install friction with a pure Python wheel. Maintenance is aging—last release was 2022-12-18 and the repository has not been updated since 2025-08-02, though it remains unarchived and has moderate community interest (1168 stars).
Requires torch, torchvision, and their system dependencies; no explicit Python version constraint stated in the package metadata.
License in practice
BSD License (permissive) allows commercial and private use with minimal restrictions.
Quickstart
pip install clean-fid
from cleanfid import fid
score = fid.compute_fid(fdir1, fdir2)
# or with precomputed dataset statistics:
score = fid.compute_fid(fdir1, dataset_name="FFHQ", dataset_res=1024)
Verify before relying
- Whether the package works with recent PyTorch versions given the aging maintenance status.
- Whether precomputed dataset statistics are still available and up-to-date.
- Compatibility with modern Python versions beyond what the classifier 'Programming Language :: Python :: 3' implies.
Package facts
| License | permissive license permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 7 packagestorchtorchvisionnumpyscipytqdmpillowrequests |
| Maintenance | Aging 1,335 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 406,980 / month, #6,891 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: clean_fid-0.1.35-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “FID score calculation”
- clean-fidComputes Fréchet Inception Distance (FID) and Kernel Inception…
- pytorch-fidComputes Fréchet Inception Distance (FID), a metric for measuring…
- piqPIQ provides a collection of image quality metrics and measures—both…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also pytorch-fid · pyiqa · piq · clip-benchmark · k-diffusion · gfpgan · resize-right · lpips · effdet