Schlagwort: CNN Visualizer


[Project] Introducing the Convolutional Neural Network Visualizer

Last semester I attended the combined lecture/excercice „Visualization 2“ at my university, where we were assigned to implement a visualization based on one of various suggested papers, but we also had the possibility to implement an own idea if we preferred that.

The CNN Visualizer is something I’d had in my mind for some time already, but never had a reason to actually sit down and implement it, but for this lecture it was perfect. I wanted to create a 3d visualization of a Convolutional Neural Network showing all of the connections between layers of these models, to give a person new to this field a good visual overview of the interdependency. The implementation has been done in the game engine Unity.

When submitting the project for University the functionality included visual representations for convolutional, max-pool and fully connected layers with various reduction mechanisms to hide connections in favour of a clearer visualization. Also I ‚d built a python script that trains a CNN in tensorflow and exports a json file which then can be read by the CNN visualizer automatically reconstructing the network and assigning colours to the neurons and connections according to the weights and activations. A More detailed description can be found here:

As this project got a very positive response (won the „best project“ award of the lecture, also got some attention on Reddit),  I decided to continue with the development of the CNN visualizer to implement a few more feautres and get it into a state where it can be open sourced, also Prof. Gröller, the head of TU Viennas visualization department suggested to write a small publication about it, which I happily agreed to do.

Unfortunately, when I’d implemented the visualizer initially, I only had new features in mind that had to be working for the submission deadline, not thinking about good code design and maintainability / changeability. I did a major refactoring over the course of a few weeks from July to August 2018, and now got it in a state where the code is much cleaner and the old functionality is almost recreated.

I took this opportunity to force myself to learn about good code design, which was a skill that I’d somehow forgotten / never really gotten used to. I found the book „Working Effectively with Legacy Code“  byRobert C. Martin to be very helpful in this.

I will regularly post updated about this project as it is currently high priority ongoing work, hopefully being able to showcase many new features soon.