/ Модель

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

Лицензия
Своя лицензия
Библиотека
onnxruntime
Опубликована
28 ноя 2026

Qori-OCR

Описание изображенийИзображение → текст3 профессии
51скачиваний за 30 дней0лайковвеса обновлены28 ноя 2026

Описание модели

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

Компактная модель Hadal Research распознаёт английские слова и короткие строки на предварительно обрезанных изображениях для экспериментов и ограниченных OCR-сценариев.

Qori-OCR — компактная модель распознавания английского текста, разработанная Hadal Research. Она принимает изображения уже вырезанных слов или коротких строк и предсказывает их текст; этапа обнаружения текста нет. Модель обучена с нуля на синтетических и реальных фрагментах текста и использует архитектуру depthwise MetaFormer с блоками внимания, BiGRU и CTC-головой. В опубликованной версии 3,13 млн параметров; доступны графы ONNX, включая динамическую квантизацию int8. По тесту разработчиков динамически квантованная версия достигла точности exact match 69,9% и задержки 9,9 мс на одном ядре x86.

Модель подходит для экспериментов с компактными CTC-распознавателями, распознавания английских слов в ограниченных вычислительных сценариях и как начальная точка для дистилляции. Она ограничена 95 печатными ASCII-символами, не распознаёт акценты и нелатинские письменности, не исправляет наклон или перспективу и рассчитана максимум на 40 символов при ширине входа 320 пикселей. Разработчик сообщает, что точность заметно ниже компактных альтернатив, поэтому модель не предназначена для производственного OCR. Лицензия указана как other; конкретные условия в предоставленных данных не раскрыты.

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

  • распознавание английских слов на обрезанных изображениях
  • чтение коротких строк текста на фотографиях вывесок
  • эксперименты с компактными CTC-моделями OCR
  • создание исходной модели для дистилляции распознавателя

Ограничения

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

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

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

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

Открыть на Hugging Face

Qori-OCR

A 3.13 M-parameter CTC text recogniser for English word crops — released with its benchmark results, including the ones it loses.

Qori-OCR is a from-scratch character-level recogniser trained by Hadal Research on 300k synthetic word crops plus 6,106 real scene-text crops. It is small (3.13 M parameters, 4.05 MB as int8) and it runs in 11.4 ms per crop on a single x86 core. It is not competitive with released compact recognisers on accuracy, and this card says so up front rather than in a footnote: on the identical 5,722-crop benchmark, PP-OCRv6_tiny — 1.11 M parameters, 4.46 MB — is 8.3 points more accurate and runs 2.2× faster.

Read this as a reproducible baseline from a small-data training pipeline, not as a PP-OCR replacement. The full evaluation, error analysis and protocol are in BENCHMARK_REPORT.pdf.

TaskWord / short-line text recognition (no detection)
Architecturedepthwise MetaFormer (RepDW mixers, 4 late attention blocks) + BiGRU neck + CTC head
Parameters3,126,864 (4,492,032 before 30.4% structured pruning)
InputRGB 3×48×320, aspect-preserving, right-padded to a multiple of 8
Outputup to 40 characters from a 96-class charset (95 printable ASCII, case-sensitive)
Decodinggreedy CTC (no lexicon, no beam search)
Training data300,000 MJSynth crops + 6,106 real crops (ICDAR-2015, SVT, IIIT-5K train splits)
Licenceresearch use (see Licence)

Files

FileSizesha256Use
qori-ocr.fp32.onnx11.99 MB01d7af0e6a43a5bb9038c0f484cd13101a2062facea19f5a32200426695e6550fine-tuning, reference accuracy
qori-ocr.dynint8.onnx7.69 MBb98c1c276f70c51bf9cd25252b7e910585fc861e53d86a81050fbbc544d5b11adefault for inference
qori-ocr.qoperator.onnx4.05 MB2e0daf0bf77aa456a075cd7a77e73f3fde7b8766d8bb12a64886dd79c14bdf80smallest; re-measure accuracy on your platform
charset.json1 KB2c48e5ee26ddeae74ac7be6ad83583253d8503b569fd407f0fd52444231fea82index → character map (index 0 = CTC blank)
ocr_infer.py5 KB—tested inference example (preprocessing + greedy decode)
config.json1 KB—architecture and preprocessing parameters

Usage

Only ONNX Runtime, numpy and pillow are required — no torch, no paddle:

pip install onnxruntime numpy pillow
python ocr_infer.py word.png
from ocr_infer import Recognizer

rec = Recognizer("qori-ocr.dynint8.onnx", "charset.json", threads=2)
print(rec.recognize("word.png"))                   # 'HADAL'
print(rec.recognize_batch(["a.png", "b.png"]))     # ['HADAL', 'JOINT']

Preprocessing must match training. Keep the aspect ratio, resize to height 48 (bicubic), clamp width to 320, normalise with mean/std 0.5, pad the right edge with the background value to a multiple of 8, and decode only width // 8 frames of the output. ocr_infer.py does exactly this; copy it rather than re-deriving the transform.

Benchmarks

Measured by Hadal Research on the 5,722-crop held-out set (IIIT-5K 3,000 / SVT 647 / ICDAR-2015 2,075), greedy CTC, no lexicon, accuracy = exact match after lowercasing and stripping non-alphanumerics. Latency = p50, single x86 core, ONNX Runtime 1.23.2, batch 1.

