Practical overview
When it fits
Use it when an image-generation evaluation needs FID or related KID scoring and the image preprocessing choices should be handled consistently. It is also useful when comparing image folders or using the documented dataset-statistics and generator workflows.
Who it is for
- Researchers evaluating generative image models
- Developers comparing image-generation experiments or model checkpoints
- Teams seeking consistent image resizing and quantization in FID workflows
Documented uses
- Calculate FID between two folders of images.
- Compare generated images with precomputed statistics for a supported dataset.
- Calculate FID from a generator function and dataset statistics.
- Calculate CLIP-FID or KID using the library's documented interfaces.
Requirements & limits
The project is open source under the MIT license. Its documented installation uses pip.
- Different resizing implementations can materially affect FID, so preprocessing consistency is important.
- JPEG compression can also change FID scores; image encoding should be considered when comparing results.
- CLIP-FID is selected with the documented CLIP model name option.
- Precomputed KID statistics are documented for AFHQ, BreCaHAD and MetFaces.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Calculate FID between two image folders
Install clean-fid and calculate FID for two local image folders.
Before you start
- Python environment with pip
- Two image folders to compare
Steps
Install the package with the command below.
pip install clean-fidImport
fidfromcleanfid.Call
fid.compute_fid(fdir1, fdir2)with the two folder paths.
Expected outcome
The call returns an FID score for the two image folders.
Guide limitations
- The recipe is limited to a folder-to-folder FID comparison; it does not specify image preparation or interpretation of the resulting score.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- GaParmar/clean-fid · Official homepage title · retained in its source language

