Machine Learning

Digit Recognition

Draw a digit on a canvas and a convolutional neural network trained on MNIST classifies it live in your browser using TensorFlow.js.

Digit Recognition

A hands-on demo of client-side ML inference. Draw any digit from 0 to 9 on the canvas with your mouse or finger, and a small convolutional neural network — trained in Python with Keras on the MNIST dataset, then converted to TensorFlow.js — predicts what you drew, along with a confidence score.

The whole pipeline runs on your device. The model weights (a few hundred kilobytes) load once, then every prediction happens locally with no network round-trip. It’s fast enough to feel instant.

Built as an exploration of the full training-to-web deployment loop for ML models: train offline with a heavyweight Python stack, convert to a portable format, and serve inference from any static site.