CNN Visualizer for Digit Recognition

Processing Step
Select a digit sample and click 'Process' to see how a CNN processes the image.
Select a Digit Sample
Click on a digit to select it for processing through the CNN.
Prediction Results
The model predicts the digit based on the features extracted through the CNN layers.
0:
0.00%
1:
0.00%
2:
0.00%
3:
0.00%
4:
0.00%
5:
0.00%
6:
0.00%
7:
0.00%
8:
0.00%
9:
0.00%
CNN Layers Visualization

Input Layer (28x28)

The input is a 28x28 grayscale image with pixel values between 0 and 1.

Conv Layer 1 (26x26)

First convolutional layer applies a 3x3 vertical edge detection filter.

Pool Layer 1 (13x13)

Max pooling with 2x2 filter reduces dimensions while preserving important features.

Conv Layer 2 (11x11)

Second convolutional layer applies a 3x3 horizontal edge detection filter.

Pool Layer 2 (5x5)

Second max pooling layer further reduces dimensions to 5x5.

Flattened Layer (25 neurons)

The 5x5 feature map is flattened into a 1D vector with 25 values.

Fully Connected Layer (84 neurons)

84 fully connected neurons learn complex patterns from the flattened features.

How CNNs Work for Digit Recognition

Convolutional Neural Networks (CNNs) are specialized neural networks designed for processing grid-like data such as images. They are particularly effective for tasks like digit recognition.

Key Components:

  • Convolutional Layers: Apply filters to detect features like edges, textures, and shapes.
  • Pooling Layers: Reduce spatial dimensions while preserving important features.
  • Fully Connected Layers: Combine features to make final classifications.

Processing Pipeline:

  1. Input image is processed through convolutional filters to detect basic features.
  2. Pooling layers reduce dimensionality and provide translation invariance.
  3. Additional convolutional layers detect more complex patterns.
  4. The feature maps are flattened into a vector.
  5. Fully connected layers combine these features for final classification.
  6. Output layer produces probabilities for each possible digit (0-9).

This visualizer demonstrates a simplified version of the LeNet-5 architecture, one of the earliest CNN models designed specifically for digit recognition.