Skip to content

Display filters or features map of Convolutional Neural Networks (CNN) models of Keras in a HTML page.

Notifications You must be signed in to change notification settings

paulojamorim/cnn_visualize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CNN Visualize

Display filters or features map of Convolutional Neural Networks (CNN) models of Keras in a HTML page.

To run (VGG16 model)

Because of the amount of images normally generated it is recommended to view in Firefox.

Run examples:

Visualize features

 python cnn_visualize.py -t 1 -i ./bird.jpg

Features

Visualize filters

python cnn_visualize.py -t 2 -l 2

Filters

Arguments:

  -h, --help            show this help message and exit
  -o OUT_DIR, --output OUT_DIR
                        A folder path to output html page
  -t OUT_TYPE, --type OUT_TYPE
                        1 - Output features (default) 2 - Output filters
  -i IMG_PATH, --img IMG_PATH
                        Image input to generate CNN features
  -l FILTER_NUMBER, --layer FILTER_NUMBER
                        Filter number to save (default 1)

Changing to your model:

Change to your Keras model:

179:  model = VGG16()

Change target_size to your input size:

225:  img = load_img(img_path, target_size=(224, 224))

About

Display filters or features map of Convolutional Neural Networks (CNN) models of Keras in a HTML page.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages