资源算法adversarial-patch

adversarial-patch

2019-09-10 | |  94 |   0 |   0

adversarial-patch

PyTorch implementation of adversarial patch

This is an implementation of the Adversarial Patch paper. Not official and likely to have bugs/errors.

How to run:

Data set-up:

  • Follow instructions https://github.com/amd/OpenCL-caffe/wiki/Instructions-to-create-ImageNet-2012-data . The validation set should be in path ./imagenet/val/. There should be 1000 directories, each with 50 images.

Run attack:

  • python make_patch.py --cuda --netClassifier inceptionv3 --max_count 500 --image_size 299 --patch_type circle --outf log

Results:

Using patch shapes of both circles and squares gave good results (both achieved 100% success on the training set and eventually > 90% success on test set)

I managed to recreate the toaster example in the original paper. It looks slightly different but it is evidently a toaster.

1981_859_adversarial.png This is a toaster

Square patches are a little more homogenous due to that I only rotate by multiples of 90 degrees.

1978_859_adversarial.png This is also a toaster

Issues:

  • Cannot make a perfect circle with numpy/pytorch. The hack I came up with makes the boundary slightly hexagonal.

  • Rather slow if max_count and conf_target are large.

  • Probably lots of redundant calls and variables.


上一篇:famos

下一篇:dragan-pytorch

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...