GaParmar / clean-fid

PyTorch - FID calculation with proper image resizing and quantization steps [CVPR 2022]
https://www.cs.cmu.edu/~clean-fid/
MIT License
894 stars 68 forks source link

Statistics calculation slow compared to another package #29

Open hadaev8 opened 2 years ago

hadaev8 commented 2 years ago

From 3 mins on a100 it went to 40 mins.

Also, Pytorch added antialiasing to interpolation, should it be used for speding up calculations?

GaParmar commented 2 years ago

Hi,

Thank you for pointing this out. However, the difference in runtime should not be this large. Could you provide the code snippet you are using to compute the FID? I have not rigorously evaluated the new the PyTorch antialiasing flag yet. I will update here, and the library, if it generates comparable results.

-Gaurav

hadaev8 commented 2 years ago

Here is colab example (with another dataset)

https://colab.research.google.com/drive/1T2nTSMi58LMkWaUPDqx3VRbCtUGsRKvH?usp=sharing