Skip to content
madscience
Contents

ReportAbacus camera readerThomas Hallock

Reading a 3D-printed abacus from a phone with models trained on drawings

Three small models find a 3D-printed abacus in a phone picture, count its columns and read each column, all in the phone's browser. No photograph was a training example for any of them: every training picture is a render drawn from the abacus's own design files. One network starts from public ImageNet weights, which were learned from photographs, and is then fine-tuned on drawings. On renders held back until they were scored once, the finder places the frame within 3 % of its width on 208 of 211 pictures with the whole abacus in view, the counter gives the right count on 208 of those 211 and a wrong one on none, and the reader reads 98.5 % of 1,572 clear columns right. Whole numbers come out right on 155 of 171 clear pictures (90.6 %), short of the 99 % target, and with a corner of the abacus hidden the finder succeeds on only 40 of 114. On 2,778 real column pictures, which are never shown, the reader is right on 98.96 %; those pictures also chose between candidates earlier in its line, so that score is somewhat optimistic.

Provenance
Repo
abaci-one @ 518233f
abacus-frame-finder
9811121
abacus-column-counter
ca9b53c
abacus-column-reader
1e28a8e

The app's browser pipeline, the first drawn-only training recipe and the technical report this one draws on are at this commit. The three models are pinned by their Hugging Face revisions. The renderer and trainers for the Studio sets are not yet released.

Findings in this report

21 findings.Holds15Target not met2Superseded1Negative3

  1. 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, 211
  2. 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, 211
  3. HoldsGiven the finder's corners, the column counter is never wrong and sure about a fully visible abacus. 0 of 211Held-back renders, 211
  4. HoldsThe counter places each column's slot to within a fraction of a millimetre. 0.15 mmHeld-back renders, 1,961 slots
  5. HoldsThe column reader reads a clear column right, on abaci from 3 to 21 columns wide. 98.5 %Held-back renders, 1,572 columns
  6. HoldsAbout one column in a hundred that the reader accepts is wrong. 15 of 1,538 (0.98 %)Held-back renders, 1,538 columns
  7. Target not metOn clear pictures, the reader gets the whole number right. 155 of 171 (90.6 %), target at least 99 %Held-back renders, 171
  8. 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, 171
Show the other 13 findingsHide the other 139 Holds · 1 Superseded · 3 Negative
  1. 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, 114
  2. 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, 325
  3. HoldsA picture with no abacus in it is reported as no abacus. 599 of 618 (96.9 %)Held-back renders, 618
  4. HoldsThe reader, trained only on drawings, reads real columns it never saw. 98.96 %Real, counts only, 2,778
  5. 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,559
  6. SupersededA reader trained on 5,808 drawn columns reads real columns it never saw. 98.5 %Real, counts only, 2,778
  7. HoldsCutting each column on its own slot, not in equal strips, reads more columns right. 95.0 %Selection renders, 181
  8. 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 (93.22 %)Selection renders, 1,298
  9. HoldsTeaching the gate to refuse covered columns cut the wrong numbers shown by three quarters. 60 of 2,424 (2.48 %)Selection renders, 2,424
  10. HoldsIn the browser the reader gives the same digit as the Python it was trained in. 733 of 733Selection renders, 733 columns
  11. NegativeCounting the columns from the slot pattern alone, without a network, is not good enough. 184 of 210 (87.6 %)Selection renders, 210
  12. NegativeTeaching the reader itself to answer "unsure" on pictures that are not columns cost it digits. 92.6 to 94.9 %Real, counts only, 2,778
  13. NegativeA sharper, more varied renderer did not make a better reader. 97.1 to 97.4 %Real, counts only, 2,778

1. The task

A child sets a number on a 3D-printed abacus, and a phone on a stand looks down at the desk. The app has to say which number it sees, quickly, on the phone itself, and it has to say nothing when it is not sure. A wrong number shown is worse than no number, so every score below keeps three outcomes apart: a number is right, or wrong and shown, or withheld.

