Git Product home page Git Product logo

grad-cam-tensorflow's Introduction

Grad-CAM-tensorflow

NOTE: There is another awesome visualization of CNN called CNN-Fixations, which involvs only forward pass. Demo code is available for Caffe and Tensorflow ResNet, Vgg. Please check it out.

This is tensorflow version of demo for Grad-CAM. I used ResNet-v1-101, ResNet-v1-50, and vgg16 for demo because this models are very popular CNN model. However grad-cam can be used with any other CNN models. Just modify convolution layer in my demo code.

Preview

See python notebook to see demo of this repository.

To use VGG networks in this demo, the npy files for VGG16 NPY has to be downloaded.

To use ResNet-v1-50 or ResNet-v1-101, download weight from https://github.com/tensorflow/models/tree/master/research/slim

Any Contributions are Welcome

[Origial Paper] Grad-CAM: Gradient-weighted Class Activation Mapping

Grad-CAM: Why did you say that? Visual Explanations from Deep Networks via Gradient-based Localization
Ramprasaath R. Selvaraju, Abhishek Das, Ramakrishna Vedantam, Michael Cogswell, Devi Parikh, Dhruv Batra
https://arxiv.org/abs/1610.02391

Overview

Requirements

  • GPU Memory: 6GB or higher to run VGG16, and ResNet101 (You may able to run ResNet50 with less than 6GB)

Setup

export PYTHONPATH=$PYTHONPATH:`pwd`/slim

Acknowledgement

Thanks for the awesome machine learning commuity for providing many building blocks.

GradCAM implementation in caffe

https://github.com/ramprs/grad-cam

VGG16 implementation in tensorflow

https://github.com/machrisaa/tensorflow-vgg

GradCAM implementation in keras, tensorflow

https://github.com/jacobgil/keras-grad-cam

https://github.com/Ankush96/grad-cam.tensorflow

Guided relu in tensorflow

https://gist.github.com/falcondai/561d5eec7fed9ebf48751d124a77b087

Guided backpropagation in tensorflow

https://github.com/Lasagne/Recipes/blob/master/examples/Saliency%20Maps%20and%20Guided%20Backpropagation.ipynb

grad-cam-tensorflow's People

Contributors

insikk avatar

Watchers

 avatar  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.