c8241998 / keras-CAM-ResNet

Keras implementation of class activation mapping(CAM) based on ResNet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Keras implementation of class activation mapping(CAM) based on ResNet

This project implements class activation maps with Keras, and the backbone is ResNet.

Quickstart

To fine-tune your model, you should define your dataset first, and then:

python train.py

To have a visulisation of the heatmap of cam, you just need to:

python visulization.py

Tips

  • To run this code, please define your own dataset, and feel free to get a fine-tune.
  • If you want to use other models instead, please change the model in function of get_model. You can choose your backbone in tf.keras.applications. However, do not forget to change the code of dropping dense layer (the position of the last conv layer is different) and the input image size.

About

Keras implementation of class activation mapping(CAM) based on ResNet


Languages

Language:Python 100.0%