The abacus is the one Abacus Studio prints, from 3 to 21 columns wide. Each column has one heaven bead above the bar, worth five, and four earth beads below it, worth one each. Its shape is a design file, so its measurements are known exactly. Take the four points that sit 7 mm in from the frame's outer edges at its corners, where the Studio's optional printed markers go. For an abacus with nn columns, the rectangle through them is

W(n)=22.5+13 (n−1) mm wide and D=86.5 mm deep,W(n) = 22.5 + 13\,(n - 1)\ \text{mm wide and}\ D = 86.5\ \text{mm deep,}

and column kk, counting from 0, is centred on a line 11.25+13k11.25 + 13k mm from the rectangle's left edge. That line, with the strip of beads along it, is the column's slot. Everything downstream rests on this rectangle: find its four corners in the picture, and the rest is geometry and reading.

The work splits into three questions, each answered by its own small network:

  1. Where is the frame? Four corners in order, heaven side on top, or "no abacus here".
  2. How many columns? A count from 3 to 21 and the place of each column's slot, or "not sure".
  3. What does each column say? A digit from 0 to 9, or "not a readable column".

The target the chain was built to is at least 99 % of whole numbers right, with at most 1 wrong number shown in 300, at 3, 4, 9 and 10 columns, the widths people have actually printed. It is not met, and section 4 says by how much.

This report describes the three models as they were published on 3 December 2026, and gives their first scores on pictures that nothing had read before.

2. Drawings instead of photographs

The real pictures we hold were taken while children practised. They show desks and hands, and they cannot be published. A model trained on them could not be checked by anyone else, and a result measured on them could not be shown. The abacus, though, is a design file. So every training picture is drawn from it.

What is drawn. Blender renders the abacus from parts exported from the same OpenSCAD design the Studio prints, at every width from 3 to 21 columns; 60 % of the pictures are at 3, 4, 9 or 10 columns. A third have printed markers, a third are plain, and a third are decorated with text or stickers. Each column gets a random digit, and its beads sit anywhere along their travel as long as the digit stays unambiguous. The abacus lies on one of 15 kinds of desk, among clutter. In 30 % of pictures a pen, a ruler, a card or a cable lies over it, and in 30 % there is a hand. The camera is a simulated phone on a stand, 720 × 1280. In 85 % of pictures it is in the working range: tilted up to 45° from straight down, the whole abacus inside the picture, its long side at least a third of the picture's width. The abacus is turned any way round. Every picture carries exact labels from the render: the corners and which of them are hidden, the count, each slot and how much of it is covered, and the digits.

The sets. A number means little without the set it was measured on, so each one below names its set.

SetSizeWhat it did
Training17,992 pictures, about four in five with an abacusThe pool the models trained from, each on its own cut: the finder on all of it and 60 pilot pictures, the counter on the 13,577 pictures with all four corners inside the picture, the reader on slot cuts from pictures 0 to 11,999 beside drawn columns from earlier work. Pictures 12,000 to 14,999 were kept out of the reader's training; the 2,424 of them in the working range are the unseen slice, which then chose between designs.
Choice381 pictures with an abacus, 419 withoutChose every setting: the thresholds, the counter's read-out rule, the cut window, the gate. A selection set.
Held-back test382 pictures with an abacus, 618 withoutRead once, on 3 December 2026, after everything was fixed. It chose nothing.
Real columns2,778 column picturesReal pictures, never shown. Counts only.
Real whole-desk frames1,559 framesReal pictures, never shown. Counts only.

In the held-back set, 325 pictures show an abacus in the working range. Of those, 211 have all four corners in view, called full view below, and 171 have no column covered by a hand, a pen or a card, called clear. The two are separate properties: one is about the corners, the other about the columns.

