Use it
pip install -r requirements.txtpython read_spine.py examples/spine-hebrew.jpg examples/spine-latin.jpg
Give it one spine, turned level. Seferehov cuts spines out of shelf photos with
StairsCutter and reads each one both ways up; it was taught to answer NONE for a spine
upside down. The prompt, picture size and decoding in read_spine.py are the app's own and should be kept as they are.
How well it works
198 real spines from shelf photos, cut by the app and checked by a person (answer key v3), never used in training
(the 120 of them from the author's own photos are the test split of Seferehov spines):
Table with columns: Reader, Hebrew titles right, Latin titles right, Exact titles, Seconds per spine| Reader | Hebrew titles right | Latin titles right | Exact titles | Seconds per spine |
|---|
| Qwen3-VL 2B, as is (lab 056) | about 36% overall | | | |
| ScoutReader (rank 32, Hebrew data only) | 85.2% | 53.1% | 39.9% | 0.75 |
| ScoutReader 2 | 85.9% | 77.6% | 50.5% | 0.79 |
| Qwen3-VL 8B, as is | 90.6% | 93.9% | 52.0% | 5.71 |
As a first reader (the way the app uses it), with the catalogue asked about every reading:
- It settles 45.1% of the 198 spines, and 98.9% of those are right (1 wrong: a very hard spine where it read
"I Won't Let You Go" for "I Won't Die Hungry", and a real book of that name was found).
- ScoutReader 2 first and Qwen3-VL 8B for the rest: 94.4% right, against 92.8% for the 8B alone.
- On the public fixed-9 shelf benchmark (9 photos, 58 books):
the same 50 of 58 books found, 0 wrong books settled, and about 8% fewer big-model calls per book found.
Training
- Data: 18,000 synthetic Hebrew spine strips and 5,995 synthetic Latin strips (rendered text); real spines from public street-library photos taken by the app's readers (175 Hebrew, 39 Latin, the training
half only) and 43 Latin spines from the author's own shelves, each real spine shown 4 times. Other readers' home
shelves are never used.
- Setup: LoRA rank 64, alpha 128, dropout 0.05, on the language model's q, k, v, o, gate, up and down projections;
the vision-language merger trained in full; the vision encoder frozen. 2 passes, 6,466 steps, effective batch 8.
- Hardware: one GTX 1080 (8 GB), about 11 hours, peak memory 6.6 GB.
What did not work, for the curious: a small CRNN trained from scratch (0.5%: no Hebrew starting point); real data alone
(15% Hebrew with 175 spines); a 2B "corrector" of the big model's readings (broke 41 right titles).
Limits
- Not a general OCR model. It reads spines and covers; it answers one line.
- Hebrew is its strength; Latin trails the 8B model (77.6% against 93.9%).
- Exact titles are hard: about half are letter-perfect. In the app a catalogue match decides whether a reading is used.
- Like any reader, it can produce a believable title for an unreadable or blank picture. The app's guard against this
is the PaddleOCR check above: in a lab run on 30 Nov 2026, without that check, it settled 3 wrong books on blank
cut-outs (a picture scrap, a bare shelf board, a dark spine).
Licence and credit
The adapter: Apache-2.0, like Qwen3-VL. Made by Ami Heines with Claude Code, in the Seferehov lab (experiment 088).
Questions and results: Discussions.