←Back to Works / Projects
AI & ML
LIVE SYSTEM
AI & ML

CNN Visualizer

Interactive Web Dashboard for Neural Network Feature Map & Weight Inspection

Stack:PythonTensorFlowKerasStreamlit
YOUR ROLE & SCOPECreator & ML Engineer
TIMELINE3 Weeks
CORE CONSTRAINTSZero-latency visual rendering during layer-by-layer feature map inspection
DEPLOYMENTPython + Streamlit + TensorFlow
error_outline

// 01. THE PROBLEM

Deep learning models are black boxes. Students and engineers struggle to visualize how convolutional layers extract feature hierarchies.

account_tree

// 02. SYSTEM ARCHITECTURE & PIPELINE FLOW

STAGE 01UPLOAD

Image & Model Ingestion

Accepts image input and loads target CNN model architecture.

STAGE 02EXTRACT

Sub-Model Layer Activations

Dynamically builds Keras sub-models to extract feature map activations for target Conv2D layers.

STAGE 03PROCESS

Matrix Normalization & Heatmap Gen

Normalizes raw activation matrices into visual heatmaps.

STAGE 04DISPLAY

Streamlit Interactive Grid

Renders feature maps side-by-side with filter weight distributions.

balance

// 03. TECHNICAL APPROACH & DECISION MATRIX

01Dynamic Activation Extraction

✓ DECISION CHOSEN

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.

✕ REJECTED ALTERNATIVE

Pre-Rendered Static Activation Plots

Static plots prevented custom user inputs and arbitrary layer comparisons.

terminal

// 04. CORE ARCHITECTURAL LOGIC

Dynamic Keras sub-model construction for feature map activation extraction.

visualizer/core.py
123456789
def 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
task_alt

// 05. TRADE-OFFS & HONEST REFLECTION

High-resolution feature map rendering consumes RAM on large images; implemented spatial downsampling on feature maps > 512x512.

query_stats

// 06. CONCRETE OUTCOMES & VERIFIED METRICS

Real-Time
Feature Map Extraction
Dynamic Keras sub-model evaluation
Streamlit
Interactive Dashboard
Layer-by-layer visual inspection
TensorFlow
ML Framework
Conv2D filter weight visualization