/ Модель

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

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

arjuna-ocr-hi-en

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

ONNX-модель Anand Kaman для распознавания печатных документов на хинди и английском с анализом структуры и порядка чтения.

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

Бенчмарки

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

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

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

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

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

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

Arjuna-OCR [Hi & En] v1.1 — разработанная Anand Kaman модель для распознавания печатных документов на хинди письмом деванагари и на английском. Конвейер включает детектор, анализ структуры страницы, распознаватель и сборщик текста; веса опубликованы в формате ONNX, предусмотрен дополнительный путь запуска через TensorRT. Модель определяет порядок чтения и структуру абзацев, заголовков, таблиц, печатей, иллюстраций и областей с рукописным текстом, а результат может быть представлен в JSON, Markdown, обычном тексте, hOCR, ALTO или TSV.

Модель предназначена для оцифровки печатных документов, включая регистрационные и финансовые записи, формы и многостолбцовые страницы. Для строк выдаются оценки уверенности и флаги проверки. В README приведены результаты тестирования на хинди и производительность на RTX 5060 Ti; часть оценок получена на единственном публичном бенчмарке, который также использовался при обучении. Лицензия — Apache-2.0.

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

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

  • распознавание печатных хинди-документов в деванагари
  • извлечение текста из английских документов
  • оцифровка регистрационных и финансовых записей
  • распознавание таблиц и многостолбцовых страниц
  • экспорт результатов OCR в JSON, Markdown, hOCR, ALTO или TSV

Ограничения

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

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

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

Открыть на Hugging Face

Arjuna-OCR [Hi & En] v1.1

v1.1.3: adds the row-structure fallback and mislabelled-panel re-typing; recogniser weights are unchanged, and these changes are not re-benchmarked.

What's new in v1.1.0 — layout v15

No recognised word is ever dropped from the page text. Measured on held-out pages of private documents: every word the recogniser read also appears in doc["text"] — assemble.suppress_text_in is now empty, and lines keep their in_seal / in_handwriting / in_figure flags so a consumer can filter without data loss.

The layout model gains six classes v1.0 could not express — section_header, list_item, caption, footnote, formula and barcode. barcode matters most: without it a stamp panel could only be called figure, and suppressing that figure removed real text. Three reading-order defects in the assembler are also fixed (column ordering was silently disabled by any centred running header; the column-order routine was unreachable; and a full-width block could absorb both columns of a two-column page).

Layout-aware OCR for printed Hindi (Devanagari) and English documents. Detector -> layout -> recognizer -> assembler, shipped as ONNX with an optional TensorRT path. Sibling of anandkaman/arjuna-ocr-kn-en, with which it shares the detector and layout model.

  • Reading order, paragraphs, titles, tables, seals, figures, ID panels and handwriting regions
  • Output as JSON, Markdown, plain text, hOCR, ALTO or TSV
  • Every line carries a confidence, its weakest character's confidence and review flags — nothing is silently rewritten
  • 9.99 pages/s on one RTX 5060 Ti with TensorRT (54 dense pages, ~40 lines/page); CUDA and CPU fallbacks

Results

Public benchmark — Mozhi Hindi test, the dataset's own unmodified labels

slicenCERWERword accexact
[2000:] — clean7,5440.652.2397.77 %97.84 %
[:2000] — dev2,0000.842.7597.25 %97.35 %
full split9,5440.702.3697.64 %97.72 %

Read the split honestly. This test set doubles as our development set, and evaluation during training scored only its first 2,000 lines, whose CER influenced checkpoint selection. Lines 2,000-9,543 were never trained on and never used for selection, so [2000:] is the only clean claim; the full-split row is given because published numbers are usually quoted on the whole split. The clean slice scores better than the dev slice, so there is no sign of selection overfitting.

There is only one public Hindi benchmark here, and that is a limitation. himalaya-ai/indic-deva-ocr-eval is in our training mix; vishwam-101/devanagari-ocr-dataset was rejected by our data audit (its rows are long multi-line passages, not line crops).

Private validation — 234 frozen lines, registration and revenue records

Never trained on. Numbers only; the pages and lines are private and are not published.

reference charsnCERexact
1-201070.7493.5 %
21-45461.3278.3 %
46-80370.4183.8 %
81+440.4272.7 %
all2340.5885.0 %

The 1-45 character band carries the form values (plot numbers, amounts, reference codes, dates).

