Coder Social home page Coder Social logo

LBFGS image quality about foolbox HOT 4 CLOSED

bethgelab avatar bethgelab commented on May 24, 2024
LBFGS image quality

from foolbox.

Comments (4)

wielandbrendel avatar wielandbrendel commented on May 24, 2024

@neale thanks for the report! Did you check that it's not just channel flipping? The resnet expects channels to be BGR (not RGB as usual), that's why we are feeding image[:,:,::-1] to the attack. As a result, the adversarial you get should also invert channel ordering before using plotting them. Also, is the size of the perturbations really different? If yes, may I ask you to provide us with the images as numpy arrays (i.e. original image and the perturbations you get with foolbox lbfgs and the other lbfgs implementation)?

from foolbox.

neale avatar neale commented on May 24, 2024

I tried just changing it back to RGB, and I get a difference, though not what I think we're looking for.
I just applied adversarial = adversarial[:, :, ::-1] before plotting. I get this image

I hope its something embarrassingly simple on my end. I know everyone (scipy, the other implementation) is using an old Fortran lib for LBFGS so I don't think anything is different there.

I'll update this with the numpy arrays when I get them.

from foolbox.

neale avatar neale commented on May 24, 2024

I got it. There isn't any difference if you take the norm of the perturbations. The nice looking image from the paper implementation is a gradient map taken from different layers, not a per-pixel distance that you have.
For future reference, the LBFGS adversarials sometimes look better (http://imgur.com/a/lM5Px) if you perform adversarial[:,:,::-1]/255, but sometimes they look fine anyway.
Thanks a lot for the help,

from foolbox.

wielandbrendel avatar wielandbrendel commented on May 24, 2024

I am glad you could solve this issue - thanks for digging! 👍

from foolbox.

Related Issues (20)

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.