Skip to content
madscience

Model · Abacus camera reader ·

abacus-frame-finder

Two small networks that find a 3D-printed Abacus Studio abacus in a phone picture and return the four corners of its frame in order, heaven side on top, with the probability that an abacus is there at all.

Pinned at

Hugging Face
thomashallock/abacus-frame-finder at 9811121
Licence
Apache-2.0
Runtime
TensorFlow.js
Task
Four ordered frame corners and a presence score

Contract

Input
A 720 × 1280 frame shrunk to 180 × 320 and centred on a 192 × 320 canvas, 0 to 255. The app feeds the channels in BGR order, and the lab reads a coloured drawing digit for digit that way; the published card says RGB.
Output
Four 80 × 48 corner heat-maps and one "abacus here" logit. A second network refines each corner from a 64 × 64 close-up, twice.

Real data

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

None of our real pictures trained this model, chose its threshold or scored it. Its first network's backbone starts from public ImageNet weights, which were learned from photographs; all training after that was on drawings. The one real-world check was the author's own trial on his own printed abaci, which decided whether it went into the app.

Base model

MobileNetV2 (width 0.5), the ImageNet weights shipped by Keras Applications, licence Apache-2.0, as stated by the Keras 2.2.4 documentation that shipped the weights

Findings measured on it

StandingClaimNumberSetDate
HoldsGiven the finder's corners, the column counter is never wrong and sure about a fully visible abacus. 0 of 211Held-back renders, 211Studio 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
HoldsGiven the finder's corners, the counter gives the right number of columns for a fully visible abacus of 3 to 21 columns. 208 of 211 (98.6 %)Held-back renders, 211Studio 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 counter places each column's slot to within a fraction of a millimetre. 0.15 mmHeld-back renders, 1,961 slotsStudio 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
HoldsWhen a hand or an object hides a corner of the abacus, the finder places the frame well about a third of the time. 40 of 114 (35.1 %)Held-back renders, 114Studio 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 frame finder places all four corners of a fully visible abacus within 3 % of its width. 208 of 211 (98.6 %), target at least 97 %Held-back renders, 211Studio 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 finder knows which side of the abacus is the heaven side, however the abacus is turned in the picture. 319 of 325 (98.2 %)Held-back renders, 325Studio 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
HoldsA picture with no abacus in it is reported as no abacus. 599 of 618 (96.9 %)Held-back renders, 618Studio 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 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

Files

FileSizesha256
.gitattributes1.6 KBc65fc9ea3ef4
LICENSE11 KBcfc7749b96f6
README.md12 KB5591b85bdebb
find-model.json136 KBd6f3ce17f784
find.bin5.6 MB832f10c688a1
finder.json319 B4c735a462791
keras/find-s2a.keras18 MB6e84de1e2f7f
keras/find-s2a.threshold.json157 B94af023e3b85
keras/refine-s2a.keras11 MBf886bccca63d
refine-model.json29 KBa4c1eced2806
refine.bin3.5 MBfa6991029a8e

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.

Publications

The first stage of the chain. Each corner has its own heat-map, so the order of the corners, and with it which side is the heaven side, comes from the network and the caller needs no notion of "up".

Only the first network's backbone starts from outside weights; every weight was then trained on drawings. Whether ImageNet's own terms reach weights trained on it is an open question that the model card notes and does not settle.

Loading deployment info...