What "trained on drawings" covers. Three statements, from the strongest to the weakest:

  • No photograph is a training example for any of the networks.
  • One network starts from public weights that were learned from photographs. The finder's first stage starts from the ImageNet weights of MobileNetV2 (width 0.5) that ship with Keras, and is then fully fine-tuned on drawings. The finder's second stage, the counter and the reader start from nothing outside this project.
  • Real pictures chose between drawn-only candidates for the reader. Its first training run was picked from several by its score on the real columns. So were the renderer, the separate gate head, and the share of one kind of drawing in its training data. One constant of the renderer, the inset of the cut, was measured on the real abacus. No real picture chose a setting for the finder or the counter, and none gave them a score. What decided whether each went into the app was the author trying it by hand on his own prints, with a docked phone.

So the reader's real-picture scores in section 4 are somewhat optimistic for new pictures, and they are marked as such.

3. Three models

A drawn 10-column abacus lying at an angle on a wooden desk, seen from a phone above, with the frame the finder found outlined in blue. At the lower left edge lies a pink object with a grid of dark squares, which is not outlined
Holds208 of 211(98.6 %) · held-back renders, 211 · target at least 97 %, metThe frame finder places all four corners of a fully visible abacus within 3 % of its width.
Figure 1. A choice-set drawing of a 10-column abacus, as the phone sees it, with the frame the finder found. The pink grid at the lower left is drawn clutter, and the finder leaves it alone. Every picture in this report is a render.

The frame finder

The finder is two networks. The first looks at the whole frame, shrunk to 180 × 320 and centred on a 192 × 320 canvas, and gives four heat-maps, one for each named corner (top-left, top-right, bottom-right and bottom-left, as the abacus is held with the heaven side up), and one "an abacus is here" score. Because each corner has its own map, the network itself learns which side is heaven, and the caller needs no notion of "up". The second network looks at a 64 × 64 close-up of each corner and moves it; it runs twice.

The first network has 1.49 M parameters, a MobileNetV2 backbone with a U-Net decoder, and the second has 0.91 M. Together they are 9.5 MB as TensorFlow.js, and they take a median 86 ms a frame on the author's phone.

An abacus is "here" when the score passes a threshold. The threshold was set on the choice set, to the largest value that refuses at most 0.5 % of abacus pictures in the working range.

The column counter

The obvious way to count columns needs no network: straighten the frame, and for each count from 3 to 21 measure how strongly its slot pattern shows across it. On the choice set's full-view pictures, starting from exact corners (the true ones, known from the render), that was right on Negative: 184 of 210 (87.6 %), on Studio renders, choice set, 210 of 800 pictures. It confuses nn columns with about 2n+12n + 1, whose slots fall halfway between nn's. Knowing the abacus's true shape fixes that from exact corners but not from found ones: neighbouring counts differ by about 10 % in width, and the shape recovered from the finder's corners is looser than that.

So a network counts. The frame is straightened onto a 96 × 384 canvas with a margin all round, so that the frame's outer edges show even when the corners are a few millimetres off. A network of 2.95 M parameters (11.8 MB) gives two things: a heat-map along the width with a peak at each slot, and a count from 3 to 21 or "can't count". The two must agree. A count is given only when its probability is at least 0.95 and the heat-map has exactly that many peaks of at least 0.5. Otherwise the counter says "not sure", and the app falls back to the width in the user's settings. On the phone, two runs must agree before a count is taken. The rule was chosen on the choice set.

In training, the true corners are shaken the way the finder's are measured to be off: by a standard deviation of 0.1 to 0.8 mm in 60 % of samples, and up to 7 mm in the worst 10 %. The counter learns on the kind of corners it will be given.

The straightened picture of the same 10-column abacus with ten yellow vertical lines, one on each column, and below it a curve with ten sharp peaks
Figure 2. The counter's view of the same drawing: the straightened frame, a line at each heat-map peak, and the heat-map below. Ten peaks, and the count head says 10.

