tristanfaure.com /projects / mnist-cnn

MNIST Classifier

99.69% accuracy handwritten digit recognition

2025 · ACADEMIC

Stack

Python · PyTorch · TensorBoard · MPS · CUDA

Key figures

Peak Accuracy
99.69%
Final Accuracy
99.48%
Training
30 epochs
Custom Input
Supported

A high-precision convolutional neural network for handwritten digit recognition on the MNIST dataset, achieving a peak accuracy of 99.69%.

The project offers multiple architecture variants — from a simple 2-layer CNN to a more complex 4-layer network — allowing comparison of capacity vs performance tradeoffs.

Training pipeline includes batch normalization, dropout regularization, data augmentation (rotation, affine transforms), and gradient clipping for stable convergence. The AdamW optimizer is paired with a StepLR scheduler across 30 epochs with early stopping.

One standout feature: the model can classify custom user images, including photographs of hand-drawn digits taken with a phone camera. The input pipeline handles preprocessing, resizing, and normalization automatically.

Full TensorBoard integration provides real-time metric monitoring. Supports Apple Silicon Macs via MPS backend alongside standard CPU and CUDA environments.

Links

All 33 projects · Open the interactive portfolio · About Tristan