Skip to content

fenet v1.0.0

Choose a tag to compare

@fMindstormer fMindstormer released this 26 Oct 14:02
· 3 commits to main since this release

The first frozen release of fenet: a digit recognizer that runs inside SVG filters, with no JavaScript. Try it in Chrome, Edge, Brave or Arc.

A first visit: a 7 drawn over the opening example, Clear, a 4, Clear, a 2

Results (test sets, read once with everything fixed)

network 196 → 192 → 96 → 10, 57,322 weights, 8-bit activations, 320 filter primitives
MNIST test, pooled to 14 × 14 96.7 %
MNIST test, one-cell strokes 95.0 %
UCI Pendigits, 14 writers the model never saw 94.8 %
emulated filter vs model same answer for 9,991 of 10,000; the rest are near-ties
Chromium vs model same answer for all 200 digits at each of 8 zoom levels, GPU and software raster

The checkpoint, score scale and opening example were chosen on validation data only. The model and page architecture were settled earlier while test accuracy was visible, so the figures may be slightly optimistic; see the README.

What's new for first visitors

  • Drawing straight over the opening example works: it disappears on the first press. Before, a 7 drawn there was read as 5.
  • Firefox, Safari and engines without :has() see a notice and this recording instead of a pad that would misread.
  • Touchscreens are told to tap cells, since dragging doesn't draw.
  • A step-by-step diagram of one prediction, built from the filter graph's own intermediate images.

Files

fenet.html is the page (it links fenet.gif; keep them together). mlp.npz, alpha.json and sample.json are the weights, score scale and opening example. logs_evaluate.txt and logs_agreement.txt are the frozen test results, and SHA256SUMS lists checksums for everything.

Reproduce

Python 3.13, pip install -r requirements.txt (exact versions), playwright install chromium, and the data:

file sha256
data/mnist.pkl.gz (mnielsen/neural-networks-and-deep-learning) f11bb9e41d6c1b6c124aa38fd605497bdcfe2ee08cf7c2bb5a41ab5d759e1416
data/pendigits/pendigits-orig.tra (UCI dataset 81) a66225d68d7d68591e62944df1ad33b3f5aa608e2df2505844b41f5568a80da4
data/pendigits/pendigits-orig.tes ddb1c19e277a56c7ffe682cc024d6ab73696f9adcc1643ef9ed5aa753007e081

Then follow the README's Rebuild section. On an Apple M4, python train_mlp.py 40 mlp.npz reproduces mlp.npz byte for byte (sha256 5b4e7feb185ad21fba09b0f1db1560b63e5768bd84f5343beb6975a10ca44362).

MNIST by LeCun, Cortes and Burges. Pendigits by Alpaydin and Alimoglu (CC BY 4.0).