The slot cut

With the corners and the count, each column is cut by geometry alone. The frame is straightened at the abacus's true shape for that count, at a fixed scale of about 4.9 pixels per millimetre across and 4.6 down. A window of 72 × 384 pixels (14.76 × 83.04 mm) is cut centred on each slot, turned grey and shrunk to 64 × 128.

A drawn 4-column abacus, straightened, with the reference rectangle in blue, a yellow line down the centre of each column, and a green window around each column
Figure 3. The cut at 4 columns. Blue: the reference rectangle. Yellow: the slot centres, 11.25 mm from the edge and then 13 mm apart. Green: the window on each slot. Neighbouring windows overlap, because 14.76 mm is wider than the 13 mm between slots.

The pipeline this replaced split the frame into equal strips. That puts the outer windows about 2.5 mm off their slots, because the end slots sit 11.25 mm from the edges while the slots are 13 mm apart. Centring alone reads more columns right. At 4 columns, where both cuts use a window of the same size, the reader the app used before read 95.0 %, on Studio renders, unseen slice of the training drawings, 181 of 2,424 pictures of columns right on slot cuts against 92.5 %, on Studio renders, unseen slice of the training drawings, 181 of 2,424 pictures on equal strips, on the unseen slice's clear pictures.

The straightened 10-column abacus with a green box around each column and the digits 8 1 3 2 3 4 9 3 9 6 below
Figure 4. One window per slot, and the digit read from each: 8132349396, which is right.
Ten small grey pictures of single abacus columns in a row, each with its digit below
Figure 5. What the reader is given: one small grey picture per column.

The column reader and its gate

A convolutional network of 200 k parameters reads each 64 × 128 column picture with two heads: the probability hh that the heaven bead is set, and a distribution e0,…,e4e_0, \dots, e_4 over how many earth beads are set. The digit is 5 if h≥0.5h \ge 0.5, plus the most likely number of earth beads. The column's confidence is

c= 2 ∣h−0.5∣⋅max⁡iei .c = \sqrt{\,2\,|h - 0.5| \cdot \max_i e_i\,}.

The app uses a frame only when every column's confidence is at least 0.5, and takes a number only when three frames in a row agree.

A second small head, the gate, sits on the reader's frozen features and answers one question: is this a readable abacus column at all? Its answer gg, between 0 and 1, is folded into the reader's two outputs:

h′=0.5+(h−0.5) g2,ei′=ei g2+1−g25.h' = 0.5 + (h - 0.5)\,g^2, \qquad e_i' = e_i\,g^2 + \frac{1 - g^2}{5}.

When gg is near 1, nothing changes. When it is near 0, the heaven output goes to 0.5 and the earth outputs go flat, so the confidence goes to 0 and the app refuses the frame. The model keeps the same two outputs, so the app needed no change. The digit is still the base reader's: the gate only withholds it.

Teaching the reader itself to answer "unsure" was tried first, and it cost digits on the real columns: Negative: 92.6 to 94.9 %, on Real columns, counts only, 2,778 columns with it, against Negative: 98.5 %, on Real columns, counts only, 2,778 columns for the same reader without it.

The reader was trained in three steps, all on drawn columns. The first reader learned from 5,808 columns of the 4-column design. A retrain on about 131,000 columns added slot cuts of every width from 3 to 21. Then the gate was trained, on 124,198 drawn columns against 19,098 drawn pictures that are not readable columns. The retrain is what made the other widths readable. The reader the app used before had only ever seen 4-column cuts; on the unseen slice's clear pictures, cut on their slots, it got 873 of 1,298 (67.26 %), on Studio renders, unseen slice of the training drawings, 1,298 of 2,424 pictures whole numbers right. The retrained reader with its gate gets 1,210 of 1,298 (93.22 %), on Studio renders, unseen slice of the training drawings, 1,298 of 2,424 pictures.

