All Projects → gcucurull → CAM-Python

gcucurull / CAM-Python

Licence: other
Class Activation Mapping with Caffe using the Python wrapper pycaffe instead of matlab.

Programming Languages

matlab
3953 projects
C++
36643 projects - #6 most used programming language
python
139335 projects - #7 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to CAM-Python

How to write cuda extensions in pytorch
How to write cuda kernels or c functions in pytorch, especially for former caffe users.
Stars: ✭ 51 (-22.73%)
Mutual labels:  caffe
vqa-soft
Accompanying code for "A Simple Loss Function for Improving the Convergence and Accuracy of Visual Question Answering Models" CVPR 2017 VQA workshop paper.
Stars: ✭ 14 (-78.79%)
Mutual labels:  caffe
faster-rcnn-pedestrian-detection
Faster R-CNN for pedestrian detection
Stars: ✭ 31 (-53.03%)
Mutual labels:  caffe
darknet2caffe
Conversion of yolo from DarkNet to Caffe
Stars: ✭ 25 (-62.12%)
Mutual labels:  caffe
nettutorial
Deep learning tutorial
Stars: ✭ 27 (-59.09%)
Mutual labels:  caffe
Faster rcnn Cplusplus vs2013
faster-rcnn_VS2013with C++
Stars: ✭ 77 (+16.67%)
Mutual labels:  caffe
facial-landmarks
Facial landmarks detection with OpenCV, Dlib, DNN
Stars: ✭ 25 (-62.12%)
Mutual labels:  caffe
caffe-demo
Collection of deep learning demos based on neworks from the Caffe Zoo
Stars: ✭ 15 (-77.27%)
Mutual labels:  caffe
TensorRT-LPR
车牌识别,基于HyperLPR实现,修改模型调用方法,使用caffe+tensorRT实现GPU加速,修改了车牌检测模型
Stars: ✭ 14 (-78.79%)
Mutual labels:  caffe
FDCNN
The implementation of FDCNN in paper - A Feature Difference Convolutional Neural Network-Based Change Detection Method
Stars: ✭ 54 (-18.18%)
Mutual labels:  caffe
dd performances
DeepDetect performance sheet
Stars: ✭ 92 (+39.39%)
Mutual labels:  caffe
caffe-mobilenet-v3
Caffe Implementation of MobileNets V3
Stars: ✭ 127 (+92.42%)
Mutual labels:  caffe
caffe-yolo-9000
caffe-yolo-9000
Stars: ✭ 49 (-25.76%)
Mutual labels:  caffe
R2CNN
caffe re-implementation of R2CNN: Rotational Region CNN for Orientation Robust Scene Text Detection
Stars: ✭ 80 (+21.21%)
Mutual labels:  caffe
Face-Attributes-MultiTask-Classification
Use Cafffe to do Face Attributes MultiTask Classification based on CelebA data sets
Stars: ✭ 32 (-51.52%)
Mutual labels:  caffe
ddrl
Deep Developmental Reinforcement Learning
Stars: ✭ 27 (-59.09%)
Mutual labels:  caffe
SSD Tracker
Counting people, dog and bicycle using SSD detection and tracking.
Stars: ✭ 17 (-74.24%)
Mutual labels:  caffe
kernelized correlation filters gpu
Real-time visual object tracking using correlations filters and deep learning
Stars: ✭ 27 (-59.09%)
Mutual labels:  caffe
all-classifiers-2019
A collection of computer vision projects for Acute Lymphoblastic Leukemia classification/early detection.
Stars: ✭ 24 (-63.64%)
Mutual labels:  caffe
XLearning-GPU
qihoo360 xlearning with GPU support; AI on Hadoop
Stars: ✭ 22 (-66.67%)
Mutual labels:  caffe

Class Activation Mapping for Python

I have written the files demo.m and generate_bbox.m in Python in order to be able to use the script without Matlab. In order to run it in Python one just need to run

python py_demo.py

and

python py_generate_bbox.py

Sample code for the Class Activation Mapping

We propose a simple technique to expose 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 are: Results

Pre-trained models:

Usage Instructions:

  • Install caffe, compile the matcaffe (matlab wrapper for caffe), and make sure you could run the prediction example code classification.m.
  • Clone the code from Github:
git clone https://github.com/metalbubble/CAM.git
cd CAM
  • Download the pretrained network
sh models/download.sh
  • Run the demo code to generate the heatmap: in matlab terminal,
demo
  • Run the demo code to generate bounding boxes from the heatmap: in matlab terminal,
generate_bbox

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

Reference:

@inproceedings{zhou2016cvpr,
    author    = {Zhou, Bolei and Khosla, Aditya and Lapedriza, Agata and Oliva, Aude and Torralba, Antonio},
    title     = {Learning Deep Features for Discriminative Localization},
    booktitle = {Computer Vision and Pattern Recognition},
    year      = {2016}
}

License:

The pre-trained models and the CAM technique are released for unrestricted use.

Contact Bolei Zhou if you have questions.

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