/ Модель

Характеристики

Лицензия
Apache 2.0
Библиотека
onnxruntime
Опубликована
16 сен 2026

arjuna-ocr-kn-en

Описание изображенийИзображение → текст

Arjuna-OCR — система на базе ONNX для распознавания текста и структуры печатных документов на каннада и английском языке.

0скачиваний за 30 дней1лайквеса обновлены4 окт 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Arjuna-OCR [Kn&En] v1.2.1 — система распознавания печатных документов на каннада и английском языке, разработанная Anand Kaman. Она объединяет модель анализа макета Arjuna layout v12, детектор строк на основе PP-OCRv6 и распознаватель SVTRv2-B с CTC-головой на 221 класс. Система обрабатывает изображения документов и сканы, а также PDF, извлекая текст и структуру страницы: порядок чтения, абзацы, заголовки, таблицы, печати, иллюстрации и области удостоверений личности. Результат можно получить в форматах JSON, Markdown, обычного текста, hOCR, ALTO и TSV.

Модель предназначена для распознавания записей о регистрации и доходах, официальных вестников и циркуляров, книг, газет, учебников и цифровых PDF. По данным README, качество на тестах варьируется в зависимости от набора, а для запуска доступны TensorRT, CUDA и CPU через ONNX Runtime. Репозиторий описывает архивную версию v1.2.1; текущая версия, по README, распространяется отдельно как anandkaman/arjuna-ocr-kn-en-inference. Лицензия — Apache-2.0.

Ограничения включают снижение точности на очень мелком или факсовом английском тексте, термопечати и точечно-матричных чеках, старой печати на каннада, плотных таблицах с десятью и более столбцами и незнакомых типах макета. Рукописный текст, печати и просвечивание бумаги могут распознаваться с низкой уверенностью; другие индийские письменности модель надёжно не поддерживает.

Сценарии применения

  • распознавание каннада и английского текста в сканах документов
  • извлечение текста из PDF, газет и книг
  • распознавание регистрационных и доходных записей
  • извлечение структуры таблиц и порядка чтения страницы
  • оцифровка официальных вестников и циркуляров

Ограничения

Точность ниже на очень мелком и низкокачественном английском тексте, термо- и точечно-матричной печати, старых шрифтах каннада и плотных многоколоночных таблицах. Рукопись, печати, просвечивание и другие индийские письменности могут давать низкоуверенный или ошибочный результат.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Arjuna-OCR [Kn&En] v1.2.1

This repo documents v1.2.1 (layout v12). The current release is v1.3.3 (layout v15) and ships from anandkaman/arjuna-ocr-kn-en-inference — the benchmarks below were measured on v1.2.1 and have not been re-run for v1.3.x.

Try it: live demo (CPU, images or the first 2 pages of a PDF).

Layout-aware OCR for printed Kannada and English documents — registration and revenue records, gazettes and circulars, books, newspapers, textbooks, born-digital PDFs and scans.

  • 98.8 % word accuracy on the held-out private document set (Kannada 98.0 %, English 99.5 %); 96.3 % on the public Mozhi Kannada benchmark, 93.7 % on MILE, 97.2 % on English PDF text; 96.3 % on 1890s dictionary / maths-textbook / 1900s print pages (v1.0: 84.9 %)
  • 12.8 pages/s on one RTX 5060 Ti with TensorRT at ~50 % GPU load and 3.3 GB VRAM (120 ms per page in single-page mode); CUDA and CPU fallbacks
  • Outperforms Surya OCR 1 on Kannada/English documents — 0.991 vs 0.929 word F1 on clean private-document pages, 0.872 vs 0.751 on unseen public MILE pages, at ~18× the throughput (see below)
  • v1.2.1: the text detector no longer boxes Kannada conjuncts as separate words — fragment marks drop 60 % on registration records, 99 % on 1900s print and 81 % on unseen Kannada books, and page CER improves to 3.1 %
  • v1.2: a layout model trained on Kannada/English documents (tables found 20/20 vs 15/20 on the frozen pages, ID-card panels and handwriting as their own block types), and a recognizer pass on dates, long numbers, alphanumeric codes and ₹ amounts — see docs/RELEASE_NOTES.md
  • Reading order, paragraphs, titles, tables (rows / cells), seals, figures, ID panels and handwriting regions; output as JSON, Markdown, plain text, hOCR, ALTO or TSV
  • Every line carries a confidence, the confidence of its weakest character and review flags — nothing is silently dropped or rewritten