The gate was trained twice. The first version was never told that a covered column is unreadable. The second also counts as "not a column" any slot at least four-ninths covered by a hand, a card or a pen, and it is the one published. Over the whole unseen slice, covered columns included, wrong numbers shown came to 249 of 2,424 (10.27 %), on Studio renders, unseen slice of the training drawings, 2,424 pictures with the first gate and 60 of 2,424 (2.48 %), on Studio renders, unseen slice of the training drawings, 2,424 pictures with the second; the reader the app used before showed 284. The price is more refusals: 1,010 pictures withheld against 705. This gate was built after covered columns were seen failing on that very slice, so the comparison is not a clean test, though none of its training pictures come from the slice.

Eight small grey column pictures, each labelled refused with its true digit. In five a hand, a card or a pen hides part of the beads; in three no bead can be seen at all
Column tiles in a row; the ones a drawn hand covers are refused
A hand slides over; covered columns are refused, the rest still readOpen the lab
Holds60 of 2,424, against 249(2.48 %) · selection renders, 2,424Teaching the gate to refuse covered columns cut the wrong numbers shown by three quarters.
Figure 6. Columns from the unseen slice with at least 30 % of the slot covered. The gate refused these eight; over the whole slice it refuses 3,075 of the 3,191 such columns.

With its gate, the reader has 332 k parameters and is 1.3 MB.

4. Results

On held-back renders

Everything above was fixed first. Then each model ran once on the held-back set, on 3 December 2026, and nothing was trained, tuned or re-thresholded afterwards. The choice-set column is there for comparison. It is the set the settings were chosen on, so it should flatter them.

ModelMeasureHeld-back testChoice set (selection)
FinderFrame found well, full view208 of 211 (98.6 %), on Studio renders, held-back test, 211 of 1,000 pictures203 of 210 (96.7 %)
FinderFrame found well, a corner hidden40 of 114 (35.1 %), on Studio renders, held-back test, 114 of 1,000 pictures33 of 112 (29.5 %)
FinderCorners in the right order (heaven side found), working range319 of 325 (98.2 %), on Studio renders, held-back test, 325 of 1,000 picturesnot scored
FinderNo abacus in the picture, refused599 of 618 (96.9 %), on Studio renders, held-back test, 618 of 1,000 pictures408 of 419 (97.4 %)
CounterRight count, full view, finder's corners208 of 211 (98.6 %), on Studio renders, held-back test, 211 of 1,000 pictures207 of 210 (98.6 %)
CounterWrong and sure, full view, finder's corners0 of 211, on Studio renders, held-back test, 211 of 1,000 pictures0 of 210
CounterSlot position error, abaci counted right0.15 mm, on Studio renders, held-back test, 1,961 slots from part of the setmedian 0.16 mm, 99th percentile 0.73 mm
ReaderClear columns read right, exact corners98.5 %, on Studio renders, held-back test, 1,572 columns from part of the set98.5 %
ReaderWrong among the columns it accepts15 of 1,538 (0.98 %), on Studio renders, held-back test, 1,538 columns from part of the set0.92 %
ReaderWhole numbers right, clear pictures, exact cornersTarget not met: 155 of 171 (90.6 %), on Studio renders, held-back test, 171 of 1,000 pictures157 of 171 (91.8 %)
Whole chainWhole numbers right, clear picturesTarget not met: 156 of 171 (91.2 %), on Studio renders, held-back test, 171 of 1,000 pictures156 of 172 (90.7 %)

"Found well" means the corners come out in the right order and the worst of the four is within 3 % of the abacus's width, which is what the next stage needs. "Exact corners" means the reader was given the true corners from the render, so the score is the reader's own. "Whole chain" means the finder's corners and the counter's count and slots. Where the counter says "not sure", the scoring uses the true count, which stands for a user's setting that is right.

