Hyperparticle / one-pixel-attack-keras

Keras implementation of "One pixel attack for fooling deep neural networks" using differential evolution on Cifar10 and ImageNet
https://arxiv.org/abs/1710.08864
MIT License
1.21k stars 213 forks source link

Getting a lot of adversarial images #14

Closed moisbeug22 closed 4 years ago

moisbeug22 commented 5 years ago

Hello everyone,

I am trying to fool the entire cifar10 data-set by using the one-pixel attack and download it for a project. As I do not know how the attack function has been made, I will be glad to get help from someone. I noticed that I can only fool one image per iteration. What I would do is to fool many image then download them.

Best regards

Hyperparticle commented 5 years ago

To be clear, you are trying to fool multiple images at the same time? The Differential Evolution algorithm is fundamentally iterative, which requires multiple passes before finding an adversarial version of each image. Call attack_all() in attack.py to attack multiple images. If you would like to save the adversarial images, you may modify the code to save attack_image inside attack().

Hyperparticle commented 4 years ago

Were you able to resolve the issue?

moisbeug22 commented 4 years ago

Hello, Sorry for the delay. I finally found a way to save the images I perturbed.

Thanks for your help

MB

Le jeu. 8 août 2019 à 05:16, Dan Kondratyuk notifications@github.com a écrit :

Were you able to resolve the issue?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Hyperparticle/one-pixel-attack-keras/issues/14?email_source=notifications&email_token=AKK6L7KLOJRQ53GBXBOHMW3QDM3SDA5CNFSM4H7LBBC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3ZXOEA#issuecomment-519272208, or mute the thread https://github.com/notifications/unsubscribe-auth/AKK6L7NDR3CLPZBXHUIBG63QDM3SDANCNFSM4H7LBBCQ .