Vision OCR model comparison

Benchmarks for Sanskrit, Vedic-accented, mixed English+Indic, Tamil, Kannada, old Telugu (curled nakāra-pollu), and Kane History of Dharmaśāstra scans, measured head-to-head on 15 hard pages (test data below). Use this page to choose a model; for how to run each one (Kaggle kernels, datalab_ocr, Drive OCR, Gemini paragraph repair) see the text-extraction-ocr skill: SKILL.md.

  • CER = character error rate after Unicode/whitespace normalisation (lower is better).
  • IAST / Svara / Pollu = % of Roman-IAST diacritics / Vedic accent marks / archaic Telugu+Kannada curled nakāra-pollu (౯/೯-like న్/ನ್, e.g. అథచాస్యాదర్శాన్, ಮಹಾವಿದ್ವಾನ್) preserved.
  • Script columns: Pure Deva (pure Devanāgarī + Hindi), Mixed (English + IAST + inline Devanāgarī), Inline Deva (Devanāgarī inside English prose), Tamil, Kannada (3 pp), Telugu (2 pp), Kane (3 hard History of Dharmaśāstra pages).
  • s/pg = wall-clock seconds per page (T4 GPU for open weights, API latency for paid).
  • Numbers are our own measurements unless marked vendor / Sarvam; - means the model has not been run on that subset yet.
  • Rows are ordered by usefulness (open weights) and by All9 CER (paid, where the grid’s row numbers are the ranks).

Open-weights & self-hosted

Includes the Google Drive OCR baseline (15/15 pages) and newly added open-weights Indic/document OCR models (surya-ocr-2.5, Chitrapathak-2, GLM-OCR, indic-ocr-0.9b, HunyuanOCR). Existing 7-page runs were on Kaggle 2×T4; a 15-page T4 kernel (indic-ocr-eval-open) is queued across the new Indic models + mitra-sanskrit-ocr rerun.

  • datalab-to/surya-ocr-2 (0.65B) is the best measured general multi-script model on the 7-page subset: 3.44% overall, 2.61% on pure Devanāgarī (2× better than Drive OCR), zero repeat loops; surya-ocr-2.5 (0.7B, 73.4% kn / 66.0% te word acc on Sarvam) is queued in indic-ocr-eval-open.
  • buddhist-nlp/mitra-sanskrit-ocr is a full fine-tune of surya-ocr-2 with identical prompt/output (stage --model buddhist-nlp/mitra-sanskrit-ocr). On our 7 Mahābhāṣya pages (max_new_tokens=4096) it matched surya on pure Devanāgarī (2.81%) and Tamil (8.57%) but degenerated on 4/7 mixed/long pages (27.92% overall); a max_new_tokens=3072 rerun across all 15 pages is queued in indic-ocr-eval-open.
  • krutrim-ai-labs/Chitrapathak-2 (3B, Qwen2.5-VL SFT, 10 Indian languages) and zai-org/GLM-OCR (0.9B, MIT) are added and queued in indic-ocr-eval-open; altslate/indic-ocr-0.9b (0.9B, Apache-2.0, block-level) beats Surya 2.5 on Telugu (74.3% vs 66.0% on Sarvam) when fed cropped text blocks.
  • datalab-to/chandra-ocr-2 (5.3B) is the only measured open model that keeps Roman IAST (85% recall) and Devanāgarī and layout — but it is 5.3B and needs chandra-ocr/vllm or bbox dedup to avoid wrap-around duplication.
  • tadeva-maNipravALa-ocr (CPU, ~5 s/page) is the exception for bulk work: intra-word Devanāgarī↔Tamil splitting for Maṇipravāḷa, and the only pipeline that beats every model on Tamil (7.62% on sub_p087).
  • Qwen3-VL is for English + IAST diacritics (82–92% recall) and footnote/layout QA — never quantize below Q4_K_M on Indic scans.
  • No open-weights model preserves Vedic svaras (0% everywhere). For printed udātta/svarita bars use doc_curation.pdf.ocr.vedic_accent_cv.
  • Google Drive OCR at 2.9–7.7 s/page (9.38% across all 15 pp) and zero GPU quota remains the default first pass — note that on old Telugu/Kannada print it achieves only 46% nakāra-pollu recall (అథచాస్యాద రాక్ for అథచాస్యాదర్శాన్; Louie was. for ವೆಂಬುದೇ ಭಾವನೆ.).
  • PaddleOCR-VL-1.5 should not be used on Sanskrit/Indic — it enters ॐ-loop hallucinations (41 min/page, 52.84% CER).