When the counter was not right it said "not sure": 3 of 211 (1.4 %) (from abacus-camera-reader/heldback-20261203.json, at /counter/finder_corners/not_sure), one picture each at 4, 9 and 13 columns. From exact corners it was right on 209 of 211 (99.1 %) (from abacus-camera-reader/heldback-20261203.json, at /counter/exact_corners/right).

The held-back scores did not drop. A set that chose the settings usually scores better than a fresh one. Here no row is worse on the held-back set by more than three pictures, and some are better (with a corner hidden, 35.1 % against 29.5 %). With about 200 pictures on each side that is weak evidence, but it is the evidence there is that the settings were not fitted to the choice set's own pictures. Both sets come from the same renderer, so it says nothing about pictures the renderer cannot draw.

The target is not met. Whole numbers on the clear held-back pictures, from exact corners, at the four widths the target names:

ColumnsPicturesRightWrong and shownWithheld
32525 of 25 (from abacus-camera-reader/heldback-20261203.json, at /reader/exact_corners_clear/by_count/3/numbers_right)0 of 25 (from abacus-camera-reader/heldback-20261203.json, at /reader/exact_corners_clear/by_count/3/numbers_wrong_accepted)0 of 25 (from abacus-camera-reader/heldback-20261203.json, at /reader/exact_corners_clear/by_count/3/numbers_not_accepted)
43028 of 30 (93.3 %) (from abacus-camera-reader/heldback-20261203.json, at /reader/exact_corners_clear/by_count/4/numbers_right)0 of 30 (from abacus-camera-reader/heldback-20261203.json, at /reader/exact_corners_clear/by_count/4/numbers_wrong_accepted)2 of 30 (6.7 %) (from abacus-camera-reader/heldback-20261203.json, at /reader/exact_corners_clear/by_count/4/numbers_not_accepted)
92927 of 29 (93.1 %) (from abacus-camera-reader/heldback-20261203.json, at /reader/exact_corners_clear/by_count/9/numbers_right)1 of 29 (3.4 %) (from abacus-camera-reader/heldback-20261203.json, at /reader/exact_corners_clear/by_count/9/numbers_wrong_accepted)1 of 29 (3.4 %) (from abacus-camera-reader/heldback-20261203.json, at /reader/exact_corners_clear/by_count/9/numbers_not_accepted)
102522 of 25 (88.0 %) (from abacus-camera-reader/heldback-20261203.json, at /reader/exact_corners_clear/by_count/10/numbers_right)0 of 25 (from abacus-camera-reader/heldback-20261203.json, at /reader/exact_corners_clear/by_count/10/numbers_wrong_accepted)3 of 25 (12.0 %) (from abacus-camera-reader/heldback-20261203.json, at /reader/exact_corners_clear/by_count/10/numbers_not_accepted)
All widths, 3 to 21171Target not met: 155 of 171 (90.6 %), on Studio renders, held-back test, 171 of 1,000 pictures3 of 171 (1.8 %) (from abacus-camera-reader/heldback-20261203.json, at /reader/exact_corners_clear/numbers_wrong_accepted)13 of 171 (7.6 %) (from abacus-camera-reader/heldback-20261203.json, at /reader/exact_corners_clear/numbers_not_accepted)

The target asks for 99 % right with at most 1 wrong in 300 at each of the four widths. Only 3 columns reaches it here, and 25 pictures cannot show 99 % either way. Most of the shortfall is the reader withholding a number, not showing a wrong one.

From the finder's corners and the counter's slots, the chain gets one more whole number right than from exact corners and shows two more wrong ones: Target not met: 156 of 171 (91.2 %), on Studio renders, held-back test, 171 of 1,000 pictures right, with 5 of 171 (2.9 %) (from abacus-camera-reader/heldback-20261203.json, at /reader/finder_and_counter_clear/numbers_wrong_accepted) wrong and shown.

