/ Модель

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

Лицензия
Apache 2.0
Архитектура
thakiocr-line-ctc · dense
Библиотека
pytorch
Опубликована
1 ноя 2026

ThakiOCR-KOEN-V1-Dense

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

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

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

Компактная модель ThakiCloud для распознавания корейских и английских текстовых строк на изображениях.

ThakiOCR-KOEN-V1-Dense — компактная модель распознавания строк на корейском и английском языках, разработанная ThakiCloud и обученная с нуля. Она принимает изображение одной обрезанной текстовой строки и возвращает её транскрипцию; для распознавания текста на странице её нужно сочетать с детектором строк или моделью разметки макета.

Модель содержит 2,13 млн параметров. Её сверточный энкодер с блоками глубинных одномерных сверток передает признаки в линейную голову на 14 153 класса; используется посимвольная токенизация слогов хангыля и декодирование CTC без языковой модели. Модель обучена на синтетических строках из NVIDIA OCR-Synthetic-Multilingual-v1. Лицензия Apache-2.0.

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

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

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

Ограничения

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

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

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

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

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

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

Бенчмарки пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь рядом с другими моделями теста

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Распознавание текста» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

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

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

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

Также подходит для

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

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

Открыть на Hugging Face

ThakiOCR-KOEN-V1-Dense

A small (2.13 M parameters) Korean/English text-line recognizer trained from scratch with CTC. It reads one cropped text line and returns its transcription. It does not detect text on a page; pair it with a line detector or layout model.

Korean card: MODEL_CARD.ko.md carries the same facts in Korean.

This is a research release. All scores below come from a single training run (one seed). Most are measured on held-out synthetic data drawn from the same source as the training data, so they say little about real scanned documents. The one real-document number (an AI Hub validation subset, used for evaluation only) shows clear weaknesses, listed under Known failure modes. We make no claim of state-of-the-art accuracy.

Quick start

pip install torch numpy pillow safetensors
python inference.py line.png              # one or more line images
python inference.py --demo                # renders an English line and reads it back
from inference import ThakiOCR
ocr = ThakiOCR(".", device="cpu")
print(ocr.recognize(["line1.png", "line2.png"]))

inference.py is self-contained (torch, numpy, Pillow, safetensors). It holds a vendored copy of the network, the preprocessing and the greedy CTC decoder.

Files

FileContent
model.safetensorsfp32 weights (state_dict only, no optimizer state)
config.jsonarchitecture, preprocessing and decoding settings, provenance hashes
vocab.json14,152 characters; CTC index i maps to chars[i-1], index 0 is blank
inference.pystandalone model code, preprocessing, greedy CTC decoding, CLI
LICENSEApache-2.0 (code and weights)
NOTICECC BY 4.0 attribution for the training data, what is not included

Model

  • Input: one grayscale text-line image.
  • Preprocessing: EXIF transpose, grayscale, resize to height 48 keeping the aspect ratio (bilinear), width max(8, round(w*48/h)); lines wider than 2048 px after resizing are rejected rather than squeezed. Pixels are scaled to [-1, 1] (x/127.5 - 1). A batch is right-padded with white to a multiple of 16.
  • Encoder: convolutional stem (three stride stages: 2, 2, then 2 in height only), mean pooling over height, linear projection to 128 dims, two blocks of depthwise 1-D convolution (kernel 5) with a gated feed-forward, LayerNorm.
  • Head: dense linear layer to 14,153 classes (14,152 characters + blank), syllable-level tokenization (one Hangul syllable = one class).
  • Output stride: 4 pixels of resized width per CTC frame.
  • Decoding: greedy CTC (argmax, merge repeats, drop blanks). No language model.
  • Parameters: 2,130,249 (head 1,825,737, encoder 304,512).

Training

  • Data: text-line crops from NVIDIA OCR-Synthetic-Multilingual-v1 (CC BY 4.0), files ko/train/train_000.h5 and en/train/train_000.h5 only. Crops were split into train and held-out sets by source document group. The training manifest has 879,645 lines (Korean 435,510, English 444,135).
  • Vocabulary: printable ASCII, all 11,172 modern Hangul syllables, Hangul Jamo blocks, a short symbol list, plus every character in the training labels. Built from training labels only.
  • Recipe: 20,000 optimizer steps, batch 64, AdamW (lr 3e-4, weight decay 0.02), 1,000 warmup steps then cosine decay, gradient clipping 5, bf16 autocast with fp32 CTC loss, seed 42, no augmentation. One B200 GPU, 1,407 s of training.
  • Checkpoint: the fixed final step (last.pt). No early stopping and no checkpoint selection on any evaluation set.
  • No AI Hub data was used for training or for the vocabulary.

Evaluation

Greedy decoding, batch 128, exact-string metrics after Unicode NFC (no case or punctuation normalization). 5,000 lines per set. Single run.

SetWhat it isCERWERExact line
Synthetic KO held-outNVIDIA synthetic Korean lines, document groups not seen in training16.70%38.65%39.90%
Synthetic EN held-outNVIDIA synthetic English lines, document groups not seen in training11.08%28.18%51.96%
Real KO development setword crops from an AI Hub (dataset 71299) validation subset; evaluation only37.14%128.67%40.18%

On the real development set, CER drops to 17.81% if spaces are ignored. Most of the error there is spurious space insertion (see below). The held-out synthetic sets share the generator and source file with training, so they overstate accuracy on real documents. The real development set is a development measurement, not an independent test set.

Latency (batch 1, 512 px wide input, fp32): 1.29 ms median on one B200 GPU; 5.61 ms median on 4 threads of a data-center server CPU. Laptop and mobile CPUs were not measured.

Known failure modes

  • Space insertion on real documents. On 38% of real Korean word crops the model inserts spaces between syllables (for example 평면도 read as 평 면 도). The synthetic training lines have different spacing statistics from scanned word crops.
  • Domain gap. Trained only on synthetic renderings. Scanned, photographed, low-contrast, handwritten or stylized text was not in the training data.
  • Line input only. Feeding a whole page or a multi-line block produces garbage.
  • Long lines. Lines wider than 2048 px after resizing to height 48 are rejected; split them first.
  • Batch effects. The depthwise convolution sees the white padding at line ends, so a line's output can change slightly with the other lines in its batch.
  • Single seed. Run-to-run variance was not measured.

Intended use

Research and prototyping of Korean/English line recognition inside a larger document pipeline, as a small CPU-friendly baseline. It should not be used as the only reader for financial, legal or identity documents without human review.

Blog posts

Write-ups of this model on the ThakiCloud tech blog:

License and attribution

Code and weights: Apache-2.0 (see LICENSE). Training data: NVIDIA OCR-Synthetic-Multilingual-v1, CC BY 4.0. Attribution and the list of what is not included are in NOTICE. No training data is distributed in this repository.

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

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

GPU в ailist

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

Можно запустить

Подбираем GPU…

Ревизия весов
b9880c9

0 моделей