VersionDiskIIIT-5KSVTIC15Allx86 1t
fp32, 4.49 M (as trained)17.19 MB81.877.757.172.416.8 ms
fp32, pruned11.99 MB79.777.353.269.811.6 ms
dynamic int8 (this release)7.69 MB79.777.353.369.99.9 ms
static int8 / QOperator4.05 MB79.576.852.769.5*11.4 ms

*Static int8 is platform-dependent: the same 4.05 MB graph measures 69.5–69.8% on aarch64 and 63.9% on the x86 container used for the training report. The fp32 graph reproduces exactly on both, so the difference is in the quantised kernels, not the model. Measure it before deploying it.

How it compares (same crops, same protocol, same decode)

RecogniserParamsDiskIIIT-5KSVTIC15Allx86 1t
Qori-OCR (int8)3.13 M7.69 MB79.777.353.369.99.9 ms
PP-OCRv6_tiny1.11 M4.46 MB88.581.162.478.25.1 ms
PP-OCRv4_mobile_en1.90 M7.65 MB94.488.473.386.119.0 ms
PP-OCRv5_mobile_en1.94 M7.87 MB95.389.875.687.519.2 ms
PP-OCRv4_mobile_multi2.69 M10.86 MB92.085.967.782.520.9 ms
PP-OCRv5_mobile_multi4.11 M16.63 MB88.681.562.478.321.3 ms
PP-OCRv6_small5.27 M21.16 MB96.592.178.489.425.4 ms
EasyOCR english_g23.78 M15.0 MB70.456.434.255.7—

Paired on individual crops, Qori-OCR is ahead on 243 and behind on 718 relative to PP-OCRv6_tiny (exact McNemar p < 1e-6). The 69.9% figure is the best case for the model: fp32 scoring, with the pruning penalty and any int8 penalty already paid.

Training

ItemValue
Corpus306,106 crops: 300,000 MJSynth + 6,106 real (ICDAR-2015 4,046, IIIT-5K 1,827, SVT 233)
Validation615 real crops, hash-split (`sha1(seed
Input / step3×48×320, 8 px per CTC step, T = 40 frames
OptimiserAdamW, wd 0.05 (norms/biases excluded), grad clip 5, EMA 0.999
Stage A82,854 steps, lr 7e-4 → 6e-4 cosine, fp16 AMP on one T4, batch 64 × grad-accum 8
Stage B8 epochs on real crops only, lr 2e-4, scene-hard augmentation (perspective, blur, JPEG)
Best validationCER 0.1789, 65.5% exact match (case-insensitive)
Post-trainingstructured pruning 30.4% (width 0.85, MLP hidden 0.75), int8 PTQ (dynamic / QDQ / QOperator)
Hardware / costone Tesla T4, ~1.15 GB peak VRAM, $0.92 billed (Modal)
Throughput982 crops/s on T4 at batch 64

The architecture, the schedule and the optimisation plan are documented in ARCHITECTURE.md and TRAINING.md in the release bundle.

Limitations

  • Accuracy. 69.9% on a clean, lexicon-free protocol is roughly 20 points behind the compact state of the art on the same crops, and 8.3 points behind a model a third of its size. Do not substitute this model for PP-OCR or SVTR in a product.
  • ASCII only. 95 printable characters, case-sensitive; accented and non-Latin script are out of vocabulary. Non-ASCII training rows were dropped, so the model never saw them.
  • Crops only. There is no detection stage: it recognises a single word or short line that has already been cropped. It has no rotation or perspective correction, so tilted or upside-down text fails, and long lines must be split.
  • ≤ 40 characters at 320 px (8 px per CTC step). Longer lines are silently truncated by the frame budget.
  • Case convention. 1,314 of its 1,338 case-only errors are uppercase references emitted in mixed or lower case (PRIVATE → Private). Uppercasing predictions raises case-sensitive exact match from 45.8% to 69.2%, but that is a post-hoc convention, not a capability.
  • Static int8 portability. See the note under Benchmarks; the 4 MB graph's accuracy changes by six points between x86 and ARM.
  • Small-data training. 306k crops is ~40× less than the PP-OCR series trains on. The model is weak on short, clean words (77.8% on 1–3 character labels vs 85.2% for PP-OCRv6_tiny), which is a data/optimisation signature rather than an architectural one.

Intended use

Research on compact CTC recognisers, English word-level OCR in constrained pipelines, and as an initialisation for distillation. Not intended for production OCR, multilingual text, or anything where a wrong character is expensive. The measured headroom is documented in the report: distillation from PP-OCRv6_small was planned and not run, and 84.2% of current predictions are within one edit of the reference.

Licence

Weights and code: research use. The training corpus is synthetic (MJSynth, research use) plus real crops from ICDAR-2015 (challenge terms), SVT (research use) and IIIT-5K (research use); those terms carry over to models derived from them. No warranty of any kind.

Citation

@misc{hadal2026qoriocr,
  title  = {Qori-OCR: a 3.13 M-parameter CTC recogniser, benchmarks and error analysis},
  author = {Hadal Research},
  year   = {2026},
  note   = {https://hadal.run/models},
}

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

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

GPU в ailist

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

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

Модель выложена только в формате ONNX, рантайм загружает PyTorch-веса.

Ревизия весов
70aa642

0 моделей