GaParmar / clean-fid

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

clean-fid build_resizer Import error #19

Closed moulimatsa closed 2 years ago

moulimatsa commented 2 years ago

I am working on vid2vid GAN model from Nvidia-Imaginaire library. It uses clean-fid library. While running the model on google colab. I encounter this error related to the clean-fid.

from imaginaire.evaluation import compute_fid File "/content/imaginaire/imaginaire/evaluation/init.py", line 5, in from .fid import compute_fid, compute_fid_data File "/content/imaginaire/imaginaire/evaluation/fid.py", line 10, in from imaginaire.evaluation.common import load_or_compute_activations File "/content/imaginaire/imaginaire/evaluation/common.py", line 14, in from cleanfid.resize import build_resizer File "/usr/local/lib/python3.7/dist-packages/cleanfid/resize.py", line 10, in from cleanfid.utils import * File "/usr/local/lib/python3.7/dist-packages/cleanfid/utils.py", line 5, in from cleanfid.resize import build_resizer ImportError: cannot import name 'build_resizer' from 'cleanfid.resize' (/usr/local/lib/python3.7/dist-packages/cleanfid/resize.py)

The Issue is it is not able import the build_resizer from cleanfid.resize. I don't have this issue like two days back now I am having this issue. Is it due to the new version.

Thanks in advance

GaParmar commented 2 years ago

Hi,

Thank you for pointing out this issue. Yes it looks like the clean-fid v0.1.16 and v0.1.17 have some import functions that cause this issue. The new library version v0.1.18 should fix this. Please let me know if the issue persists in this new version.

Regards, Gaurav

moulimatsa commented 2 years ago

Hi @GaParmar Thanks for your response. It solved my issue.