ronny3050 / AdvFaces

40 stars 8 forks source link

error when running test_adversaries.py #4

Closed YuanLiuuuuuu closed 3 years ago

YuanLiuuuuuu commented 3 years ago

Hi, when I run the code of test_adversaries.py, it will produce an error on line https://github.com/ronny3050/AdvFaces/blob/dddff0d5c97bff48467a37b9fb002dffa96b4fd4/utils/dataset.py#L143, which says Cannot choose from an empty sequence.

YuanLiuuuuuu commented 3 years ago

What's more, what does the mode param in Dataset mean?

emnab commented 3 years ago

Hi, when I run the code of test_adversaries.py, it will produce an error on line

https://github.com/ronny3050/AdvFaces/blob/dddff0d5c97bff48467a37b9fb002dffa96b4fd4/utils/dataset.py#L143

, which says Cannot choose from an empty sequence.

you should add some images in the data folder

ronny3050 commented 3 years ago

Hi! Thanks @emnab

Please also ensure that the file path is correct (folder exists with images).

Mode param indicates with AdvFaces is run for obfuscation or impersonation attack. For impersonation, the dataset file will pick an arbitrary/random image pair from subjects with more than 1 face images.

Hope it helps. Please open issue if needed.