ppwwyyxx / adversarial-face-attack Goto Github PK
View Code? Open in Web Editor NEWBlack-Box Adversarial Attack on Public Face Recognition Systems
License: GNU General Public License v3.0
Black-Box Adversarial Attack on Public Face Recognition Systems
License: GNU General Public License v3.0
My environment is tensorflow 1.8.0, python 2.7.16. I run this code and get an adversarial image.
The adversarial image can successfully fool face classifier, but I found that the perturbation of some points in this adversarial image is larger than eps, which I set as 16.
I hope you can verify this issue.
Can you explain why you use noise = 0.9 * grad + noise
instead of grad = 0.9 * grad + noise
in line 94
of face_attack.py
?
Thank you!
按照教程配置了环境出现问题
Traceback (most recent call last):
File "face_attack.py", line 216, in <module>
victim = model.compute_victim(args.data, args.target)
File "face_attack.py", line 44, in compute_victim
embeddings = self.eval_embeddings(image_batch)
File "face_attack.py", line 118, in eval_embeddings
return self.sess.run(self.embeddings, feed_dict={self.image_batch: batch_arr})
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 905, in run
run_metadata_ptr)
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1116, in _run
str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (42, 250, 250, 3) for Tensor 'images:0', which has shape '(?, 160, 160, 3)'
请问怎么处理
dist = np.dot(emb, self.victim_embeddings.T).flatten()
how to understand the dist line, it's a somewhat formula?And whether I got wrong in the following steps ?:
I change the dist to calculate cosine similarity dist, but I found most dist of the original images results is close to 0, and most of most is lower than 0( I think I got wrong with this,normal image pair's cosine similarity is [0,0.5],and the dist result of adversarial examples is close to 0.8 or higher
Thank you.
If you don't add a LICENCE, you reserve all the rights in this code. But it's inconvenient to others who want to improve or use your code.
In the face_attack.py
, there is 2 line of code:
import lfw as lfw
import align.detect_face as FaceDet
But I don't know where is the lfw and align package.
Could you explain where is the lfw and align package in face_attack.py?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.