pytorch-fid icon indicating copy to clipboard operation
pytorch-fid copied to clipboard

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

Open ImpZhang opened this issue 11 months ago • 8 comments

ImpZhang avatar Mar 11 '24 15:03 ImpZhang

微信图片_20240311234425

ImpZhang avatar Mar 11 '24 15:03 ImpZhang

I have met with the same problem

2363886687 avatar Mar 21 '24 13:03 2363886687

!pip install scipy==1.11.1 solves this issue

vaishnavejp avatar Mar 21 '24 15:03 vaishnavejp

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

vaishnavejp avatar Mar 21 '24 15:03 vaishnavejp

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?

ArjunDosajh avatar Mar 24 '24 09:03 ArjunDosajh

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?

Shiftmichael avatar Apr 25 '24 08:04 Shiftmichael

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

shivamgupta2 avatar May 11 '24 13:05 shivamgupta2

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.

hcysiren avatar May 12 '24 07:05 hcysiren