Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Guided Backpropagation

Requirements

Implementation Details

Results

Image Image Image Image

Observations

Preparation

  1. Setup directories in file CNN-Visualization/example/guided_backpropagation.py.

    • IM_PATH - directory of testing image data
    • VGG_PATH - directory of pre-trained VGG19 parameters
    • SAVE_DIR - directory of saving result images
  2. Download the pre-trained VGG parameters

    • Download pre-trained VGG19 model here and put it in VGG_PATH.
  3. Testing images

    • Put testing images in IM_PATH .

    • Change image type to the corresponding type if testing images are not jpeg files

      input_im = ImageFromFile('.jpg', data_dir=IM_PATH, num_channel=3, shuffle=False)
      

Run Script:

To get the guided backpropagation maps for all the image in IM_PATH, go to CNN-Visualization/example/ and run:

python guided_backpropagation.py
  • Results will be saved in SAVE_DIR as map_IDX_class_PREDICT_LABEL.png.

Author

Qian Ge