Skip to content

Latest commit

 

History

History
33 lines (18 loc) · 1.14 KB

README.md

File metadata and controls

33 lines (18 loc) · 1.14 KB

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