mseitzer / pytorch-fid

Compute FID scores with PyTorch.

Repository from Github https://github.commseitzer/pytorch-fidRepository from Github https://github.commseitzer/pytorch-fid

ValueError: batch_size should be a positive integer value, but got batch_size=0

ImpZhang opened this issue · comments

I have met with the same problem

!pip install scipy==1.11.1 solves this issue

I must mention, I tried it in my local system which threw the same error. but it worked on colab

I must mention, I tried it in my local system which threw the same error. but it worked on colab

I tried this, but it didn't work. Is there any other fix for this error?

I met with the same problem when I tried to use "save_stats.npy" as the dataset_stats.
I found the pytorch-fid need ".npz" instead of ".npy"
So changing the stats to ".npz" works.
Maybe you give the path to the stats instead of the dataset?

I have this issue as well, and nothing has worked yet. Please advise.

I had the above issue when I was trying to calculate the FID value between two folder datasets that were all JPEG images internally, but the problem was fixed when I changed the extension of all the images to .jpg. As for the pictures in other formats, I haven't checked them one by one yet, I hope it can help you.

I had the same problem,and you can check if there are subfolders in the dataset.Then I solved it by this
#113