What is inside

stagemodelrole
LayoutArjuna layout v12 — DocLayout-YOLO fine-tuned on Kannada/English document pages (v1.2)blocks: text, title, table, figure, seal, ID-card panel, handwriting, header, footer. Next: more document layouts — forms, invoices, registers, letters, slides.
Text detectionArjuna det v1.2.1 — PP-OCRv6 det fine-tuned for Kannada conjunctsline boxes; below-baseline vattus stay with their line instead of becoming separate "words"
Text recognitionSVTRv2-B + Kannada/English language pack221-class CTC head: ASCII, Kannada block, document and maths symbols. Next: more language packs, and more dual-language pairs built the same way as Kn+En.
Assemblerrule-freerow clustering, ruled-grid tables, serialisation to the output formats

All three models ship as ONNX and run on ONNX Runtime. TensorRT is the fast path (fp16 engines, validated engines for RTX 5060 Ti included, rebuilt automatically on other GPUs); CUDA and CPU providers work without TensorRT at lower speed. The PyTorch language pack (pytorch/kanen_pack_e5.pth) is included for training, fine-tuning and evaluation with the training code — it is not needed for inference.

Just want to run it?

pip install arjuna-ocr     # models download on first use
arjuna doctor && arjuna ocr page.pdf -o out/

The ready-to-deploy package — self-configuring, with Docker images and a Hugging Face Inference Endpoints handler — lives in anandkaman/arjuna-ocr-kn-en-inference. This repository is the archive: every release, the full evaluation record and the training story.

Install (from this repository)

Python 3.10–3.12, NVIDIA GPU with a CUDA 12 driver (the CPU provider works everywhere, ~40× slower).

git clone https://huggingface.co/anandkaman/arjuna-ocr-kn-en && cd arjuna-ocr-kn-en
pip install -e .              # ONNX Runtime GPU + CUDA/CPU providers
pip install -e ".[trt]"       # + TensorRT 10.16 (recommended: ~13 pages/s vs ~4.6 on the CUDA provider)
pip install -e ".[server,pdf]"  # optional: HTTP server, PDF input
python prepare_engines.py     # once per machine: builds / validates the TensorRT engines (~4 min; instant on RTX 5060 Ti)
python check_parity.py        # runs the 5 sample pages and compares with the reference output

Windows (tested on i9 / RTX 5060 Ti): same packages, set KANEN_TRT=1 — see docs/WINDOWS.md. CUDA / cuDNN / TensorRT details: docs/USAGE.md.

Quick start

No install: the demo Space runs this model on CPU (about a minute per dense page; upload images or a PDF, first 2 pages).

Command line:

arjuna-ocr --input scans/ --out-dir out/ --format json,md          # file, directory, glob or PDF
arjuna-ocr --input "private documents/*.png" --out-dir out/ --format all --page-batch 8 --workers 8
arjuna-ocr --input report.pdf --out-dir out/ --format txt --provider cuda

Python:

from kanen_infer.api import KanEnOCR
ocr = KanEnOCR()                                   # loads config, models and engines; ocr.ready() shows the provider per model
doc = ocr.page("scan.png")                         # one document: blocks -> lines (text, confidence, min_conf, bbox, flags), tables -> rows/cells
docs = ocr.pages(["p1.png", "p2.png"], page_batch=8)
boxes = ocr.detect(image)                          # detection only
texts = ocr.recognize(line_crops)                  # recognition only: [(text, confidence, min_conf), ...]
from kanen_infer.formats import to_markdown, to_text, to_hocr, to_alto, to_tsv

HTTP: python serve.py --port 8000 → POST /ocr (one image), POST /ocr/batch, GET /health.

Output

One kanen-ocr/1.0 JSON document per page: blocks[] in reading order (type, bbox) → lines[] with text, confidence, min_conf (weakest character), bbox, script and flags; tables carry rows[].cells[]; page.text is the plain reading-order text; model records the model hashes and pipeline version. Flags route lines to human review: low_conf (< 0.90), check (0.90–0.98), weak_char (min_conf < 0.5), script_mix, oversize, in_seal, in_figure. Calibration: lines with confidence ≥ 0.99 are 97.7 % exact (44 % of lines). Markdown, text, hOCR, ALTO and TSV are serialisations of the same document — format details in docs/USAGE.md.

Accuracy

Held-out validation set (in-house, frozen before model selection, labels verified line by line)