Over all 325 pictures in the working range, hidden corners and covered columns included, the chain gets 181 of 325 (55.7 %) (from abacus-camera-reader/heldback-20261203.json, at /reader/finder_and_counter_all_working/numbers_right) right, shows 11 of 325 (3.4 %) (from abacus-camera-reader/heldback-20261203.json, at /reader/finder_and_counter_all_working/numbers_wrong_accepted) wrong, and withholds 133 of 325 (40.9 %) (from abacus-camera-reader/heldback-20261203.json, at /reader/finder_and_counter_all_working/numbers_not_accepted). On a picture with a covered column, withholding is the right answer.

On real columns, counts only

The one real set is 2,778 labelled column pictures of one printed 4-column abacus in one room, from 35 sittings of practice in January 2026. The pictures are never shown; only counts are given. They were cut the older way, in equal strips and not on slots, so this measures the reader on the cut it replaced.

The reader, which never trained on them, reads 98.96 %, on Real columns, counts only, 2,778 columns of them right. On the 2,318 ordinary columns it reads 99.57 % (from abacus-camera-reader/heldback-20261203.json, at /reader_on_real_columns/ordinary/per_column_right_pct). On 460 columns from four sittings whose cut went through the beads, it reads 95.87 % (from abacus-camera-reader/heldback-20261203.json, at /reader_on_real_columns/badly_cut/per_column_right_pct). Some labels are themselves wrong: an abacus cleared before the picture was taken, a hand in the way. The model card puts that at 1 to 3 % for the practice sittings. Since the reader agrees with 99.57 % of the ordinary columns' labels, those columns can carry at most about half a percent of it.

Given real frames of a whole desk, cut as if the frame were the abacus, the reader accepts 0.0 %, on Real whole-desk frames, counts only, 1,559 frames. A base reader retrained for the comparison, with no gate, accepted 79 % of the same frames, and none once it had a gate head. That comparison helped choose the gate, so this set is not a clean test either.

These pictures were not only a test. Earlier in the reader's line they chose between candidates (section 2), so these scores are somewhat optimistic for new pictures. There is no real-picture score for the finder or the counter.

Drawn against real. The same real columns gave the result that started this line of work. The first reader trained only on drawings read Superseded: 98.5 %, on Real columns, counts only, 2,778 columns of them right; the reader above has since replaced it. That figure is one run, picked from several by this very score. Other readers trained from the same renderer read Negative: 97.2 to 98.6 %, on Real columns, counts only, 2,778 columns, and the same command with the same seed gave 97.2 % and then 98.4 %, so a difference under about a point between two readers means nothing.

In the browser

The published files are byte for byte the ones abaci.one serves. Converted to TensorFlow.js, the reader gives the same digit as the Python it was trained in on 733 of 733, on Studio renders, choice set, 733 columns from part of the set drawn columns, and the counter gives the same count on all 128 corner sets of the same 64 drawings. The finder's worst corner differs by 0.87 px on 44 drawings. The counter takes about 11 ms a run with WebGL on a laptop, and the finder a median 86 ms a frame on a phone.

5. Where it fails

A hidden corner. When a hand or an object hides a corner, the finder places the frame well on only 40 of 114 (35.1 %), on Studio renders, held-back test, 114 of 1,000 pictures. Over all 325 working pictures, hidden corners included, it is right on 248 of 325 (76.3 %) (from abacus-camera-reader/heldback-20261203.json, at /finder/working_right). This is the largest known weakness of the chain. An abacus in full view on a table is the use it was built for. In the author's own trial with a docked phone, covering the abacus's left corners broke the finder where covering the right ones did not. Why is not known.

The count, when corners are hidden. On full views the counter has never been wrong and sure, on either set. Over the choice set's 322 working pictures, hidden corners included, it was wrong and sure once: a 10-column abacus with two corners hidden, counted as 9. Both of its checks agreed, so the rule could not catch it.

