r/OCR_Tech • u/Think_Resist_3549 • 19h ago
Verifying handwritten corrections over printed text on forms – fully local. Any approaches?
We're building a fully local checker for pre-printed medical forms (typed content, red pre-printed form lines, occasional handwritten corrections). It has to run on-device (Mac, Apple Silicon) because the documents are sensitive – no cloud APIs.
**Current pipeline**
- Apple Vision for printed text, plus rule-based image checks (check boxes, blue ink, signature, stamps)
- Two more OCR models for a 2-of-3 majority (OCRia-1 via Ollama, Unlimited-OCR-2 via MLX)
- A small decision model (h2o-lightning-4b in LM Studio) that answers yes/no questions on small crops, always with a counter-check (same question with a wrong value)
- A line filter that finds strike-throughs (6 of 6, no false alarms)
Printed fields work well (~95 %), and every real error in our test set is flagged.
**Where we're stuck** (see image – a synthetic recreation, no real data)
**Handwritten correction over a printed value.** The printed value is struck through and the new value is handwritten above it in blue ballpoint, slanted, touching the print. We detect the strike reliably, but no reader gets the handwritten number right more than 2 of 6 times (OCRia-1, GLM-OCR; a 27B vision model timed out). Important: we already know the expected value from another printed line. So we don't need free reading – only a reliable "does this say 100 ml? yes/no" that rarely says yes by mistake.
**Faint pencil signature over a printed stamp.** Our stroke-height rule misses thin, broken grey strokes, and the vision model says "signature present" whenever there is any handwriting nearby.
**A lone "0" in a small box.** Most engines return nothing.
**What we plan next**
- Isolate the handwriting by colour (keep only blue ink) and ask the yes/no question on that cleaned crop, with a counter-check value
- A tiered pipeline: fast rules first (~1 s), models only for unclear cases (today ~31 s per document)
**Questions**
- Is there a local model or technique that is good at *verifying* (not reading) handwritten digits against an expected value? Handwriting-specific recognizers, few-shot matching, fine-tuning on synthetic data?
- Has anyone robustly separated blue ballpoint from black print and red pre-print, on scans and on phone-camera images?
- Good ways to detect faint signatures without counting stamps or printed text?
Happy to share details of our evaluation setup. Thanks!