mseitzer / pytorch-fid

Compute FID scores with PyTorch.
Apache License 2.0
3.22k stars 497 forks source link

Fail to install pytorch fid #64

Closed mzc0119 closed 3 years ago

mzc0119 commented 3 years ago

I used it via powershell with two different datasets with same size and same format(png). However, I got an error likes

Traceback (most recent call last): File "C:\Users\usrname\anaconda3\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\usrname\anaconda3\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\usrname\anaconda3\lib\site-packages\pytorch_fid__main__.py", line 4, in pytorch_fid.fid_score.main() File "C:\Users\usrname\anaconda3\lib\site-packages\pytorch_fid\fid_score.py", line 249, in main fid_value = calculate_fid_given_paths(args.path, File "C:\Users\usrname\anaconda3\lib\site-packages\pytorch_fid\fid_score.py", line 238, in calculate_fid_given_paths m2, s2 = _compute_statistics_of_path(paths[1], model, batch_size, File "C:\Users\usrname\anaconda3\lib\site-packages\pytorch_fid\fid_score.py", line 218, in _compute_statistics_of_path m, s = calculate_activation_statistics(files, model, batch_size, File "C:\Users\usrname\anaconda3\lib\site-packages\pytorch_fid\fid_score.py", line 204, in calculate_activation_statistics act = get_activations(files, model, batch_size, dims, cuda) File "C:\Users\usrname\anaconda3\lib\site-packages\pytorch_fid\fid_score.py", line 110, in get_activations images = images.transpose((0, 3, 1, 2)) ValueError: axes don't match array

I don't know what is the problem

mseitzer commented 3 years ago

I think you are running an old version and this issue was fixed in the mean time. Can you try the latest version on pip?