Gemini 4 (Neon / Hydrogen / Carbon), Claude Opus & Sonnet 5.5, and Muse. The primary recommended tiers (gemini-4-hydrogen-medium, gemini-4-neon-low, claude-opus-5-5-low) are now scored across all 15 pages. Use these for targeted hard pages, old Telugu/Kannada nakāra-pollu, Vedic-accented scans, or paragraph-level repair (doc_curation.pdf.ocr.gemini_repair) rather than burning quota on bulk 500-page books.

  • Default: gemini-4-hydrogen-medium — best quality/speed/cost trade-off (1.24% All9, 0.20% inline Devanāgarī, 1.20% Kannada, 1.53% Telugu, 100% IAST, svara, & old nakāra-pollu, 0.44% on Kane prose+footnotes) at half Neon’s list price.
  • Copyright-filter caveat on Kane indexes: Both Gemini 4 Hydrogen and Gemini 4 Neon refuse kane_v2p2_p1312.png with a copyright safety block (History of Dharmaśāstra), whereas claude-opus-5-5-low transcribes all 3 Kane pages cleanly (1.35% Kane CER, 0.47% on p1312, 1.78% across all 15 pp)!
  • Telugu vs Claude: On old Telugu scans (te_pkp_p003, te_champu_p042), Gemini 4 Hydrogen (1.53%, 100% pollu) beats Claude Opus 5.5 (4.56%, 96% pollu, misreads like డెఙ్కణీ → డెబ్బణీ).
  • Fastest ~1% tier: gemini-4-neon-low (13–21 s/pg, 1.81% Telugu, 1.93% Kannada); use hydrogen-low (8.7 s/pg) when Tamil/Kannada matter more than pure Devanāgarī.
  • Highest accuracy on 9 pp: gemini-4-neon-high (0.78% All9) at 147 s/pg — reserve for the hardest critical pages.
  • Never use Sonnet 5.5 on Vedic-accented scans (0% svara at #medium/#high, 52% at #low).
  • Muse matches Gemini on clean non-Vedic pages but drops all svaras and hits 429 after ~5 dense pages in a 5-hour window.

Test data — the 15 benchmark pages

All 15 page PNGs, verified plain-text ground truth, runners, and raw JSONL outputs are collated in sanskrit-coders/llm-eval/ocr/ (and uploaded to Kaggle dataset vishvasvasuki/indic-ocr-eval).

sub_pNNN / charu_pNNN = 1-based PDF page of the source; kn_smk filenames keep the 0-based render index.

Page files Source PDF page (printed) Render / Notes
charu_p011_pas.png
charu_p012_svara.png
archive.org in.ernet.dli.2015.406302 → 2015.406302.Vyakaran-Mahabhashya.pdf (Charudeva Shastri) 11, 12 (6, 7) dpi=220 — Pure Deva + Hindi + footnotes + svaras
sub_p082_mixed.png, sub_p086_trilingual.png, sub_p087_tamil.png, sub_p088_vedic.png, sub_p256_vrddhi.png archive.org LecturesOnPatanjalisVyakaranaMahabhashya1 → LecturesMahabhasya.pdf (Subrahmanya Sastri Vol. I) 82, 86, 87, 88, 256 (9, 13, 14, 15, 183) dpi=220 — Mixed Eng + IAST + Deva + Tamil + svaras
kn_smk_p030.png
kn_smk_p050.png
rts-kn_smk_1.pdf (Sāracandrikā Kannada edition, local) 0-based 30, 50 → 31, 51 dpi=200, RGB — Kannada prose + Sanskrit quotes/ślokas
kn_hamsa_p030.png haMsa-sandeshaH_kn.pdf (Mysore Kannada edition, local) 30 (xi) dpi=200 — Old Kannada with archaic curled nakāra-pollu (ಮಹಾವಿದ್ವಾನ್), D. S. S. Gowda, B.SC.
te_pkp_p003.png pancha-kAla-prakAshaH.pdf (1904/1911 Madras Telugu print, local) 3 (preface) dpi=600 (native 1000×1425) — Tests old curled nakāra-pollu అథచాస్యాదర్శాన్, అస్మిన్, (1904)
te_champu_p042.png rAmalingasharmA_te.pdf (Campū-Rāmāyaṇa Telugu vyākhyāna, local) 42 (39) dpi=200 — Sanskrit verses + superscript footnotes + Telugu comm. + curled మోఘీకుర్వన్, పుత్రీయన్, -స్సన్
kane_v4_p058.png History of Dharmaśāstra v4.pdf (local) 100 (58) dpi=200 — BORI stamp over Devanāgarī fn 139–141, unprinted press type (प्रायश्चि[त्तं])
kane_v5p2_p1158.png History of Dharmaśāstra v5p2.pdf (local) 480 (1158) dpi=200 — Smudged/ink-bleed Devanāgarī footnotes 1881–1883 + IAST
kane_v2p2_p1312.png History of Dharmaśāstra v2p2.pdf (local) 621 (1312) dpi=200 — 2-column dense index with IAST/italics (triggers Gemini copyright block)
  • Kaggle datasets: vishvasvasuki/indic-ocr-eval (all 15 pages, CC0) and legacy vishvasvasuki/mahabhashya-ocr-eval (7 Mahābhāṣya pages).
  • Kaggle kernels: vishvasvasuki/indic-ocr-eval-open (T4, 15 pp: Chitrapathak-2, GLM-OCR, mitra-sanskrit-ocr, surya-ocr-2.5), vishvasvasuki/mahabhashya-ocr-eval-hf, vishvasvasuki/mahabhashya-ocr-eval-qwen3vl.
  • Scoring & runners: sanskrit-coders/llm-eval/ocr/ (score_eval.py, ground_truth/*.txt, results/*.jsonl, runners/).

Scoring

1
~/gitland/python_venv/bin/python ocr/score_eval.py ocr/results/*.jsonl

Each JSONL row is {model, file, status, elapsed_s, text}; elapsed_s feeds s/pg. CER is computed against normalized ground truth per page and aggregated per script/book class (All7, All9, All15, Pure Deva, Mixed, Inline Deva, Tamil, Kannada, Telugu, Kane), plus IAST, Svara, and Pollu recall.

Caveats

  • Vedic svaras are the single biggest differentiator. Every open-weights VLM scores 0%; Gemini 4 and Claude Opus score ~100%; Sonnet 5.5 drops them at #medium/#high. Always run vedic_accent_cv when accents must be exact.
  • Old Telugu/Kannada nakāra-pollu (౯/೯ curl for న్/ನ್) fools Drive OCR (46% recall), turning అథచాస్యాదర్శాన్ into అథచాస్యాద రాక్ and ಮಹಾವಿದ್ವಾನ್ into ಮಹಾವಿರ್ದ್ಯಾ; Gemini 4 gets 100%.
  • Small differences are not significant. CER deltas below ~0.2% are within page-to-page noise; prefer the faster/cheaper tier when the difference is that small.
  • Re-score before trusting a row after changing prompts, resize, max_new_tokens or quantisation — several failures here (PaddleOCR loops, mitra v1 4096-token loop, Muse stdout duplication) are settings-sensitive.