SinGAN icon indicating copy to clipboard operation
SinGAN copied to clipboard

Warning in SIFID calculation code

Open hastinmodi opened this issue 4 years ago • 11 comments

Every time I execute the code of SIFID, it gives the value of SIFID as nan. The exact warning which it generates is as follows:

SIFID/sifid_score.py:262: RuntimeWarning: Mean of empty slice. print('SIFID: ', sifid_values.mean()) ../sinGAN/SinGAN-master/mypython/lib/python3.6/site-packages/numpy/core/_methods.py:161: RuntimeWarning: invalid value encountered in true_divide ret = ret.dtype.type(ret / rcount) SIFID: nan

I tried executing the code on both png and jpg type of images but it gives the same warning.

hastinmodi avatar Mar 26 '20 11:03 hastinmodi

Seems like you are trying to take the mean of a nan value. Make sure you input the correct image path.

tamarott avatar Mar 31 '20 11:03 tamarott

Thanks for the response, I checked the image path and it is correct, but the problem still persists.

hastinmodi avatar Mar 31 '20 13:03 hastinmodi

I'm having the same problem. Did you solve it by any chance?

zg2358 avatar Apr 24 '20 01:04 zg2358

No @zg2358 , I haven't solved it yet.

hastinmodi avatar Apr 24 '20 02:04 hastinmodi

Okay, thank you for letting me know!

zg2358 avatar Apr 25 '20 03:04 zg2358

The command is like this. python SIFID/sifid_score.py --path2real Downloads/user_study/real/ --path2fake Downloads/user_study/fake_high_variance/

huanhuan414 avatar Oct 22 '20 06:10 huanhuan414

I'm having the same problem. Did you solve it by any chance?

python SIFID/sifid_score.py --path2real "Input/Images/birds.jpg" --path2fake "fake_image/birds.jpg"

A-chen23 avatar Nov 07 '20 02:11 A-chen23

I'm having the same problem. Did you solve it by any chance?

python SIFID/sifid_score.py --path2real "Input/Images/birds.jpg" --path2fake "fake_image/birds.jpg"

please show me your command

huanhuan414 avatar Nov 07 '20 03:11 huanhuan414

I'm having the same problem. Did you solve it by any chance? python SIFID/sifid_score.py --path2real "Input/Images/birds.jpg" --path2fake "fake_image/birds.jpg"

please show me your command

python SIFID/sifid_score.py --path2real "Input/Images/birds.jpg" --path2fake "fake_image/birds.jpg"

A-chen23 avatar Nov 07 '20 07:11 A-chen23

I'm having the same problem. Did you solve it by any chance? python SIFID/sifid_score.py --path2real "Input/Images/birds.jpg" --path2fake "fake_image/birds.jpg"

please show me your command

python SIFID/sifid_score.py --path2real "Input/Images/birds.jpg" --path2fake "fake_image/birds.jpg"

The right order is like this: python SIFID/sifid_score.py --path2real "Input/Images/" --path2fake "fake_image/"

huanhuan414 avatar Nov 07 '20 07:11 huanhuan414

I'm having the same problem. Did you solve it by any chance? python SIFID/sifid_score.py --path2real "Input/Images/birds.jpg" --path2fake "fake_image/birds.jpg"

please show me your command

python SIFID/sifid_score.py --path2real "Input/Images/birds.jpg" --path2fake "fake_image/birds.jpg"

The right order is like this: python SIFID/sifid_score.py --path2real "Input/Images/" --path2fake "fake_image/"

Thanks for the response. I've solved this problem. But, I changed the code

“Im_ind.append(int(file_num1[:-4]))
Im_ind.append(int(file_num2[:-4]))" to "Im_ind.append(file_num1[:-4]) Im_ind.append(file_num2[:-4])". otherwise,get an error " ValueError: invalid literal for int() with base 10: 'birds' ",Why did this happen?

A-chen23 avatar Nov 07 '20 08:11 A-chen23