sanoOCR: Nepali + English OCR in 0.87M parameters (research preview)
sanoOCR (ΰ€Έΰ€Ύΰ€¨ΰ₯ = "small") is the product name for this model, previously called Nepali Tiny OCR. Best models: v0.1 and v0.2.
Small CPU OCR for printed and handwritten Nepali and English, plus PDFs through their text layer. The whole system has under 0.9M network parameters, needs no GPU and no PyTorch, and is trained from scratch, so no Indra model weights are included.
| Folder | Use it for | Status |
|---|---|---|
v0.1/ |
Printed Nepali and English: scans, newspapers, PDFs | Released 12 Nov 2026 |
v0.2/ |
Handwriting, notebooks, phone photos (same print quality as v0.1) | Candidate, 13 Nov 2026 |
Results on locked test sets
These are full-system scores: line finder, reader and language model together. Lower is better. Both versions were scored on the same items, and the test sets were never used for training or tuning.
| Test set | v0.1 CER / WER | v0.2 CER / WER | Indra OCR 0.3.2 (2.19M params) |
|---|---|---|---|
| Sarvam real Nepali documents (437 blocks, expert labels) | 4.76% / 15.5% | 4.92% / 16.6% | 21.59% / 66.1% |
| Sarvam real English documents (299 blocks) | 6.34% / 16.7% | 6.23% | 7.21% / 20.3% |
| Gorkhapatra newspaper lines | 0.37% | 0.35% | β |
| Handwritten lines (92 unseen writers) | 5.28% | 5.33% | β |
| Real phone photos of handwriting (610 lines, 27 pages) | 16.71% / 61.0% | 10.25% / 32.9% | β |
The Indra column header used to say 1.24M parameters. That counts Indra's recogniser only; the whole 0.3.2 system has 2,194,533 (the current 1.1.2 has 3,607,673).
Compared with other OCR systems (measured 24 Nov 2026)
Every system below was run on the same items and scored with one scorer (ocr-tech score_blocks.corpus_metrics β eval_metrics.evaluate: Unicode NFC, whitespace runs collapsed to one space, no case folding, micro CER over all items, empty outputs kept). Parameter counts come from the weights (ONNX initializers, safetensors headers or the loaded model), not from marketing numbers. CER % / WER %; lower is better. A CER above 100% means the system wrote more wrong characters than the reference has (wrong script, hallucination or repetition loops).
| System | Parameters | Devanagari handwritten words, IndicScan (835) | Nepali handwritten words, h1 (871) | Sarvam real Nepali documents (437) | Sarvam real English documents (299) |
|---|---|---|---|---|---|
| sanoOCR v0.2 | 873,889 | 15.4 / 44.4 | 13.6 / 34.8 | 4.71 / 15.2 | 6.05 / 15.7 |
| PP-OCRv5 Devanagari mobile | ~2.0M (rec) | 25.1 / 64.4 | 40.7 / 81.3 | 11.7 / 39.4 | 3.86 / 9.9 |
| Indra OCR 1.1.2 | 3.61M | 96.4 / 100.4 | 81.3 / 97.1 | 27.3 / 44.8 | 4.88 / 10.6 |
| Indra OCR 0.3.2 | 2.19M | 97.0 / 101.4 | 81.0 / 97.8 | 24.8 / 65.6 | 8.54 / 22.0 |
| Tesseract 4.1.1 (nep/hin/eng) | not counted | 83.3 / 122.5 | 80.6 / 104.0 | 4.32 / 11.8 | 4.48 / 11.5 |
| Surya 2 (better of 2 modes) | 686M | 45.2 / 74.9 | 166.1 / 209.4 | not run | not run |
| PaddleOCR-VL-1.6 | 906M | 110.9 / 105.9 | 143.1 / 104.4 | 55.4 / 86.2 | 1.49 / 6.3 |
| GLM-OCR | 1,107M (loaded) | 124.3 / 133.3 | 137.9 / 134.4 | 104.3 / 128.6 | 1.43 / 6.4 |
| Qwen3-VL-4B-Instruct | 4,438M | not run | not run | 16.05 / 43.2 | 1.24 / 4.2 |
What this shows:
- Size. sanoOCR's networks are about 1,270Γ smaller than GLM-OCR, about 1,040Γ smaller than PaddleOCR-VL, and 2.5β4Γ smaller than Indra OCR. The optional character 7-gram LM (
lm.npz) is a lookup table, not a network, and is not counted. - Handwriting. On both handwriting sets sanoOCR has the lowest error, 3β10Γ lower than every large model tested. The large models mostly emit the wrong script (Bengali, Tibetan), LaTeX or loops on Devanagari handwriting.
- Printed Nepali. Tesseract 4.1.1 is slightly better (4.32% vs 4.71%; per block sanoOCR wins 192, Tesseract 167, 78 tie). Every neural system tested, small or large, is behind sanoOCR.
- Printed English. The large vision-language models are about 4Γ better than sanoOCR (1.2β1.5% vs 6.05%). Tesseract and Indra 1.1.2 are also ahead.
Caveats:
- Both handwriting sets are single-word crops; large VLMs are built for pages. Upscaling 200 h1 crops did not help GLM-OCR (121% vs sanoOCR 13.3% on the same 200). Large models were run with their documented default prompts and greedy decoding; no prompt tuning or Nepali hint.
- h1 is v0.2 practice data (its training pages may overlap); IndicScan is a separate source and the cleaner comparison.
- On a silver set of 40 real NHD phone-photo pages (references are unreviewed machine drafts, not claim-grade), sanoOCR scores 29.6% CER; Indra 1.1.2 82.9%, Tesseract 86.2%, GLM-OCR 234.9% (10 pages).
- The Sarvam numbers here differ from the locked-test table above (sanoOCR 4.71% vs 4.92%, Indra 0.3.2 24.84% vs 21.59%): the scorer used for that table was not found, so this table re-scores every system with one scorer. Quote this table when comparing systems.
- The card's own handwriting sets (610 phone-photo lines, 92-writer lines) were not available on the hosts searched, so those rows were not re-run.
- Not compared yet: Chandra OCR 2 (handwriting-focused, 5.3B; licence restricts competing use), Google Cloud Vision, Azure.
- Indra and Surya weights are under Datalab's modified OpenRAIL-M licence (competing-use clause); they were run for evaluation only. Check that licence before publishing these numbers.
Hardware: sanoOCR, Indra and Tesseract on CPU; GLM-OCR, PaddleOCR-VL and Qwen3-VL on a Tesla T4; Surya on Apple silicon (llama.cpp). Per-system details, revisions and per-item examples are in the benchmark report kept with the project (Ampixa/sanoOCR β bench/).
Which one to use: v0.2 is better on phone photos and notebooks. On paired comparisons it wins on 23 of 27 pages, by 4.8β8.1 points. Elsewhere the two are within about 0.2 points of each other. v0.1 is marginally better on clean Nepali print.
Run
hf download ampixa/nepali-tiny-ocr --revision v0.2 --local-dir nepali-tiny-ocr
cd nepali-tiny-ocr/v0.2 # or v0.1
pip install -r requirements.txt # numpy, opencv-python-headless, onnxruntime, pypdfium2==4.30.0, regex
python ocr.py page.png # printed page or block
python ocr.py letter.jpg --mode handwriting
python ocr.py document.pdf --json # per page: text layer or OCR, text, time
python ocr.py page.png --no-lm # faster; better on clean digital print
From Python: from ocr import OCR; o = OCR(mode="print"); o.image(gray_uint8)["text"], or o.pdf(path).
In the browser: a JavaScript port of the whole v0.2 pipeline runs on onnxruntime-web (WASM), with no server inference; images stay on the device. It gives identical text and boxes to ocr.py on 544 of 544 test lines (11 pages, both modes, LM on and off). It needs 18.6 MB to read a page (7.1 MB gzipped); the LM is an optional 63 MB download. Example: a 29-line phone photo of a handwritten notebook page is found in about 100 ms and read in about 850 ms with the LM (4 WASM threads, Apple silicon). Source: Ampixa/sanoOCR β web/ (weights not included).
Speed (one CPU thread): about 58 ms to find the lines on a page, then about 1.4 ms to read each line. The language model adds about 21 ms per line. A scanned A4 page takes about 0.6 s on two threads.
What is inside each folder
| File | What | Size |
|---|---|---|
models/rec_fp32.onnx |
Line reader, 814,143 parameters (v0.1: s_pdf_bal, v0.2: s_rule_photo) |
3.3 MB |
models/rec_int8.onnx |
The same reader in 8-bit (loses part of the gain on worn print and handwriting) | 1.1 MB |
models/det_fp32.onnx, det_hw_fp32.onnx |
Line finders for print and handwriting, 59,746 parameters each | 0.25 MB each |
models/lm.npz |
Character 7-gram language model | 69 MB / 78 MB |
ocr.py and the other .py files |
The pipeline: find lines β reading order β straighten β read β drop unsure lines β language model | |
third_party/indra_ocr/ |
Two Apache-2.0 code modules from Indra OCR (text-layer reading, syllable checks), with their LICENSE |
Each folder's own README.md has the details. Note that the v0.2 README predates its locked-test run; the results above replace its "not yet run on the locked test sets" line. SHA256SUMS lists checksums for every file.
Known limits
- Old, worn letterpress and dictionaries are the main remaining source of errors on printed documents.
- Handwriting mode assumes A4 scans about 2,500 px wide.
- Dense tables may be read column by column.
- English print: large vision-language models are about 4Γ more accurate (see the comparison above).
- English handwriting is not supported yet (a quick test on a notebook photo returned Devanagari digits).
- Full-page phone photos of real notebooks are still rough (about 30% CER on a silver set of 40 pages).
Training data and licences
The models were trained from scratch on synthetic lines made from OFL fonts and Wikipedia text (CC BY-SA), Gorkhapatra newspaper lines (full-use licence), handwriting datasets with licences confirmed by the project, and DHCD digits (CC BY 4.0). Internal use only. Check the data licences before any external release.
The full training archive (all runs, data and reports) is kept separately as private repos under prosperious.