Skip to content
madscience

Model · Abacus camera reader ·

abacus-column-reader

A 332 k-parameter, 1.3 MB network that reads one column of an Abacus Studio abacus from a 64 × 128 grey picture, and refuses when the picture is not a readable column.

Pinned at

Hugging Face
thomashallock/abacus-column-reader at 1e28a8e
Licence
Apache-2.0
Runtime
TensorFlow.js
Task
One column's digit (0 to 9), with refusal

Contract

Input
(N, 128, 64, 1) float32, grey divided by 255. A 72 × 384 px window centred on the column's slot.
Output
heaven (N, 1) and earth (N, 5). Digit = 5 × [heaven ≥ 0.5] + argmax(earth). Confidence = √(|heaven − 0.5| × 2 × max(earth)); the app accepts a frame only when every column reaches 0.5.

Real data

Trained on real data
No
Selected on real data
Yes
Measured on real data
Yes

No real picture was a training example for any weight. Real pictures did touch the model in three ways. They measured it, and every earlier reader in its line. They chose between drawn-only candidates: the first training run, the renderer, a separate gate head over an "unsure" target, and the share of one kind of drawing. And one constant of the renderer, the cut inset, was measured on the real abacus. Only counts are published.

Base model

None

Findings measured on it

StandingClaimNumberSetDate
HoldsIn the browser the reader gives the same digit as the Python it was trained in. 733 of 733Selection renders, 733 columnsStudio renders, choice set381 pictures with an abacus and 419 without. Chose every setting: the finder's threshold and weight format, the counter's read-out rule, the reader's cut window and its gate.Selection
HoldsTeaching the gate to refuse covered columns cut the wrong numbers shown by three quarters. 60 of 2,424, against 249Selection renders, 2,424Studio renders, unseen slice of the training drawingsTraining drawings 12,000 to 14,999 in the working range, kept out of the reader's training. The second gate was built after covered columns were seen failing here.Selection
HoldsThe column reader reads a clear column right, on abaci from 3 to 21 columns wide. 98.5 %Held-back renders, 1,572 columnsStudio renders, held-back test400 pictures drawn like the training set (382 with an abacus) and 600 with no abacus. Never read by anything until it was scored once.Held-back
HoldsThe reader, trained only on drawings, reads real columns it never saw. 98.96 %Real, counts only, 2,778Real columns, counts onlyOne printed four-column abacus in one room, 35 sittings of practice in January 2026, cut the older way. Never shown. Earlier in the reader's line these scores chose the training run, the renderer and the separate gate head.Real, counts only, chose something · Real pictures are never shown
HoldsA picture of a whole desk, handed to the reader as if it were a column, is never accepted. 0.0 %Real, counts only, 1,559Real whole-desk frames, counts onlyEvery fourth of 6,235 real phone frames of a whole desk, handed over as if the frame were the abacus. Never shown. Scores of this kind chose the separate gate head.Real, counts only, chose something · Real pictures are never shown
HoldsAbout one column in a hundred that the reader accepts is wrong. 15 of 1,538 (0.98 %)Held-back renders, 1,538 columnsStudio renders, held-back test400 pictures drawn like the training set (382 with an abacus) and 600 with no abacus. Never read by anything until it was scored once.Held-back
HoldsRetraining the reader on slot cuts of every width raised whole numbers read right from two in three to more than nine in ten. 1,210 of 1,298, against 873Selection renders, 1,298Studio renders, unseen slice of the training drawingsTraining drawings 12,000 to 14,999 in the working range, kept out of the reader's training. The second gate was built after covered columns were seen failing here.Selection
Target not metWith the finder's corners and the counter's slots, the whole chain gets the whole number right on clear pictures. 156 of 171 (91.2 %), target at least 99 %Held-back renders, 171Studio renders, held-back test400 pictures drawn like the training set (382 with an abacus) and 600 with no abacus. Never read by anything until it was scored once.Held-back
Target not metOn clear pictures, the reader gets the whole number right. 155 of 171 (90.6 %), target at least 99 %Held-back renders, 171Studio renders, held-back test400 pictures drawn like the training set (382 with an abacus) and 600 with no abacus. Never read by anything until it was scored once.Held-back

Files

FileSizesha256
.gitattributes1.5 KB16a304e43059
LICENSE11 KBcfc7749b96f6
README.md12 KBa0d65e6cb1dd
group1-shard1of1.bin1.3 MB0218f6cde68a
keras/column-reader-gateB.keras1.4 MBcc6f4a3a07be
keras/recipe.json429 Bb80971ea3e34
model.json25 KB798de4d5af92

Labs that use it

  • Abacus reader

    Three small networks find a drawn abacus, count its columns and read each one, in your browser, and refuse a column they cannot see.

  • Sandbox check

    A lab that tries to send something out of your browser in seven ways, and shows your browser refusing each one.

Publications

The last stage, and the one that turns a phone pointed at an abacus into a number. A separate small head answers "is this a readable column at all?" and is folded into the two outputs, so a column covered by a hand comes out with confidence near zero and the app refuses it, with no change to the app.

No pretrained weights appear anywhere in its line: its starting weights are an earlier reader of the same line, also trained only on drawings.

Loading deployment info...