playtranslate
Real-time screen translation app for Android for both language learners and casual gamers
Draw a digit and watch a convolutional neural network read it, layer by layer, live in your browser.
EducationJavaScript · HTMLGitHub @ehasinOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Visual Digit Recognition – CNN in action. Draw a digit and watch a convolutional neural network read it, layer by layer, live in your browser.
Taken from the repository README
Loading the full README.
Read the full README ↗Draw a digit and watch a convolutional neural network read it, layer by layer, live in your browser.
▶ Live demo: hasin.eu/projects/cnn-digit-recognition-in-action. Works on desktop and phone.
Machine learning is usually explained with formulas or shown as a black box: a picture goes in, an answer comes out. I wanted a way to see how a neural network works and get an intuitive feel for it, without any math.
So this demo hides nothing. Every step the network takes is on screen and updates as you draw:
Draw a clean 8 and watch it light up. Then draw a sloppy 6, or a letter, and see where it goes wrong. Playing with it shows what a convolutional neural network (CNN) learns, and where its limits are, faster than reading about it.
Below the demo, a short explainer for newcomers to machine learning, with a video of a 1 turning into a 4 and then a 9.
The self-driving car demo shows the other side of the story: you train a small network to drive, three different ways. Self-Driving Car – NN in action.
There is no build step and no dependencies, only static files. You need Node.js for the bundled server.
git clone https://github.com/ehasin/Visual-Digit-Recognition-CNN-in-action.git
cd Visual-Digit-Recognition-CNN-in-action
node serve.mjs
Then open http://localhost:5317 (if that port is taken, the server picks the next free one and prints it). Any other static file server works too, for example python -m http.server.
| File | Role |
|---|---|
index.html | Page, styles and the explainer |
app.js | Drawing pad, canvas rendering, hover |
cnn.js | The network's forward pass in plain JavaScript (about 5 ms) |
preprocess.js | Redraws the pen path MNIST-style: thin stroke, fit to 20 × 20, centred by mass |
model/cnn.json | Weights (54 KB) |
tools/convert-cnn.mjs | Converts the original ONNX model to cnn.json by reading the protobuf directly |
assets/ | The explainer video: a wide cut for desktop, a vertical cut for phones |
docs/ | Screenshots for this README |
share.js | The share bar (under the explainer) and the footer's Share, as plain links |
serve.mjs | Tiny local static server |
Network: conv 5×5 (8 filters) → ReLU → max-pool 2 → conv 5×5 (16 filters) → ReLU → max-pool 3 → dense 256 → 10 → softmax. It is 98.9% accurate on the MNIST test set.
MIT, see LICENSE.
Built by Evgeni Hasin.