setlanglinesCERword accuracyline exact
Private documents (40 pages)kn + en1,3240.1798.8 % (kn 98.0 / en 99.5)95.4 %
Modern Kannada books & journalskn1500.5295.6 %86.0 %
Archive scans 1894–2023kn5181.1492.8 %77.6 %
1890s dictionary, Kannada-medium maths, 1900s printskn + en6180.4796.3 %89.8 %
English PDF texten1,5000.4997.2 %88.3 %
Digit-dense lines: dates, amounts, IDs (new in v1.2)kn + en6150.4097.7 %94.5 %

End-to-end on the 40 private-document pages: word precision / recall / F1 0.965 / 0.970 / 0.967, detection F1 0.952, corpus page CER 3.1 % (median 1.4 %), reading-order τ 0.956, table regions found 20/20 (v1.1: 15/20), orientation (0/90/180/270) recovered on every page with printed text. Full report: docs/QC_REPORT.md. How the data and the evaluation sets were built: docs/DATA_AND_EVALUATION.md.

Public benchmarks (docs/PUBLIC_BENCHMARKS.md, with per-benchmark error analysis)

benchmarklangnword accuracynote
Mozhi test (IIIT-Hyderabad printed Kannada)kn9,83896.3 %v1.1: 96.0 %, v1.0: 96.6 %
MILE (IISc Kannada document pages, old print)kn6,05193.7 %v1.1: 93.6 %
SROIE 2019 receiptsen19,36683.6 % case-insensitive57.1 % under the raw upper-cased labels; ~92 % after normalising benchmark-specific label conventions (analysis in the report)
FUNSD word crops (fax-quality forms)en8,70781.5 %v1.1: 81.0 %; errors concentrate at ≤ 11 px x-height — still the English gap

None of these test splits were used for training or model selection.

Compared with Surya OCR 1

Same 17 unseen pages through both systems on the same RTX 5060 Ti, scored against verified word-level ground truth with the same scorer. Arjuna-OCR vs Surya OCR 1

pagesSurya OCR 1Arjuna-OCR v1.1Arjuna-OCR v1.2.1
10 clean private-document pages (frozen test), word F10.9290.9870.991
dense fee-table page0.6850.8120.880
stamped, low-contrast page0.7760.9310.889 (page CER 8.0 % → 1.9 %)
5 public MILE (IISc) book pages, never seen by either model0.7510.8470.872
throughput on one RTX 5060 Ti0.37–0.76 pages/s, 4.2 GB13.6 pages/s (v1.1)12.8 pages/s, 3.3 GB

Surya's inline markup was stripped before scoring so only characters count; Surya wins two of the five MILE pages individually and collapses on three, Arjuna stays between 0.78 and 0.90 on all of them. v1.2 recognises the same words as v1.1 on the fee-table and stamped pages (identical word hits); the lower page scores come from the scorer's handling of lines that the new layout joins across skipped handwriting regions. Method and per-page scores: docs/COMPARISON_SURYA1.md. Surya OCR covers 90+ languages — this comparison is only about printed Kannada/English documents.

Performance (RTX 5060 Ti, 150-DPI pages)

configurationpages/s
TensorRT fp16, all three models, page batch 812.8 on the 40 frozen pages, warm (v1.2: 13.3, v1.1: 13.6) — measured at ~50 % GPU utilisation and 3.3 GB VRAM on a 4-core host: the CPU side is the limit, the GPU has headroom
TensorRT, single-page latency mode8.3 (120 ms / page)
CUDA provider, no TensorRT4.6
Outputs are identical across page batch sizes for printed text; only handwriting fragments can differ.

Known limitations (v1.2.1)

  • Very small or fax-quality English text (≤ 11 px x-height) and dot-matrix / thermal receipts lose accuracy.
  • Historical Kannada (old typefaces, letterpress) is strong but below modern print; residual errors are archaic glyph confusions and spacing conventions of letter-spaced type. Kannada digits are the weakest class.
  • Dense multi-column tables (10+ columns) and unruled form boxes are emitted as text lines without cell structure; ruled fee tables and small tables are reconstructed reliably.
  • The layout model is a first version trained on 174 pages of the target document families (registration and revenue records, forms, gazettes, assembly records, books, newspapers, textbooks, ID cards). On other families (invoices, letters with letterheads, ledgers, slides, photographed pages) expect blocks to be typed less reliably; text lines are unaffected because detection and recognition do not depend on the layout model. Blocks spanning the whole page are handled by a second reduced-scale pass. A broader, DETR-based layout model is the planned v1.3 item.
  • Handwriting, stamps, seals, bleed-through produce low-confidence output rather than nothing — use the flags for review gating.
  • Line splitting on very old print is much reduced but not gone (v1.2.1 fine-tuned the detector for Kannada conjuncts: fragment marks −60 % on records, −99 % on 1900s print, −81 % on unseen books). What remains are pieces at the very start or end of a line that fall outside the line box; on letter-spaced or letterpress faces the detector can still split a line at wide gaps or cut off a detached vattu, and the recognizer then reads fragments without context. Only the recognizer is trained for Kannada in this release. The verified line boxes shipped with the training data are ready for detector fine-tuning — you can do it, or ask the author to (see Contact & sponsorship).
  • Other Indic scripts: ~90 % of foreign-script lines now produce no text; the rest come out as flagged garbage. Remaining out-of-charset symbols (superscripts, ∅ ⊂ ≈ →) map to the nearest known glyph.

