CNN Visualizer
Interactive Web Dashboard for Neural Network Feature Map & Weight Inspection
// 01. THE PROBLEM
Deep learning models are black boxes. Students and engineers struggle to visualize how convolutional layers extract feature hierarchies.
// 02. SYSTEM ARCHITECTURE & PIPELINE FLOW
Image & Model Ingestion
Accepts image input and loads target CNN model architecture.
Sub-Model Layer Activations
Dynamically builds Keras sub-models to extract feature map activations for target Conv2D layers.
Matrix Normalization & Heatmap Gen
Normalizes raw activation matrices into visual heatmaps.
Streamlit Interactive Grid
Renders feature maps side-by-side with filter weight distributions.
// 03. TECHNICAL APPROACH & DECISION MATRIX
01Dynamic Activation Extraction
Dynamic Keras Sub-Models for Intermediate Layer Outputs
Dynamic extraction enables users to upload custom images and inspect real-time feature transformations across arbitrary neural network architectures.
Pre-Rendered Static Activation Plots
Static plots prevented custom user inputs and arbitrary layer comparisons.
// 04. CORE ARCHITECTURAL LOGIC
Dynamic Keras sub-model construction for feature map activation extraction.
123456789def get_layer_activations(model: tf.keras.Model, layer_name: str, input_image: np.ndarray) -> np.ndarray: # Construct intermediate sub-model dynamically intermediate_layer_model = tf.keras.Model( inputs=model.input, outputs=model.get_layer(layer_name).output ) # Extract feature activation maps activations = intermediate_layer_model.predict(input_image) return activations
// 05. TRADE-OFFS & HONEST REFLECTION
High-resolution feature map rendering consumes RAM on large images; implemented spatial downsampling on feature maps > 512x512.