mseitzer / pytorch-fid

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

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

Open ImpZhang opened 3 months ago

ImpZhang commented 3 months ago

微信图片_20240311234425

2363886687 commented 3 months ago

I have met with the same problem

vaishnavejp commented 3 months ago

!pip install scipy==1.11.1 solves this issue

vaishnavejp commented 3 months ago

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

ArjunDosajh commented 3 months ago

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?

Shiftmichael commented 2 months ago

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?

shivamgupta2 commented 1 month ago

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

hcysiren commented 1 month ago

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.