Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Convolutional Neural Network Filter Visualization

Project Media

Dxxxxx
Random Picture from VGG16
Dxxxxx
Filter at Block 1 Convolution 1/23
Dxxxxx
Filter at Block 2 Convolution 1/51
Dxxxxx
Filter at Block 2 Convolution 2/40
Dxxxxx
Filter at Block 3 Convolution 3/80
Dxxxxx
Filter at Block 5 Convolution 3/302

Description

Ever wondered what filters created in Convolutional Neural Network layers look like? I have used the popular VGG16 model and visualized various filters from different layers of CNN. I did this by using the gradient ascent optimization algorithm to visualize images that maximally activate specific filters from different layers of the model. I have chosen TensorFlow as my machine learning framework. The first image represents the random picture that is chosen by the algorithm. 2nd, 3rd, 4th, and 5th images are randomly selected filters at a variety of blocks and convolutional layers, and their locations have shown in their title. It is obvious that, as you progress through the convolutional layers and blocks, you see that the images are more detailed and suitable for detailed filtering. At the last block of the VGG16 model, the trained network is already created its filter for the corresponding picture for classification. Furthermore, the loss function of the images increases as the block number increases because of its complex characterization but it is 0 at the block 5 location.

Tools and Languages

python

* Python3

* TensorFlow

* Keras

* Jupyter Notebook or any suitable integrated development environment (IDE)

Installation

  1. Download the Main.py
  2. Open it with any IDE which is suitable for Python Machine Learning.
  3. You can change the iteration number to observe further information about filters and loss functions in the system.
  4. Additionally, you can try other trained CNNs and look at image classification accuracy.

Open to Development

Please share your comments and ideas about the project with me. Thank you for your time.

About

This repository visualizes filters of Convolutional Neural Network - the popular VGG16 model from different layers of the CNN.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages