In August we told the story of how we built the Font Recognizer: three engines, our own neural network, Cyrillic on equal terms with Latin. That post ended by saying its accuracy numbers were a snapshot, not a ceiling.
Three months on, the catalog has grown from 26,000 to more than 135,000 font families, and we took a new snapshot. It began with an uncomfortable discovery: the previous one had been too flattering. This post is about how we checked ourselves, what we found, what we have fixed already, and what is still ahead.
Why 93% was true — and still nothing to brag about
The August post quotes 93.3%: how often the model named the right font family first. The number is honest, but it was measured on a set of 900 families. A real query doesn't compete with nine hundred families — it competes with the whole catalog, now 135,000 families and 168,000 individual styles, hundreds of them near-identical grotesques.
So we rebuilt the measurement itself:
- every query is searched against every style in the catalog, not a sample;
- the query texts are different from the texts the fonts were indexed with;
- the images are deliberately degraded — downscaled, blurred, JPEG-compressed, like a real screenshot;
- each query goes through the full path the site uses, from the cropped image to the final list;
- there are 900 queries of nine kinds: an ordinary caption, ALL CAPS, a single short word, a long line, coloured text on a coloured background — in Latin and in Cyrillic.
The first run was sobering. The right font came first in 15% of queries and made the top three in 18%. Some kinds of query barely worked at all: a single short Latin word did not reach the top three once in a hundred tries, a long line got there 4% of the time, coloured text on a coloured background 6%.
What was actually wrong
The easy explanation would have been: the catalog grew, the model is out of date, retrain it. We checked that first, and it turned out to be false. Fonts the model never saw in training are found no worse than the ones it was trained on. The architecture from the first post keeps its promise: a new font only needs to be added to the index.
The real causes were more mundane.
The model had learned the layout, not just the letters. In training it saw a line of text in the middle of a wide canvas with margins. The site was handing it a tight crop stretched to fill the whole frame. To a person that is the same lettering; to the model it was an unfamiliar picture. A short word got stretched the most, a long line was squeezed into a thread — hence the near-zeros in the test.
We were removing colour the wrong way. Plain greyscale turns red text on a green background into grey on grey. When we switched to projecting the image along its own "background colour → text colour" axis, the share of correct search results on such images went from 5% to 40%.
Cyrillic queries were searched against everything. Fewer than four thousand of the 135,000 families have Cyrillic, yet a Cyrillic query competed with all of them — and often lost to a Latin-only font that merely had a similar overall look. And Cyrillic is no side case for us: among the queries where the text could be read, almost two thirds are Cyrillic.
Small bugs were expensive. The tail of a "g" or "y" was sometimes taken for a separate line of text. Black text on a bright red background was inverted by mistake. A transparent PNG turned into a black rectangle.
Twins were elbowing each other. In a large catalog the same design often lives under several names — we found more than 1,800 such groups. The right name could end up fifth, behind four of its own copies.
What we did without touching the model
Everything below was done on the same model as in August: no retraining, no GPU.
- A query now looks the way the model expects. We lay the crop out on the same kind of canvas the model saw in training, cut long lines into pieces and search with each, and reduce colour along the "background → text" axis.
- Search knows the script. We read the text first, decide whether it is Cyrillic or Latin, and match a Cyrillic query only against fonts that have Cyrillic.
- Well-known fonts rank above their obscure copies. When two candidates are almost equally close, a small edge goes to the one people actually use.
- Twins are one card. A group of fonts with the same design appears as a single result, with the line "Same design under other names".
- More samples in the index. Every font got extra renders in all caps, in short words and with wide letter-spacing. The index grew from 1.05 to 1.95 million images.
- Search got faster. The catalog search step used to take more than half a second; now it takes under a tenth. A full answer arrives in about 0.85 seconds on average.
What came out of it
The same 900 queries, the same full catalog:
| Query | Before: 1st place / top three | Now: 1st place / top three |
|---|---|---|
| Latin: ordinary caption | 44 / 50% | 64 / 74% |
| Latin: ALL CAPS | 20 / 25% | 55 / 70% |
| Latin: a single short word | 0 / 0% | 50 / 62% |
| Latin: long line | 4 / 4% | 68 / 76% |
| Latin: coloured text on a coloured background | 4 / 6% | 68 / 78% |
| Cyrillic: ordinary caption | 44 / 52% | 68 / 82% |
| Cyrillic: ALL CAPS | 14 / 22% | 45 / 69% |
| Cyrillic: a single short word | 1 / 2% | 65 / 75% |
| Cyrillic: long line | 0 / 0% | 68 / 82% |
| All 900 queries | 15 / 18% | 61 / 74% |
The right font is now in the top ten for 83% of queries, up from 23%. In both columns a twin — the same design under another name — counts as a hit.
One episode from this work deserves its own mention. When we added all-caps samples to the index, all-caps recognition improved by 13 points — and ordinary Latin captions dropped by 2. A small preliminary test didn't show it; only the full one did. We found the cause (the right font sometimes missed the shortlist that goes to the final refinement step), widened the shortlist, and ordinary captions went back to where they were. The rule since then is simple: every change is measured against the whole catalog, not a convenient sample.
What is still weak
It would be dishonest to end on a table of gains.
- ALL CAPS. 55% for Latin and 45% for Cyrillic is far better than before, but it is still the weakest kind of query. Capitals carry fewer distinguishing features, and the catalog holds hundreds of look-alike grotesques.
- Reading Cyrillic. To detect the script and refine the result we read the text in the image, and the reader confuses Cyrillic letters with their Latin look-alikes: "Н" and "H", "С" and "C". Because of that, some Cyrillic queries are still searched against the whole catalog.
- The numbers are synthetic. The test queries are renders degraded to look like screenshots, not real photos of shop signs. They are harsher than our earlier tests, but they are not real life yet.
What comes next
- A new model version. We now know what to teach it. Training images should go through the same preparation as real queries. Twin fonts should be one class, not rivals. There should be far more all-caps text and short words in training. The data is already collected — 170,000 styles.
- Testing on real screenshots. We plan to collect a set of real images with known answers and add a "yes, that's the font" button to the results, so that we measure more than synthetic queries.
- Better Cyrillic reading, so that a Cyrillic query is always matched against Cyrillic fonts.
- The index grows with the catalog. New fonts become recognizable once the index is extended: a few hours of CPU time, no retraining.
Three months ago we wrote that the numbers were a snapshot, not a ceiling. Today's snapshot looks more modest on paper and is much better in practice: the short word, the long line and the coloured caption that barely worked before now do. And it is, again, not the ceiling.
Try it
The Font Recognizer is live at jinero.online/fonts/recognizer — free, no sign-up, Latin and Cyrillic. If a result surprises you, for better or worse, tell us: real examples are the most valuable thing we can get right now.
Comments 0
Sign in to be the first to comment.