Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
PyTorch - FID calculation with proper image resizing and quantization steps [CVPR 2022]
| Date | Stars |
|---|---|
| 2026-07-24 | 1167 |
| 2026-07-25 | 1167 |
| 2026-07-28 | 1167 |
| 2026-07-30 | 1167 |
| 2026-08-06 | 1167 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# clean-fid for Evaluating Generative Models
<br>
<p align="center">
<img src="https://raw.githubusercontent.com/GaParmar/clean-fid/main/docs/images/cleanfid_demo_folders.gif" />
</p>
[](https://pepy.tech/project/clean-fid) [](https://pepy.tech/project/clean-fid)
[**Project**](https://www.cs.cmu.edu/~clean-fid/) | [**Paper**](https://arxiv.org/abs/2104.11222) | [**Slides**](https://www.cs.cmu.edu/~clean-fid/clean_fid_slides.pptx) |
[**Colab-FID**](https://colab.research.google.com/drive/1ElGAHvlwTilIf_3D3cw1boirCEkFsAWI?usp=sharing) |
[**Colab-Resize**](https://colab.research.google.com/drive/1Q-N94S2mnLsFLpuT7WwY6d5WxGVWLGpg?usp=sharing) |
[**Leaderboard Tables**](#cleanfid-leaderboard-for-common-tasks) <br>
**Quick start:** [**Calculate FID**](#computing-fid) | [**Calculate KID**](#computing-kid)
**[New]** Computing the FID using CLIP features [[Kynkäänniemi et al, 2022]](https://arxiv.org/pdf/2203.06026.pdf) is now supported. See [here](#computing-clip-fid) for more details.
The FID calculation involves many steps that can produce inconsistencies in the final metric. As shown below, different implementations use different low-level image quantization and resizing functions, the latter of which are often implemented incorrectly.
<p align="center">
<img src="https://raw.githubusercontent.com/GaParmar/clean-fid/main/docs/images/resize_circle.png" width="800" />
</p>
We provide an easy-to-use library to address the above issues and make the FID scores comparable across different methods, papers, and groups.

---
### Corresponding Manuscript
[On Aliased Resizing and Surprising Subtleties in GAN Evaluation](https://www.cs.cmu.edu/~clean-fid/) <br>
[Gaurav Parmar](https://gauravparmar.com/), [Richard Zhang](https://richzhang.github.io/), [Jun-Yan Zhu](https://www.cs.cmu.edu/~junyanz/)<br>
CVPR, 2022 <br>
CMU and Adobe
If you find this repository useful for your research, please cite the following work.
```
@inproceedings{parmar2021cleanfid,
title={On Aliased Resizing and Surprising Subtleties in GAN Evaluation},
author={Parmar, Gaurav and Zhang, Richard and Zhu, Jun-Yan},
booktitle={CVPR},
year={2022}
}
```
---
<br>
**Aliased Resizing Operations** <br>
The definitions of resizing functions are mathematical and <em>should never be a function of the library being used</em>. Unfortunately, implementations differ across commonly-used libraries. They are often implemented incorrectly by popular libraries. Try out the different resizing implementations in the Google colab notebook [here](https://colab.research.google.com/drive/1Q-N94S2mnLsFLpuT7WwY6d5WxGVWLGpg?usp=sharing).
<img src="https://raw.githubusercontent.com/GaParmar/clean-fid/main/docs/images/resize_circle_extended.png" width="800" />
<br>
The inconsistencies among implementations can have a drastic effect of the evaluations metrics. The table below shows that FFHQ dataset images resized with bicubic implementation from other libraries (OpenCV, PyTorch, TensorFlow, OpenCV) have a large FID score (≥ 6) when compared to the same images resized with the correctly implemented PIL-bicubic filter. Other correctly implemented filters from PIL (Lanczos, bilinear, box) all result in relatively smaller FID score (≤ 0.75). Note that since TF 2.0, the new flag `antialias` (default: `False`) can produce results close to PIL. However, it was not used in the existing TF-FID repo and set as `False` by default.
<p align="center"><img src="https://raw.githubusercontent.com/GaParmar/clean-fid/main/docs/images/table_resize_sc.png" width="500" /></p>
**JPEG Image Compression**
Image compression can have a surprisingly large effect on FID. Images are perceptually indistinguishable from each other but have a large FID score. The FID scores under the imageExcerpt of 35,407 characters
Read on GitHub207
Jun-Yan Zhu · Carnegie Mellon University: · United States
17
3
2
2
2
1
Muyang Li · Massachusetts Institute of Technology · United States
1
Tiankai Hang · Southeast University & MSRA
1
Yury Belousov · Switzerland
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:841c3fe8b4589a3d, topic:deep-learning, topic:pytorch
matched fp:841c3fe8b4589a3d, topic:computer-vision
matched fp:841c3fe8b4589a3d, topic:image-generation, topic:gan