/ Модель

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

Лицензия
Apache 2.0
Архитектура
vision-encoder-decoder · dense
Базовая модель
cyrillic-large-stage1
Опубликована
16 мар 2026

cyrillic-large-handwritten

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

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

2 956скачиваний за 30 дней4лайкавеса обновлены16 ноя 2026

Бенчмарки

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

Тесты пользователейпока нет

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

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

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

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

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

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

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

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

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

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

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

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

Kansallisarkisto/cyrillic-large-handwritten — модель распознавания рукописного текста на основе трансформерной архитектуры vision-encoder-decoder, разработанная в проекте ArchXAI. Она принимает изображение отдельной текстовой строки и генерирует её текстовую расшифровку; предназначена прежде всего для русского языка и исторических документов, а также для оцифровки архивных материалов и рукописных заметок.

Модель дообучена на базе Kansallisarkisto/cyrillic-large-stage1. Обучающая выборка включает 56 615 строк, преимущественно из исторических документов архивов Эстонии, Финляндии и Латвии. В разметке символы «ѣ» и «і» нормализованы до «е» и «и». На внутридоменном тесте указаны CER 0,0406 и WER 0,1732. Модель распространяется по лицензии Apache 2.0.

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

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

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

Ограничения

Модель обучена преимущественно на русских текстах кириллицей и может плохо обобщаться на другие языки, письменности и типы документов вне обучающего домена. В разметке «ѣ» и «і» нормализованы до «е» и «и».

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

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

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

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

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

Открыть на Hugging Face

Model description

Model Name: cyrillic-large-handwritten

Model Version: cyrillic-large-november2026-empties

Model Type: Transformer-based encoder-decoder for OCR

Base Model: Kansallisarkisto/cyrillic-large-stage1

Purpose: Handwritten and typewritten text recognition

Languages: Russian

License: Apache 2.0

This is a fine-tuned model for Cyrillic handwriting recognition, trained with computing resources generously provided by CSC – IT Center for Science on the LUMI supercomputer.

This model was developed in the ArchXAI project funded by the Central Baltic Programme.

ArchXAI project logo

Model Architecture

The model is based on a Transformer architecture with an encoder-decoder setup, similar to TrOCR from Li et al. (2023):

  • The encoder processes an image of a single line of text into a sequence of hidden states.
  • The decoder attends to the hidden states (including the CLS token) from the encoder using cross-attention, to generate the corresponding text output.

This model is a fine-tuned version of our base model, for handwritten text recognition in primarily Russian-language historical documents. The decoder layers (including cross-attention layers) were frozen for the first 11 epochs of fine-tuning to enable easier adaptation of the base model's encoder to handwriting while preserving the decoder’s language modeling capabilities.

Intended Use

  • Document digitization (e.g., archival work, historical manuscripts)
  • Handwritten notes transcription
  • Data rescue (handwritten or typed numerical and letter codes)

Training data

The training data consists of human-annotated samples of mainly handwritten text lines from historical documents in the collections of the National Archives of Estonia, Finland and Latvia, with some printed and typed text lines included. Certain character normalizations were made to the labels only to enforce our guidelines for human annotations (the same normalization was also applied in pre-training for the base model):

trans = str.maketrans({
        "ѣ": "е", "Ѣ": "Е",
        "і": "и", "І": "И"
    })

text = text.translate(trans)

The training set and validation set (but not the test set) were expanded with empty lines containing no text, from the collections of the National Archives of Finland. The training set was also expanded with additional mainly numerical table cells as explained below.

Training set: 121 956 text lines (including 7106 empty lines)

Validation set: 14 898 text lines (including 888 empty lines)

Test set: 13 950 text lines

UoS Data Rescue: Training set (above) expanded by 6.66% with table cells sampled randomly (fresh samples per epoch) from UoS Data Rescue by Middleton and Singh (2025), a set of 768 074 table cells including some text cells in other languages such as English and French.

Randomly generated numerical table cells: Training set (above) expanded by 3.33% with digit strings randomly generated (per epoch) with our generator by concatenating individual digits from NIST SD19 (Grother and Hanaoka, 2016) and DIDA (Kusetogullari et. al., 2021).

