Orus-OCR-0.1
Small, CPU-fast OCR for Bangla, English, and mixed Bangla+English pages β handwriting first. For each page it returns the language (bn / en / bn+en), whether it is handwritten (Yes/No), and the text with its structure (line breaks, indentation, blank lines). Text inside photos and charts is ignored.
| Recognizer | 1.06M-parameter CTC line recognizer (Indra OCR 1.1 architecture, warm-started from Indra), 211 characters (Latin + Bengali block + typographic marks) |
| Pipeline size | β 8.4 MB loaded (det.onnx 0.39 + orus_rec.onnx 4.27 + orus_lm.npz 3.19 + orus_pic.onnx 0.16 + v2_teff.onnx 0.40) |
| Speed (4 CPU threads) | 1.3β11.7 ms per line; 130β430 ms per page, within β20% of Indra OCR 1.1 |
| Line CER | Bangla handwriting 6.9β16.2% (unseen source 25.8%); English handwriting 12.4β19.0%; printed 4.4β4.6%; prescriptions 6.9% |
| vs Indra OCR 1.1 | Bangla handwriting 6.9% vs 84.6% (BN-HTRd); English handwriting 12.4% vs 18.7% (IAM) |
Use
pip install onnxruntime opencv-python numpy rapidfuzz indra-ocr torch timm
# torch and timm are only needed for the handwritten flag (MEAN/STD/page_score in orus/train.py);
# inference runs fully on CPU through ONNX Runtime.
python run.py page.jpg # language, handwritten Yes/No, structured text
python run.py page.jpg --json # lines with boxes and confidence, timings
python run.py --demo # self-check (rendered mixed page; expects CER < 5%)
Python:
import sys; sys.path.insert(0, "orus")
from ocr import OCR
r = OCR(release=".")("page.jpg")
print(r["language"], r["handwritten"]); print(r["text"])
for line in r["lines"]:
if line["conf"] < 0.8: ...
# unreliable-line cue: conf >= 0.95 has 1-4% CER, < 0.6 has 27-87%
Every line comes back with a confidence value: at 0.95 and above the error rate is 1β4%, and below 0.8 the line is better treated as unreliable.
Where it struggles
Similar-letter confusions (o/a, r/n, ব/ΰ¦°, ল/ন), Bangla conjuncts, digits and punctuation (27β71% wrong inside those classes), receipts and dot-matrix print, and Bangla handwriting from sources it has never seen.
Repository layout
| Path | What |
|---|---|
README.md |
this model card |
LICENSE |
MIT License (Non-Commercial) |
run.py |
top-level wrapper that loads the weights from this repo root |
det.onnx |
line detector (Indra OCR 1.1, upstream) |
orus_rec.onnx |
Orus line recognizer, fp32 (INT8 is not shipped: it loses 7β10 CER points on handwriting) |
orus_rec.pt |
same weights, PyTorch checkpoint (for retraining only) |
orus_lm.npz |
order-5 character LM (Indra npz format), used on low-confidence lines |
orus_pic.onnx |
picture-region net (drops text inside photos/charts) |
v2_teff.onnx + v2_teff.json |
handwritten / printed page classifier + threshold |
MD5SUMS |
file checksums (verify with md5sum -c MD5SUMS) |
orus/ |
frozen inference code: ocr.py (pipeline), ocr_model.py (network), ocr_pic.py (picture net), tiles.py and train.py (handwritten-flag input) |
fonts/ |
the Bangla font the --demo self-check renders with (SIL OFL 1.1, see fonts/OFL.txt) |
inference/ |
the same entry point, kept for convenience |
License
Released under MIT License (Non-Commercial) β see LICENSE.
The released
det.onnxcomes from Indra OCR (datalab-to/indra-ocr, modified OpenRAIL-M: research and small-company use; commercial use is not granted by the upstream). Training used research-only datasets (IAM, BanglaWriting, IMGUR5K, IIIT, BN-HTRd, GNHK, CORD, Swapnil and Doctor's prescriptions); consult each dataset's license before redistribution.
Citation / source
This model is the Orus-OCR-0.1 public release accompanying the source code at https://github.com/MahirHamiAbrar/Orus-OCR-V0.
- Model on HuggingFace: https://huggingface.co/mhabrar/Orus-OCR-V0
- Code on GitHub: https://github.com/MahirHamiAbrar/Orus-OCR-V0