Build your own character recognizer
Create a recognizer for any symbols you want — drawn on screen or photographed. Name each symbol, draw or upload a few examples, test it right here, and download a self-contained zip to host on your site. Everything stays in your browser with no account required. If you just need standard letters or digits, the ready-made recognizers are smaller and faster (try one on the home page).
1 · Library type: characters (words, sentences, and page cleanup coming later)
2 · Symbols & training examples
Add a class for each symbol you want to recognize and draw at least 5 examples of each (more examples help). Click any thumbnail to remove it.
Train from a zip of character images
Upload one or more .zip files containing individual character images and a
manifest.json labeling each image and its baseline. Most images are used for training, and a
few per character are held out to measure accuracy. Character height is measured up from the baseline
(descenders don't count toward height). You can upload multiple zips at once or add more later to combine
them (uploading a zip with the same filename replaces the earlier one). This builds a photo-input
recognizer. See the format guide.
manifest.json:
{ "version":1, "xHeight":52, "characters":[ {"file":"a1.png","char":"a","baselineY":140}, … ] }
— xHeight optional (auto-derived from x-height letters if omitted);
add "split":"test" to force a sample into the test set.
Whitespace + dark-pixel combination — experiment
A second recognizer that scores the white space, not the ink: for every
background pixel it measures the distance to the nearest dark pixel and, casting rays, how
far each travels before hitting ink (an angular arm signature that separates * / x / +),
binned into a per-cell spatial-grid histogram and matched by chi-square. Its per-class
probabilities are then blended with the main dark-pixel matcher in log-probability space
— (1−blend)·log Pdark + blend·log Pwhite. Loads the
same character zips above; run once, then slide blend d↔w to remix the two
instantly and find the best mix. A standalone experiment (not part of the downloaded library).
Leave-one-out cross-validation — per-variant accuracy
Runs many training passes over the same character zips above: each time a different drawn variant of a character is held out of the bank and recognized against the rest, repeated until every variant has been the held-out one exactly once. Reports the overall accuracy and, for each variant, its result — the confidence when the correct character ranks #1, otherwise the top-3 guesses with each one's confidence. Uses the matcher's built-in self-exclusion, so one recognizer is built and reused across all hold-outs.
Pair-discrimination heatmaps (baseline frame) — experiment
Which parts of a character carry the evidence that separates it from one specific confusable rival (O vs Q, P vs R)? Pick a good letter and a bad (rival) letter. For every variant of the good letter, its most similar other good variant and most similar bad variant are found (production matcher score, baseline-anchored frame: height above the baseline + distance from the left edge). Then each point is colored by comparing its best point-match into each: dark blue = matches the good template well and the bad one poorly (evidence for the good letter); dark red = the reverse (evidence for the rival); white = matches both or neither (uninformative). Continuous in between. A consistent blue region across variants = exploitable signal for a pair-specific discriminator.
Advanced matcher settings
The defaults are already tuned — only change these if you're experimenting. Applies to stroke matching; photo matching uses its own presets.
3 · Test it
This pad uses the exact same runtime and training data that will be in your downloaded zip.
4 · Save & download
photo-word = reads PHOTOGRAPHS via the WASM matcher + CC lattice, 73 classes (incl. punctuation), 28,770 words with contractions (~0.9 MB, ~2–4 s/word). page cleaner = the other half of the problem and NO recognition: a photo of a page in, clean ink and word boxes out (dewarp, illumination flatten, ruling removal, segmentation; ~170 KB). Detects what kind of paper it is — ruled, plain, graph, dot grid — or you pick. Ready-made; the button above builds a library tuned to your data.