Interactive Processing sketch that visualizes a small CNN: four conv layers followed by two MLP layers, fed by a 32×32 drawing canvas. Weights/biases are pre-exported from training and loaded at startup; the sketch animates feature maps, filter movements, reshaping, and final class logits with a PeasyCam-controlled 3D view.
- Processing 4.x
- PeasyCam library (install via Processing Contributions Manager)
- Open
processing_viz.pdein Processing. - Ensure
data/is alongside the sketch (already included). - Run the sketch.
- Draw a digit in the bottom-right canvas; the network forwards through convs → flatten → MLP → softmax and highlights the predicted class box.
processing_viz.pde– main sketch orchestrating inference + visualization.Conv2D.pde,MLP.pde,TensorVisualizer.pde,ConvVisualizer.pde,ReshapeVisualizer.pde,Box.pde,utils.pde– layer math and rendering helpers.data/*.txt– serialized weights/biases and test tensors.preview.png– static preview of the UI layout.
- Camera roll is suppressed for easier navigation; mouse over the draw canvas temporarily disables camera controls to avoid conflict with drawing.
- You can regenerate weights and replace
data/*.txtif you retrain; keep shapes consistent.