Evaluation

The following metrics were calculated on the test set (in-domain evaluation) using the evaluate library with default settings:

CER (character error rate): 0.0405

WER (word error rate): 0.1608

Used Hyperparameters

Train batch size per device: 8

Number of devices: 128

Learning rate: 5e-5

Warmup ratio: 0.05

Scheduler: linear

Optimizer: AdamW

Number of epochs: 400

First n epochs where decoder was frozen: 20

FP16 mixed precision training: False

Input image size: 182 x 1022

How to Use the Model

For production inference, use our nafrec package. You can also use the model for inference by loading the processor and model manually.

from transformers import TrOCRProcessor, VisionEncoderDecoderModel

class TrOCRProcessorCustom(TrOCRProcessor):
    def __init__(self, image_processor, tokenizer):
        self.image_processor = image_processor
        self.tokenizer = tokenizer
        self.current_processor = self.image_processor
        self.chat_template = None

processor = TrOCRProcessorCustom.from_pretrained("Kansallisarkisto/cyrillic-large-handwritten")
model = VisionEncoderDecoderModel.from_pretrained("Kansallisarkisto/cyrillic-large-handwritten")

# Open an image of handwritten text
image = Image.open("path_to_image.jpg")

# Preprocess and predict
pixel_values = processor(image, return_tensors="pt").pixel_values
generated_ids = model.generate(pixel_values)
generated_text = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]

print(generated_text)

Limitations and Biases

The model was trained on human-annotated text lines that use Cyrillic characters. The model may not generalize well to any other language than Russian.

This model is a fine-tuned version of cyrillic-large-stage1 and thus may inherit some of its limitations and biases. Out-of-domain generalization is heavily affected by the training data composition and configuration of the pre-training and fine-tuning.

Future Work

Potential improvements for this model include:

  • Expanding training data: incorporating more ground truth data.
  • Optimizing for specific domains: fine-tuning the model on domain-specific handwriting.
  • Out-of-domain generalization: studying how pre-training and fine-tuning could be optimized to maximize out-of-domain generalization of the fine-tuned model

Citation

If you use this model in your work, please cite it as:

@misc{cyrillic-large-handwritten,
  author = {Kansallisarkisto},
  title = {NAF Cyrillic OCR Model: fine-tuned handwriting checkpoint},
  year = {2026},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co/Kansallisarkisto/cyrillic-large-handwritten/}},
}

References

P. Grother and K. Hanaoka, NIST special database 19 handprinted forms and characters 2nd Edition, National Institute of Standards and Technology, Tech. Rep., 2016. DOI: http://doi.org/10.18434/T4H01C

Huseyin Kusetogullari, Amir Yavariabdi, Johan Hall, Niklas Lavesson, “DIGITNET: A Deep Handwritten Digit Detection and Recognition Method Using a New Historical Handwritten Digit Dataset”, Big Data Research, 2020, DOI: http://doi.org/10.1016/j.bdr.2020.100182.

Huseyin Kusetogullari, Amir Yavariabdi, Johan Hall, Niklas Lavesson, DIDA: The largest historical handwritten digit dataset with 250k digits, June 2021. Accessed on: June 13, 2021. Available: https://github.com/didadataset/DIDA/.

Li, M., Lv, T., Chen, J., Cui, L., Lu, Y., Florencio, D., Zhang, C., Li, Z. and Wei, F. 2023. TrOCR: Transformer-Based Optical Character Recognition with Pre-trained Models. Proceedings of the AAAI Conference on Artificial Intelligence. 37, 11 (Jun. 2023), 13094-13102. DOI:https://doi.org/10.1609/aaai.v37i11.26538.

Middleton, S. E., & Singh, L. G. (2025). UoS Data Rescue [Dataset]. In International Journal on Document Analysis and Recognition (Version 1.0). Zenodo. https://doi.org/10.5281/zenodo.15730546

Model Card Authors

Author: Kansallisarkisto

Contact Information: john.makela@kansallisarkisto.fi, ilkka.jokipii@kansallisarkisto.fi

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
VisionEncoderDecoderModel
Ревизия весов
e2f188d

0 моделей