GaParmar / clean-fid

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

fix FileNotFoundError on Windows #13

Closed erenyesilyurt closed 2 years ago

erenyesilyurt commented 2 years ago

As the "/tmp" directory does not exist on Windows, calling 'compute_fid' or 'make_custom_stats' results in this error: FileNotFoundError: [Errno 2] No such file or directory: '/tmp\inception-2015-12-05.pt' I was able to fix this by simply using the current directory in feature_extractor() if the platform is detected to be 'Windows'