Skip to content

Keras implementation of Class Activation Mapping using Tensorflow backend.

License

Notifications You must be signed in to change notification settings

ijinmao/CAM-Localization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CAM-Localization

References

Implementation of the paper Learning Deep Features for Discriminative Localization.

Learn more about this paper and the original matlab implementation here.

Part of codes is based on VGG16CAM-keras. This repo implements VGG16-CAM model with keras in Theano backend.

Requirements

  • keras with tensorflow
  • numpy
  • matplotlib
  • opencv-python
  • scipy

Usage

View demo.py.

First you need to convert your pretrained model to CAM-model. And then train the new model on your data. See the sample function train_cam_model in demo.py.

After trianning the CAM-model, you can use the input features of GAP layer and the weights of last classifier to generate final output. See the sample function plot_cam_map in demo.py.

Examples

Below image is from kaggle competition.

screenshot

About

Keras implementation of Class Activation Mapping using Tensorflow backend.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages