Arjuna-OCR [Te&En] β Telugu + English document OCR
Three ONNX models for reading printed Telugu and English documents: a layout model, a text detector and a Telugu+English CTC recognizer. CPU only, no GPU and no language model.
The recognizer is new work. The layout model and the detector are reused unchanged from anandkaman/arjuna-ocr-kn-en and were validated on Telugu pages before reuse.
Measured accuracy
A frozen test of 200 real line crops from 12 held-out books β books that appear in no part of training, in any form.
| slice | lines | CER | character accuracy | lines fully correct |
|---|---|---|---|---|
| all | 200 | 3.95 | 96.05 % | 48.0 % |
| Telugu | 168 | 4.13 | 95.87 % | 38.1 % |
| English | 9 | 0.00 | 100.00 % | 100.0 % |
| 24β32 px | 81 | 3.43 | 96.57 % | 40.7 % |
| 32β48 px | 83 | 3.98 | 96.02 % | 53.0 % |
| 48+ px | 30 | 6.66 | 93.34 % | 50.0 % |
Measured with predict_te.py as shipped β one crop at a time, which is how you will run it. Scoring the
same model in padded batches gives 4.08; the difference is the white padding a batch adds, and the
single-crop number is the one that describes what you get.
The English figure rests on 9 lines and 209 characters. It is reported because leaving it out would be worse, but it is not enough evidence to claim an English accuracy, and a larger real English set is the next piece of work. The synthetic English validation set is larger (419 lines, ~95 % line accuracy) but synthetic results have not transferred to real pages on this project.
Known weaknesses, measured
| isolated single words | 89.1 % character accuracy, against 96.4 % for 4β7 word lines β an isolated token gives a CTC reader no context |
| whitespace | 28 % of all edit operations are spacing alone; some lines are read perfectly and still score an error |
| Telugu numerals | a digits-only line is sometimes emitted empty (n=3 in the test set). ASCII digits are 98.5 % accurate with none dropped |
| visually similar pairs | ΰ°¦/ΰ°‘, ΰ°΅/ΰ°ͺ, ΰ°Έ/ΰ°¨ are the most common substitutions |
Use
pip install onnxruntime opencv-python-headless
python predict_te.py line_crop.png # one line crop -> text
python predict_te.py crops/*.png --json
predict_te.py is self-contained and reproduces the evaluated path exactly (verified line by line
against the scored predictions). It takes line crops, not whole pages.
For whole pages β layout analysis, detection, reading order, tables, Markdown/hOCR/ALTO output β use the published runtime, which drives all three models:
pip install arjuna-ocr
Files
models/rec/arjuna_rec_te.onnx Telugu+English recognizer, SVTRv2-B + merged LoRA, 206-class CTC
models/rec/charset_te_v2.json the 206 classes in head order
models/rec/charset_te_v2_META.json normalisation map and per-class corpus frequencies
models/det/inference.onnx text detector (PP-OCRv6 lineage), reused from the Kannada release
models/layout/arjuna_layout_v15.onnx layout model, 15 classes β AGPL-3.0, see models/layout/NOTICE.md
predict_te.py self-contained recognizer inference
MANIFEST.json sha256 of every model file
Licensing
The recognizer and predict_te.py are Apache-2.0. The layout model is AGPL-3.0 (DocLayout-YOLO
lineage) β see models/layout/NOTICE.md and models/layout/LICENSE-AGPL-3.0.txt. If that licence does
not suit you, the recognizer and detector work without it.
Training
The recognizer is SVTRv2-B with merged LoRA/ConvLoRA adapters and a 206-class CTC head, trained on a synthetic Telugu+English corpus (~398k lines, 53 typefaces) mixed with real labelled book lines at 0.85/0.15. Training renders from a 150-DPI point of view and normalises every crop to 32 px high.
Contact: kamananand98@gmail.com