The counter's view of a drawn 10-column abacus with a large hand shape over its left side; nine yellow lines and nine peaks in the curve below
Figure 7. The counter's one confident mistake, on the choice set: two corners hidden, nine peaks, counted as 9.

Covered columns. A covered column should be refused, and mostly is, but not always. From exact corners the reader showed 8 of 325 (2.5 %) (from abacus-camera-reader/heldback-20261203.json, at /reader/exact_corners_all_working/numbers_wrong_accepted) wrong numbers over all the working pictures, against 3 of 171 (1.8 %) (from abacus-camera-reader/heldback-20261203.json, at /reader/exact_corners_clear/numbers_wrong_accepted) on the clear ones alone.

Wide abaci. Of the 15 wrong columns the reader accepted on clear held-back pictures, 5 are at 17 columns, 5 at 9, 3 at 21, and one each at 10 and 18. A wide abacus is small in a phone picture. On the unseen slice the reader is wrong on 4.3 % of uncovered columns narrower than 20 pixels a slot, against about 1 % between 20 and 45 pixels. The widths other than 3, 4, 9 and 10 are also thinly drawn, in training and in the test.

Heaven beads partway along their travel. The drawings count a heaven bead as set once the gap behind it is at least 60 % of its free travel, so a set bead and an unset one can sit only 2 mm apart.

Stills are not the app. At 10 columns, one wrong number in 300 means about one wrong column in 3,000. On held-back stills, about one accepted column in a hundred is wrong, roughly thirty times too many. The app's rule of waiting for three agreeing frames closes part of that gap. How much is not measured.

6. What did not work

7. Reproducing it

  • The three models are on Hugging Face at the revisions pinned on this page, each with the trained Keras file it was exported from and the SHA-256 of every model file.
  • The app's browser pipeline (the finder, the counter, the slot cut and the reader, as they run on a phone) and the first drawn-only training recipe are in the app's repository at the commit named above.
  • The evidence file behind every held-back number in this report can be downloaded from this page. Each finding's number is compared with it when the site is built, and the site does not build if one differs. The other numbers that link to it are printed straight from it.
  • Not yet public: the renderer and trainers for the Studio sets, and the held-back pictures themselves. The drawings re-render from their seeds, pixels within 1/255: 59001 for training, 59002 for the choice set, 59003 for the test. The training does not repeat exactly, so a re-run gives a different model, which must be scored before it is trusted.

Privacy

Every picture in this report is a render. The real pictures behind the two real sets were taken while children practised; they show desks and hands, and their file names carry account ids. None of them is published or shown, and none was a training example. Only counts from them appear here.

Limitations

  • Studio-design abaci only. Traditional sorobans, with bicone beads on rods, are not read.
  • The held-back scores are on renders, which only imitate glare, blur and camera noise. The finder and the counter have no score on real pictures at all.
  • The whole-number target is not met: 155 of 171 clear held-back pictures, against 99 %.
  • A hidden corner defeats the finder about two times in three.
  • Real scores exist for the reader only: one abacus, one room, one camera, cut the older way. Those pictures also chose between candidates earlier in the reader's line, so the scores are somewhat optimistic for new pictures.
  • Widths other than 3, 4, 9 and 10 columns have 3 to 8 full-view held-back pictures each. Nothing can be said about a single one of those widths.
  • The choice set and the unseen slice are selection sets. The comparisons quoted from them (the slot cut, the retrain, the two gates) chose the design and are not clean tests.
  • Training does not repeat exactly: the same command and seed have given readers a point apart on the real columns. Each number here is one run of one trained model.
  • The app waits for three frames in a row to agree before it takes a number. Stills cannot measure that, so the rate of wrong numbers in live use is not known.
  • The finder's first stage starts from public ImageNet weights, which were learned from photographs. "Trained on drawings" describes our own training pictures, not that starting point.

Changelog

  • : First version.

Text CC-BY-4.0 · Code MIT

Loading deployment info...