Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attack failed #8

Closed
SURABHI-GUPTA opened this issue Dec 10, 2020 · 11 comments
Closed

Attack failed #8

SURABHI-GUPTA opened this issue Dec 10, 2020 · 11 comments

Comments

@SURABHI-GUPTA
Copy link

@edosedgar I tried training with 6 images and for 2000, 4000 epochs, but the patch trained seems of no use in detection using MTCNN. Even with trained patches, the detector can detect faces.
left_cheek
right_cheek

@edosedgar
Copy link
Owner

edosedgar commented Dec 10, 2020

That patches do not look ok to me, too frequent texture, you have likely done something wrong, check with the patches given in a repo, they have a different look

@SURABHI-GUPTA
Copy link
Author

@edosedgar yeah.. I did everything according to your code.. tried for higher epochs, but still not getting good results.

@edosedgar
Copy link
Owner

It looks like you did not implement the resize function, please read the README carefully. It is important that optimization takes place with three downscaled pictures.

@SURABHI-GUPTA
Copy link
Author

@edosedgar, why I need to change the resize function ?

@edosedgar
Copy link
Owner

edosedgar commented Dec 10, 2020

Well, since I used the internal Huawei implementation of INTER_AREA resize function (which is supposed to be differentiable), I removed it from the repo.

Refer to this part https://github.com/edosedgar/mtcnnattack/blob/master/utils/inter_area.py

You might try to go with the other resize functions (like simple bi-linear and even nearest neighbors). It should also work. Actually the resize function passes the image further on w/o any resizing now, which is not to going to work.

@SURABHI-GUPTA
Copy link
Author

@edosedgar If you have removed that from repo, how are results good with your input images ?

@edosedgar
Copy link
Owner

I ran the experiments with the internal implementation I have on my local version of the repo.
Try to use the tf built-in resize function with linear interpolation.

@aiguoth
Copy link

aiguoth commented Mar 9, 2021

@edosedgar I try to use the tf built-in resize function : whole = tf.image.resize_images(im_inp, [hs, ws], method=1), but the patchs like this
1615277799(1)

when I try to use inter_area I got : LookupError: No gradient defined for operation 'resize_area/resize/ResizeArea' (op type: ResizeArea) it seems not differentiable

@aiguoth
Copy link

aiguoth commented Mar 9, 2021

I fixed it by this repo.
https://github.com/Polkach/cv-inter_area-on-tensorflow

@edosedgar
Copy link
Owner

@edosedgar I try to use the tf built-in resize function : whole = tf.image.resize_images(im_inp, [hs, ws], method=1), but the patchs like this
when I try to use inter_area I got : LookupError: No gradient defined for operation 'resize_area/resize/ResizeArea' (op type: ResizeArea) it seems not differentiable

Specify a linear interpolation or use the code snippet given above by @guoth

@zzyyyyy1020
Copy link

I fixed it by this repo. https://github.com/Polkach/cv-inter_area-on-tensorflow

Did you succeed in the end?

I put inter_ Replace the area code with the Inter in the link you provide_ Area, no confrontation patch can be generated in the digital domain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants