This project implements class activation maps with Keras, and the backbone is ResNet.
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
- 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 intf.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.