/ Модель

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

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

kraken-blla-base

Сегментация изображенийИзображение → mask7 профессий

Модель Kraken BLLA сегментирует текстовые области и базовые линии на рукописных и печатных страницах документов перед распознаванием текста.

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

Бенчмарки

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

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

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

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

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

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

Kraken BLLA — модель сегментации страниц документов, разработанная Benjamin Kiessling и ALMAnaCH (Inria Paris) и опубликованная как зеркальная копия релиза Zenodo. Она служит моделью сегментации по умолчанию для движка Kraken ATR и выделяет текстовые области и базовые линии, подготавливая страницы к распознаванию текста. Подходит для рукописных и печатных документов умеренной сложности, в том числе снятых на мобильные устройства; её также можно дообучить для более подробной классификации элементов страницы.

Модель обучена с нуля на примерно 11 200 страницах из шести наборов данных, содержащих латинские, арабские и греческие письменности. Используется стандартная архитектура BLLA из Kraken; в обучающих данных типы областей и строк объединены в классы. В тестировании на отложенной выборке получены F1 0,950 для базовых линий и IoU 0,929 для текстовых областей. Репозиторий содержит файл Core ML. Лицензия — Apache-2.0.

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

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

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

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

BLLA base model (kraken default segmentation model)

Hugging Face Hub mirror

This repository mirrors the canonical Zenodo release by Benjamin Kiessling, ALMAnaCH, Inria Paris. The files are byte-identical to the Zenodo release and have not been modified by Small Models for GLAM.

As of kraken 7.1.1 (the latest PyPI release on 2026-10-24) the package still bundles the previous cBAD-2019-only BLLA model. Download this repository to use the new default model now.

Use from the Hugging Face Hub

pip install "kraken>=7.1.0" huggingface_hub

hf download small-models-for-glam/kraken-blla-base blla.mlmodel --local-dir ./kraken-blla-base

kraken -i image.png output.txt \
    segment -bl -i ./kraken-blla-base/blla.mlmodel \
    ocr -m <recognition model>

For a recognition model, see the Kraken PP-OCRv6 collection. The training splits (train.lst, val.lst, test.lst) are mirrored as well.

This is the default segmentation model shipped with the kraken ATR engine. It replaces the previous base model trained on cBAD 2019 alone and has been retrained from scratch on a considerably larger and more diverse corpus of ~11200 pages aggregated from six datasets.

Uses

The model performs reasonably well on most non-fragmentary handwritten and machine-printed document pages of moderate complexity. If out of the box performance is unsatisfactory or more fine-grained segmentation taxonomies are desired it can also serve as a good foundation model for fine-tuning.

Training Data

The training corpus aggregates six publicly available datasets. Pages were split 11,271 / 1,000 / 1,000 into training, validation, and test sets at random.

DatasetSourceTrainValTestTotal
OCR-D-LAYOUT-GT-DTA10.5281/zenodo.193486743,7413463264,413
Burchards Dekret Digital10.5281/zenodo.108828173,0352462573,538
cBAD 201910.5281/zenodo.35680232,5822092303,021
Muharaf10.5281/zenodo.114922151,0111011041,216
CLLGgitlab.inria.fr/almanach/cllg4604740547
Baybarsgitlab.huma-num.fr/lipa/baybars4425143536
Total11,2711,0001,00013,271

The exact splits are deposited alongside the model as train.lst, val.lst, and test.lst. Each line is the path of a PAGE or ALTO file relative to the root of the combined corpus. The datasets are freely licensed and can be obtained from the sources above.

Region and line types in the training dataset have been merged into single classes.

Biases and Limitations

The goal of this training run was to take advantage of the superior accuracy of models trained with the recently implemented hybrid CE+Dice loss but also to improve accuracy on machine-printed documents with close writing, images taken with handheld devices, and non-Latin material. Our tests indicate that this was generally successful, nevertheless the model still exhibits some of the known weaknesses.

The training corpus consists exclusively of Latin, Arabic, and Greek script documents with relatively simple layouts. Accuracy on scripts and layouts dissimilar to those three is therefore expected to be uneven. Some features of pages where segmentation accuracy is frequently unsatisfactory:

  • Tilted and vertical writing
  • Writing embedded in decoration

An idiosyncracy of the model is that no matter the position of the calligraphic/typographic baseline (top-, center-, or baseline) a baseline will be detected. Hebrew script lines will therefore be detected with base- not toplines. This is generally not an issue for recognition models that have been trained with the same line position.

How to Get Started with the Model

Install the kraken ATR package following the instruction here. A quick start explaining the use of the segmenter can also be found there.

Training

The model was trained from scratch with kraken's default BLLA architecture for 20 epochs on the 11,271 page training split, with data augmentation enabled. The optimizer was AdamW at a learning rate of 2e-4 with a weight decay of 1e-5, gradient clipping at 1.0, and a cosine schedule with 2,000 warmup steps decaying to a minimum learning rate of 2e-5.

Evaluation

Evaluated with ketos segtest on the held-out 1,000 page test split. The line evaluation uses kraken's adaptation of the cBAD baseline evaluation metric:

PrecisionRecallF1
0.9640.9470.950

Pixel accuracy and IOU for the text region:

Pixel accuracyIOU
0.9650.929

Acknowledgements

Training of this model was funded by the European Union under Grant Agreement No.~101132163 (ATRIUM). Views and opinions expressed are those of the authors only and do not necessarily reflect those of the European Union.

Citation

If you use this model, please cite kraken and if possible credit the dataset providers linked in the Training Data table above.

BibTeX:

@inproceedings{10.1007/978-3-032-04624-6_26,
  author = {Kiessling, Benjamin},
  title = {Version 5 of the Kraken ATR Engine for the Humanities},
  year = {2025},
  isbn = {978-3-032-04623-9},
  publisher = {Springer-Verlag},
  address = {Berlin, Heidelberg},
  doi = {10.1007/978-3-032-04624-6_26},
  booktitle = {Document Analysis and Recognition – ICDAR 2025: 19th International Conference, Wuhan, China, September 16–21, 2025, Proceedings, Part III},
  pages = {443–458},
  numpages = {16},
  location = {Wuhan, China}
}

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

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

GPU в ailist

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

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

В репозитории нет весов в формате PyTorch/safetensors.

Ревизия весов
3e91a74

0 моделей