Versions

  • v1.2.1 (this release, main, tag v1.2.1): the text detector was taught, using its own output as the label, to stop marking Kannada conjuncts as separate words. End-to-end word F1 0.9636 → 0.9672, page CER 3.67 % → 3.11 %, detection F1 0.934 → 0.952; ID-card and table short fields verified unchanged (538/553 words vs 537/553). Recognizer and layout identical to v1.2. docs/DETECTOR_V121.md.
  • v1.2 (tag v1.2): recognizer E5 (dates, long numbers, codes, ₹ amounts; +2,266 real digit-dense lines), first Kannada-aware layout model (9 classes incl. id_panel / handwriting), assembler column-gap and nested-block rules, layout engine self-test against reference boxes. docs/RELEASE_NOTES.md.
  • v1.1 (tag v1.1): recognizer ONNX md5 in every output's model, charset 221 classes. Adds kn4 (newspapers, magazines, textbooks, assembly records, RTC) and kn5 (1890s dictionary, Kannada-medium maths, 1900s prints) training slices, maths symbols, italic-serif and fax-degradation synthesis, other-script rejection, and the weak_char / script_mix / oversize review flags. Equal to v1.0 on private documents, +11 points on old dictionary/maths pages, +0.5 on archive scans; −0.5 on Mozhi and −0.8 on FUNSD word crops.
  • v1.0 (tag v1.0): training run E4, 213 classes — the first production release.
  • Same output schema across versions (kanen-ocr/1.0); charset_md5 differs between v1.0 and v1.1/v1.2; model.layout is arjuna-layout-v12 from v1.2 (pp-doclayoutv3 before). Block type raw_type values changed with the new layout model.

Contact & sponsorship

Arjuna-OCR is built and maintained by one person. For datasets, custom OCR / translation / document models, or to sponsor the next versions (more Indic scripts, table structure, a compact vision-language OCR model), open a discussion on this repo or write to kamananand98@gmail.com.

Data & licences

Licences. Package code, recognizer and text detector: Apache-2.0 (top-level LICENSE). The v1.2 layout model models/layout/kanen_layout_v12.onnx is AGPL-3.0 (models/layout/NOTICE.md, LICENSE-AGPL-3.0.txt): it was fine-tuned from the Apache-2.0 DocLayout-YOLO DocStructBench weights with the AGPL-3.0 doclayout_yolo toolkit (Ultralytics YOLO lineage), and we follow that lineage rather than argue about it. No toolkit code ships here (inference is ONNX Runtime); if AGPL does not suit your deployment, run with layout.mode: never or plug in another layout model. Base models: PP-OCRv6 det (PaddleOCR, Apache-2.0), SVTRv2 (OpenOCR, Apache-2.0); v1.0/v1.1 used PP-DocLayoutV3 (Apache-2.0). The language pack was trained on synthetic renders (OFL / GPL-font-exception / Apache fonts), the Mozhi Kannada dataset, public English PDFs and SROIE, public-domain Kannada scans from archive.org, and private registered-private-document scans (verified labels; not included — they contain personal data). No test page appears in training. Code, pack and engines: Apache License 2.0.

Citation

@software{arjuna_ocr_2026, title = {Arjuna-OCR [Kn&En]: layout-aware Kannada + English document OCR}, author = {anandkaman}, year = {2026}, version = {1.2}, url = {https://huggingface.co/anandkaman/arjuna-ocr-kn-en}}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · onnxruntime

Нельзя запустить

Модель выложена только в формате ONNX.

Ревизия весов
32c2519

0 моделей