Skip to content

lemoni77i/keras_inceptionv3_visualization

Repository files navigation

Keras InceptionV3 모델 시각화

Visualize filters and saliencies of convolutional layer in Keras InceptionV3 model.
Using lucid, visualize an image that activates target filter. (feature visualization)
Using Keras-vis, visualize an image which shows where that filter looks in input image (saliency).

Dependencies

  • tensorflow
  • keras
  • keras-vis
  • lucid
  • matplotlib
  • numpy

How to Use

example

$python visualize.py
-modelzoo_file="keras_inception_v3_frozen.pb.modelzoo"
-conv_layer_idx=6
-filter_idx=15
-num_of_filters=1
-input_image_path="image/welshcorgi.jpg"

Output

feature_visualization output (conv2d_6 15th filter)
conv2d_6 15th filter

saliency_visualization output (conv2d_6 15th filter saliency)
conv2d_6 15th filter saliency

option 별 설명

-modelzoo_file: A .modelzoo file which is outcome of freeze_graph.py (lucid model import

-conv_layer_idx: Index of convolutional layer in Keras Inceptionv3 which you want to visualize. Range 1~94

-filter_idx: Index of filter in the convolutional layer which you want to visualize. (Optional)

-num_of_filters: The number of filters you want to visualize at the layer. The 'num_of_fileters' of filters that most activates the layer will visualized. If you want to visualize specific filter, then this should be 1.

-input_image_path: A Path of image you want to visualize the saliency.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages