Skip to content

chaitanyacsss/visualize_vgg16

Repository files navigation

Visualizing VGG-16

Visualizing the weights and feature/activation maps of a pretrained VGG-16

Dependencies

refer requirements.txt

Implementation

  1. For visualizing weights, I started with this [1].
  • The layerwise weights are visualized here. Weights at first Convolution layer look like this

Layer 1 Weights

  • The numpy arrays were also saved and plotted as stacks of histograms. The three channels at the first layer produce the following histogram.

Each Channel is Stacked

  1. For Visualizing activations/features, I used the guided backprop method [2].
  • The feature map at layer 1 and filter 0 on an example image looks

Guided backprop at layer 1 and filter 0

  • Here the histograms produced were layerwise, to compare how a filter is activated across different layers.

Guided backprop histogram at filter 0

  1. Also tried deep dream on an image, which looks very interesting!

Deep Dream

References

[1] https://github.com/pedrodiamel/nettutorial/blob/master/pytorch/pytorch_visualization.ipynb

[2] https://github.com/utkuozbulak/pytorch-cnn-visualizations#convolutional-neural-network-filter-visualization

About

Visualizing weights and feature maps of VGG-16

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages