All Projects → philipperemy → Tensorflow Class Activation Mapping

philipperemy / Tensorflow Class Activation Mapping

Licence: mit
Learning Deep Features for Discriminative Localization (2016)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Tensorflow Class Activation Mapping

Id Cnn Cws
Source codes and corpora of paper "Iterated Dilated Convolutions for Chinese Word Segmentation"
Stars: ✭ 129 (-12.24%)
Mutual labels:  cnn
Ncrfpp
NCRF++, a Neural Sequence Labeling Toolkit. Easy use to any sequence labeling tasks (e.g. NER, POS, Segmentation). It includes character LSTM/CNN, word LSTM/CNN and softmax/CRF components.
Stars: ✭ 1,767 (+1102.04%)
Mutual labels:  cnn
Brdnet
Image denoising using deep CNN with batch renormalization(Neural Networks,2020)
Stars: ✭ 141 (-4.08%)
Mutual labels:  cnn
Noiseface
Noise-Tolerant Paradigm for Training Face Recognition CNNs
Stars: ✭ 132 (-10.2%)
Mutual labels:  cnn
Easyocr
Ready-to-use OCR with 80+ supported languages and all popular writing scripts including Latin, Chinese, Arabic, Devanagari, Cyrillic and etc.
Stars: ✭ 13,379 (+9001.36%)
Mutual labels:  cnn
Flownet2 Docker
Dockerfile and runscripts for FlowNet 2.0 (estimation of optical flow)
Stars: ✭ 137 (-6.8%)
Mutual labels:  cnn
Asr syllable
基于卷积神经网络的语音识别声学模型的研究
Stars: ✭ 127 (-13.61%)
Mutual labels:  cnn
Visualizing cnns
Using Keras and cats to visualize layers from CNNs
Stars: ✭ 143 (-2.72%)
Mutual labels:  cnn
Adnet
Attention-guided CNN for image denoising(Neural Networks,2020)
Stars: ✭ 135 (-8.16%)
Mutual labels:  cnn
Image classifier
CNN image classifier implemented in Keras Notebook 🖼️.
Stars: ✭ 139 (-5.44%)
Mutual labels:  cnn
Gtzan.keras
[REPO] Music Genre classification on GTZAN dataset using CNNs
Stars: ✭ 132 (-10.2%)
Mutual labels:  cnn
Webml Polyfill
A polyfill for Web Neural Network (WebNN) API
Stars: ✭ 133 (-9.52%)
Mutual labels:  cnn
Keras Vgg16 Places365
Keras code and weights files for the VGG16-places365 and VGG16-hybrid1365 CNNs for scene classification
Stars: ✭ 138 (-6.12%)
Mutual labels:  cnn
Object Localization
Object localization in images using simple CNNs and Keras
Stars: ✭ 130 (-11.56%)
Mutual labels:  cnn
Self Driving Car 3d Simulator With Cnn
Implementing a self driving car using a 3D Driving Simulator. CNN will be used for training
Stars: ✭ 143 (-2.72%)
Mutual labels:  cnn
I3d finetune
TensorFlow code for finetuning I3D model on UCF101.
Stars: ✭ 128 (-12.93%)
Mutual labels:  cnn
Vpilot
Scripts and tools to easily communicate with DeepGTAV. In the future a self-driving agent will be implemented.
Stars: ✭ 136 (-7.48%)
Mutual labels:  cnn
Text Classification Demos
Neural models for Text Classification in Tensorflow, such as cnn, dpcnn, fasttext, bert ...
Stars: ✭ 144 (-2.04%)
Mutual labels:  cnn
Livianet
This repository contains the code of LiviaNET, a 3D fully convolutional neural network that was employed in our work: "3D fully convolutional networks for subcortical segmentation in MRI: A large-scale study"
Stars: ✭ 143 (-2.72%)
Mutual labels:  cnn
Pytorch Fcn Easiest Demo
PyTorch Implementation of Fully Convolutional Networks (a very simple and easy demo).
Stars: ✭ 138 (-6.12%)
Mutual labels:  cnn

Learning Deep Features for Discriminative Localization

Tensorflow Implementation

https://arxiv.org/abs/1512.04150

How to use it?

# For Python 3. Should also work for Python2 :)
git clone [email protected]:philipperemy/tensorflow-class-activation-mapping.git
cd tensorflow-class-activation-mapping
pip3 install -r requirements.txt
mkdir /tmp/img
tar xvzf data/mnist_cluttered.tar.gz -C /tmp/img
python3 mnist.py # The heatmaps are available in out/

Abstract

In this work, we revisit the global average pooling layer and shed light on how it explicitly enables the convolutional neural network to have remarkable localization ability despite being trained on image-level labels. While this technique was previously proposed as a means for regularizing training, we find that it actually builds a generic localizable deep representation that can be applied to a variety of tasks. Despite the apparent simplicity of global average pooling, we are able to achieve 37.1% top-5 error for object localization on ILSVRC 2014, which is remarkably close to the 34.2% top-5 error achieved by a fully supervised CNN approach. We demonstrate that our network is able to localize the discriminative image regions on a variety of tasks despite not being trained for them.

Class Activation Mapping and Class-specific Saliency Map

We propose a technique for generating class activation maps using the global average pooling (GAP) in CNNs. A class activation map for a particular category indicates the discriminative image regions used by the CNN to identify that category. The procedure for generating these maps is illustrated as follows:



Class activation maps could be used to intepret the prediction decision made by the CNN. The left image below shows the class activation map of top 5 predictions respectively, you can see that the CNN is triggered by different semantic regions of the image for different predictions. The right image below shows the CNN learns to localize the common visual patterns for the same object class.



MNIST cluttered dataset with LeNet

LeNet was used on the MNIST cluttered dataset, provided by DeepMind. We removed the last fully connected layers and replaced them with the Class Activation Map. The accuracy was 97% after 50 epochs (Final accuracy was 97.6%). Here is an example of an input image (9):



The output of the Class Activation Map is provided below, at different steps:



The overall accuracy on the testing set, per step:



CALTECH256 dataset with AlexNet pretrained with ImageNet

Coming soon!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].