Code Monkey home page Code Monkey logo

chainer-visualization's Introduction

CNN Activation Visualization

An implementation in Chainer of the neural network visualization by Zeiler and Fergus, Visualizing and Understanding Convolutional Networks, 2013.

Run

Preparing a Trained Model

Download a pretrained VGG Chainer model following the README in this repository.

Visualizing the Activations

Run the visualization script as follows. The VGG model will be feeded with an image and the activations in each of the five convolutional layer will be projected back to the input space, i.e. the space of the original image of size (3, 224, 224). The projections will be stored in the specified output directory.

python visualize.py --image-filename images/cat.jpg --model-filename VGG.model --out-dirname results --gpu 0

Notes

You can visualize the activations for an image of arbitrary size since the image will be scaled to the size expected by the classifier automatically.

Samples

Activations visualized from the convolutional layers of VGG using an image of a cat.

1st Layer of Convolutions

2nd Layer of Convolutions

3rd Layer of Convolutions

4th Layer of Convolutions

5th Layer of Convolutions

chainer-visualization's People

Contributors

hvy avatar johshisha avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.