Reading bookshelves with AI, on one 8 GB graphics card
Seferehov is a free map of street libraries: the public book cabinets on streets, in parks and in building lobbies.
Anyone can photograph a shelf, and the app works out which books are on it. Then anyone can search for a book by title and distance.
All the AI runs on one GTX 1080 from 2016, in a server in my home. There is no per-request bill, and no photo is sent to a cloud model.
This page is about how that works. It is written for developers, and for teams wondering whether they could run their own AI the same way.
From a night experiment: one shelf read in strips, 16 of its 17 books found (green; red = missed).
The hardware
GPU: one NVIDIA GTX 1080 with 8 GB, from 2016. Models of about 8 billion parameters fit entirely on it.
Server: an AMD Threadripper 3960X (24 cores) with 251 GB of RAM. Text recognition runs on the CPU, so the GPU is left for the vision model.
One queue for the GPU: several of my apps share the card, so every GPU job goes through one priority queue. A reader waiting for a shelf comes before a background job.
From a shelf photo to a list of books
On the phone: a 4 MB image model, trained for this app, decides whether a book is in view. The camera takes the photo only when the phone is steady enough, and uploads work offline and are sent later.
Finding the spines: a vision model (Qwen3-VL 8B, through Ollama) draws a box around every spine. Leaning books are measured, and the photo is turned so each group stands upright.
Cutting each spine out: each spine is cut at its own angle, along its real edges, so the next step reads one book at a time.
Reading it twice: the vision model and a separate OCR model (Surya) read each cut-out, both ways up, because Hebrew spines are printed in either direction. A reading is kept where the two agree.
Fixing Hebrew: most Hebrew mistakes are look-alike letters. A Hebrew spell-checker (hspell) fixes many of them.
Matching a catalogue: the text is matched against a local copy of Open Library (38.6 million books) and the National Library of Israel, so the reader gets a real book, not a guess.
A person decides: every book gets a confidence score, and the reader approves it in a queue, one book at a time. Every step is saved in a trace, so when a book is missed I can see exactly which step lost it.
Three spines after cutting and turning the right way up.
Measured, not guessed
Word accuracy on 60 Hebrew back covers with known text:
Reader
Clean
Like a phone photo
Tilted, blurred, noisy
Surya OCR
98%
97%
98%
Vision model (Qwen3-VL 8B)
92%
76%
77%
Tesseract
72%
73%
28%
On real photos, the title was found on 71% of Hebrew spines by the vision model alone, and on 93–100% of English covers.
When the app marks a book as "sure", readers approved it 96% of the time.
The choice of models came from these tests. Some models that look good in demos made up titles that are not on the shelf, so they were dropped.
Built with Claude Code
I built Seferehov with Claude Code, and changes to the reading pipeline are measured on a fixed test set of real photos.
Claude Code also has a night shift: while I sleep it runs experiments on the server as a user that can read the data but not change anything.
The first night's experiment found 59 of 68 books on the test shelves, against 47 with the method that is live. It is not live yet, because it doubles the GPU time per photo.
The weekly write-ups, with the numbers and the dead ends, are on amiheines.com:
I'm Ami Heines. I help software teams run AI on their own GPU, or on a rented one, with no per-request bill.
If you have an AI feature in mind, I can tell you in 30 minutes whether a local model can do it and roughly which card it needs.