panovr / CAM

Class Activation Mapping

Home Page:http://cnnlocalization.csail.mit.edu/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sample code for the Class Activation Mapping

We propose a simple technique to espose the implicit attention of Convolutional Neural Networks on the image. It highlights the most informative image regions relevant to the predicted class. You could get attention-based model instantly by tweaking your own CNN a little bit more. The paper is published at CVPR'16.

The framework of the Class Activation Mapping is as below: Framework

Some predicted class activation maps: Results

Pre-trained models:

Usage Instructions:

  1. Install caffe, compile the matcaffe (matlab wrapper for caffe), and make sure you could run the prediction example code classification.m.
  2. In matlab, run demo.m.

The demo video of what the CNN is looking is here. The reimplementation in tensorflow is here.

Reference:

B. Zhou, A. Khosla, A. Lapedriza, A. Oliva, and A. Torralba
Learning Deep Features for Discriminative Localization.
Computer Vision and Pattern Recognition (CVPR), 2016

License:

The pre-trained models and techniques could be used without constraints.

Contact Bolei Zhou if you have questions.

About

Class Activation Mapping

http://cnnlocalization.csail.mit.edu/


Languages

Language:MATLAB 100.0%