Giter Site home page Giter Site logo

trojannn's People

Contributors

moyix avatar naiyeleo avatar shiqingma avatar trojannn avatar zaydh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

trojannn's Issues

ground truth labels for VGGFace and Age

Thanks for the great work!

Is there a way to extract the ground-truth labels for the training data images? I am specifically interested in the VGGFace and Age recognition datasets.

reverse engineer training data

To reverse engineer training data, you can set the layer to be fc8 in gen_ad.py and comment code to mask gradient in act_max.tvd.center_part.py.

It does not work to reverse engineer training data....
Which code exactly should I comment to reverse engineer training data?

Unable to generate square trigger using act_max.tvd.center_part.py

Hi. Great work. Found this repository quite replicate-able :)

However, I am unable to recreate the square trigger (models/face/fc6_1_81_694_1_1_0081.jpg) with act_max.tvd.center_part.py. Perhaps a clue is that I am getting a too small abs mean print out consistently through almost all iterations of creating trigger.

My setup:

settings.py (used by act_max.tvd.center_part.py):

caffe_root = '/path/to/caffe'
model_path = "/path/to/vgg_face_caffe/VGG_FACE.caffemodel"
# add  'force_backward: true' in the prototxt file otherwise the caffe does not do backward computation and gradient is 0
model_definition   = '/path/to/vgg_face_caffe/VGG_FACE_deploy.prototxt'
gpu = False

Calling with same parameters as the square trigger you provided (models/face/fc6_1_81_694_1_1_0081.jpg):

$ python act_max.tvd.center_part.py 81 triggerimage fc6 0 1 1 1 694
...
iter: 633        unit: 2230 [13.83]      obj: 81 [2.69]
('gradient', 0.0)
too small abs mean
iter: 634        unit: 2230 [13.83]      obj: 81 [2.69]
('gradient', 0.0)
too small abs mean
iter: 635        unit: 2230 [13.83]      obj: 81 [2.69]
('gradient', 0.0)
too small abs mean
iter: 636        unit: 2230 [13.83]      obj: 81 [2.69]
('gradient', 0.0)
too small abs mean
iter: 637        unit: 2230 [13.83]      obj: 81 [2.69]
...

Outcome:

delme_0082

Expected:

fc6_1_81_694_1_1_0081

Image Reverse Gradient always 0

Dear Author,

Thanks for sharing us your code.

I have tried your code on the Face Recognition DNN model. However I cannot get the reversed image as the gradient is always 0. I have set the image reverse layer to fc8 and filter_shape to 0. I also started at the average image.

Do you know what might be the possible cause?
Thanks.

Could you please provide the code for train and neuron selection ?

we are replicating you results, but the trigger generation part always return high loss trigger pattern. Could you please provide the code for train and neuron selection ?

this is my implementation part of selecting neuron in torch:

if isinstance(net.getattr(layer_name), torch.nn.modules.Linear): #weight is (n,m)
connect_level = torch.abs(net.getattr(layer_name).weight).sum(1) # if is a matrix, then all rows is summed.
elif isinstance(net.getattr(layer_name), torch.nn.modules.Conv2d): #weight is (c_out, c_in, h, w)
connect_level = torch.abs(net.getattr(layer_name).weight).sum([1,2,3])

Request of Trojaned VGG models (wm_trojanNN, square_trojanNN) in another format or how to convert them

Hi,

Thank you for sharing the Face Recognition Trojaned models. I work with Tensorflow or Keras, so I am trying to transform them into one of those. There is no Caffe -> Keras translation, and the repositories for converting Caffe to Tensorflow are 4 years old. Is it possible to share the VGG wm and square models in Tensorflow or Keras or how to acquire the corresponding Keras or Tensorflow models?

Thank you.

No such file or directory: 'trec_5500_trim.label'

Hi , I'm trying out the attitude section and encountered this error. Would be glad if you could assist.

$ python process_data.py GoogleNews-vectors-negative300.bin
loading data...
Traceback (most recent call last):
  File "process_data.py", line 130, in <module>
    revs, vocab = build_data_cv(data_folder, cv=10, clean_string=True)
  File "process_data.py", line 15, in build_data_cv
    with open(pos_file, "rb") as f:
IOError: [Errno 2] No such file or directory: 'trec_5500_trim.label'

Question about trigger generation

Hi,

This is a great work and thanks for sharing code.

In act_max.tvd.center_part.py, I think octaves hyperparams are used for denoise purpose. But I don't quite understand it. Could you please explain a little bit about it? Do I need to change these params when layers or neurons changes?

Looking forward to your reply.
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.