Grad-CAM pytorch implementation of original paper.
Open config.py, and edit the lines below to your data directory.
name = [:The name of your dataset that you trained on module 3 (classifier)]
data_base = [:dir to your original dataset]
aug_base = [:dir to your actually trained dataset]
For training, your data file system should be in the following hierarchy. Organizing codes for your data into the given requirements will be provided in the preprocessor module
[:data file name]
|-train
|-[:class 0]
|-[:class 1]
|-[:class 2]
...
|-[:class n]
|-val
|-[:class 0]
|-[:class 1]
|-[:class 2]
...
|-[:class n]
After you have cloned the repository, you can train the dataset by running the script below.
You can set the dimension of the additional layer in config.py
# grad-cam exploits
python launch_model --net_type [:net_type] --depth [:depth]
# For example, for the resnet-50 model I've trained, type
python launch_model --net_type resnet --depth 50
Before testing out the networks, make sure that you have a trained weight obtained in the checkpoint file of the classifier module
Supporting networks
- AlexNet [:TODO]
- VGGNet [:TODO]
- ResNet
- Original Image
- Grad-CAM Image