--- license: apache-2.0 base_model: Qwen/Qwen3-VL-2B-Instruct library_name: peft pipeline_tag: image-text-to-text language: - he - en tags: - lora - qwen3-vl - ocr - book-spines - hebrew - libraries --- # ScoutReader 2: read a book spine, fast, in Hebrew or English ScoutReader 2 reads the title and author printed on a book spine and answers one line, `TITLE | AUTHOR`, or `NONE` when it cannot. It is a LoRA add-on (rank 64, attention and MLP layers, plus the vision-language merger trained in full) for **Qwen3-VL 2B Instruct**, trained for Hebrew and Latin spines. **About 0.8 s per spine on a GTX 1080 from 2016**, against 5.7 s for Qwen3-VL 8B. | Spine | ScoutReader 2 reads | |---|---| | | `צלה של הרוח \| קרלוס רואיס סאפון` (1.0 s) | | | `FOREIGN PARTS \| Janice Galloway` (0.6 s) | It runs in production in [Seferehov](https://github.com/amih/seferehov) ([seferehov.com](https://seferehov.com)), a shared map of free street libraries where readers photograph a shelf and local AI models read every book on it. There it is the **fast first reader**: when a catalogue knows its reading and PaddleOCR finds at least half of the reading on the picture, the spine is settled and the big model is not asked. ## Use it ```bash pip install -r requirements.txt python 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](https://huggingface.co/amih/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](https://huggingface.co/datasets/amih/seferehov-spines)): | 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](https://github.com/amih/seferehov/tree/master/bench/fixed-9) (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](https://github.com/amih/seferehov/discussions).