Throughput — one RTX 5060 Ti, 4-core host

configurationpages/slines/s
CPU0.13—
CUDA, no TensorRT engines1.6767
TensorRT, two-fill layout, page_batch 168.9-10.0354-390

TensorRT engines are built on first use. They are built in a background thread by default, so a short-lived process exits before they are ready and silently runs on CUDA — set KANEN_BACKGROUND_TRT=0 to build them up front, or run prepare_engines.py once.

Try it

Live demo — choose Hindi (Devanagari) + English in the sidebar. CPU inference.

Quick start

pip install -r requirements.txt onnxruntime-gpu==1.29.0     # CPU: just requirements.txt
pip install -r requirements-trt.txt                        # optional TensorRT

python run_ocr.py --pages "scans/*.png" --out results.json --markdown out/
python kanen_ocr.py scans/page.png --format md             # CLI
python serve.py                                            # FastAPI on :8000
from kanen_infer.api import KanEnOCR
ocr = KanEnOCR()                       # reads arjuna_hi.yaml next to the package
doc = ocr.page("scans/page.png")
print(doc["text"])

Samples

samples/pages/hindi_sample_synthetic.jpg is a synthetic Devanagari page rendered by this project's own generator from public Hindi text — the real documents this model was tuned on are private registration and revenue records and are not published. samples/reference.json and samples/markdown/ hold its output.

Known limitations

  1. Text inside handwriting, seal and figure blocks is withheld from page text (assemble.suppress_text_in) — a print recognizer fed a signature emits confident nonsense. Guarded since v1.0: a block is only suppressed when the layout model is confident (>= 0.50), the block is small (<= 10 % of the page) and it holds at most 3 recognised lines. Without those guards, 119 of 160 withheld lines across 87 pages were real text (certificate and GRN numbers, dates, registrar seal text) — an e-stamp panel holds emblems, a barcode and a QR code, so the layout model boxed the whole panel as figure at confidence 0.31-0.38. With the guards that falls to 28, and figure no longer appears among suppressed blocks. What remains suppressed is mostly seal text, which the recognizer reads poorly on stamped and curved impressions. A block whose suppression was overridden carries suppression_overridden in the output. All lines stay in blocks regardless.
  2. Layout sometimes cuts one paragraph into boxes that interleave vertically. Every line is then recognised correctly but emitted in block order, which scrambles the page. Mitigated since v1.0.3: assemble.merge_split_blocks_x/y merges same-class blocks that overlap on both axes (x by 0.60 of the narrower box, y by 0.25 of the shorter), so the lines are re-sorted by geometry. Two-column pages, stacked paragraphs and nested seals are never merged. Set merge_split_blocks_x: 0 to disable. The layout model still draws the wrong boxes — this restores reading order, it does not fix the cause.
  3. A leading capital can be dropped after a numbered clause (11. That ... -> 11. hat ...), seen on numbered contract clauses. Under investigation for the next version.
  4. Curly quotes are sometimes emitted as straight quotes.
  5. Combining marks are the dominant error class: over 9,544 held-out lines the model drops 75 marks and invents 46, led by virama, nukta and the i/u matras. This is a known hard class for Devanagari OCR generally, not specific to this model.
  6. Handwriting is not recognised — handwritten regions are detected and flagged, not read.
  7. Anusvara recall is not quoted because part of our label review was done at a magnification we no longer consider adequate; the re-check is not finished.

Training data

Synthetic Hindi/English line images (600k) rendered from Hindi Wikipedia, a domain corpus and templates, plus public Devanagari OCR corpora (darknight054/indic-mozhi-ocr train+validation, himalaya-ai/indic-deva-ocr-eval) and a small set of our own hand-labelled lines from private registration and revenue records. Other-script lines (Bengali, Tamil, Telugu, Malayalam, Gujarati, Gurmukhi, Odia, Kannada, Arabic) are trained with empty targets so the model stays silent on scripts it does not read.

License and attribution

Apache-2.0. The layout model derives from DocLayout-YOLO and carries AGPL-3.0 — see models/layout/LICENSE-AGPL-3.0.txt and NOTICE.md. Base models: PaddleOCR (Apache-2.0), OpenOCR SVTRv2 (Apache-2.0).

Author: anandkaman · kamananand98@gmail.com

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

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

GPU в ailist

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

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

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

Ревизия весов
072bc43

0 моделей