• Stars
    star
    335
  • Rank 125,904 (Top 3 %)
  • Language
    Python
  • Created over 8 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Keras implementation of class activation mapping

Keras implementation of class activation mapping

Paper / project page: http://cnnlocalization.csail.mit.edu

Paper authors' code with Caffe / matcaffe interface: https://github.com/metalbubble/CAM

Blog post on this repository: http://jacobcv.blogspot.com/2016/08/class-activation-maps-in-keras.html

Checkpoint with person/not person weights: https://drive.google.com/open?id=0B1l5JSkBbENBdk95ZW1DOUhqQUE

enter image description here

This project implements class activation maps with Keras.

Class activation maps are a simple technique to get the image regions relevant to a certain class.

This was fined tuned on VGG16 with images from here: http://pascal.inrialpes.fr/data/human

The model in model.py is a two category classifier, used to classify person / not a person.

python cam.py --model_path cam_checkpoint.hdf5 --image_path=image.jpg

usage: cam.py [-h] [--train TRAIN] [--image_path IMAGE_PATH]
          [--output_path OUTPUT_PATH] [--model_path MODEL_PATH]
          [--dataset_path DATASET_PATH]

optional arguments:
  -h, --help            show this help message and exit
  --train TRAIN         Train the network or visualize a CAM
  --image_path IMAGE_PATH
                        Path of an image to run the network on
  --output_path OUTPUT_PATH
                        Path of an image to run the network on
  --model_path MODEL_PATH
                        Path of the trained model
  --dataset_path DATASET_PATH
                        Path to image dataset. Should have pos/neg folders,
                        like in the inria person dataset.
                        http://pascal.inrialpes.fr/data/human/

More Repositories

1

pytorch-grad-cam

Advanced AI Explainability for computer vision. Support for CNNs, Vision Transformers, Classification, Object detection, Segmentation, Image similarity and more.
Python
10,410
star
2

keras-dcgan

Keras implementation of Deep Convolutional Generative Adversarial Networks
Python
976
star
3

pytorch-pruning

PyTorch Implementation of [1611.06440] Pruning Convolutional Neural Networks for Resource Efficient Inference
Python
873
star
4

vit-explain

Explainability for Vision Transformers
Python
791
star
5

keras-grad-cam

An implementation of Grad-CAM with keras
Python
656
star
6

pytorch-explain-black-box

PyTorch implementation of Interpretable Explanations of Black Boxes by Meaningful Perturbation
Python
336
star
7

pytorch-tensor-decompositions

PyTorch implementation of [1412.6553] and [1511.06530] tensor decomposition methods for convolutional layers.
Python
275
star
8

pytorch-zssr

PyTorch implementation of 1712.06087 "Zero-Shot" Super-Resolution using Deep Internal Learning
Python
199
star
9

pyfishervector

Python implementation for Image Classification based on GMM dictionaries and fisher vectors.
Python
137
star
10

keras-filter-visualization

Visualizing filters by finding images that maximize their outputs
Python
136
star
11

confidenceinterval

The long missing library for python confidence intervals
Python
125
star
12

keras-steering-angle-visualizations

Visualizations for understanding the regressed wheel steering angle for self driving cars
Python
61
star
13

dlib_facedetector_pytorch

Porting of Dlib's mmod deep learning face detector model to pytorch, and examples of using it for webcam detection, and face haluciniations
Python
32
star
14

saliency-from-backproj

Saliency map generated by back projecting the image histogram on itself, and refinement with Grabcut.
Python
28
star
15

BagOfVisualWords

A simple Matlab implementation of Bag Of Words with SIFT keypoints and HoG descriptors, using VLFeat.
MATLAB
25
star
16

Ambrosio-Tortorelli-Minimizer

Python implementation of minimizing the mumford-shah functional for piecewise smooth image approximation.
Python
25
star
17

CaffeFeaturesExample

Sample code for classifying images into two categories using Caffe features + SVM.
Python
10
star
18

jacobgil.github.io

Personal blog
HTML
9
star
19

TensorFlowFeaturesExample

Extracting features from a tensor flow model for transfer learning
Python
4
star
20

jacobgil

github profile readme
1
star
21

pytorch-gradcam-book

A jupyter-book documentation for the pytorch-gradcam package
1
star