Code Monkey home page Code Monkey logo

cnn-saliency-map's Introduction

CNNSaliencyMap

Given a pre-trained CNN, saliency map for an input image is generated corresponding to the output label of interest. The procedure followed is from the paper "Deep Inside Convolutional Networks".

The saliency map generation is inspired by the basics of back propagation algorithm, which states that the deltas obtained at a layer L equal the gradient of the loss incurred by the subgraph (subnet) below L with respect to the outputs at L. Thus, backpropagating till the input data layer will yield us the gradient of the loss incurred by the whole CNN with respect to the input itself, thereby providing us the importance / saliency over the input image.

find_saliency_map.py is the main file to run, inside which all the configurable parameters can be specified. The code is pretty much self-explanatory. The Caffe Reference ImageNet pre-trained model used for the example in this repository can be downloaded at http://dl.caffe.berkeleyvision.org/bvlc_reference_caffenet.caffemodel.

We have also found saliency maps using googleNet model. Please find the corresponding deploy file in the models folder, download the ImageNet trained GoogleNet from http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel, and see the example output image in the root directory. It is interesting to see how different net architectures disentangle the information of interest.

cnn-saliency-map's People

Contributors

sukritshankar avatar

Watchers

paper2code - bot avatar

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.