/ Модель

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

Лицензия
CC BY-SA 4.0
Базовая модель
folio-fraktur-line
Опубликована
30 ноя 2026

folio-sbb-print-ocr

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

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

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

OCR-модель Folio Kestrel для транскрибирования строк исторической печати, в том числе фрактуры, со сканов и PAGE-разметки.

Folio SBB Print OCR — модель OCR от Folio Kestrel для распознавания строк исторической печати на сканах, особенно фрактуры. Она дообучена на строках из коллекции OCR-D Берлинской государственной библиотеки и предназначена для запуска на CPU. Модель принимает изображение отдельной строки или PAGE XML с размеченными строками; при обработке PAGE XML скрипт извлекает их по полигонам и создаёт TSV с транскрипциями.

Модель выдаёт дипломатическую транскрипцию, сохраняющую исторические глифы и специальные символы, а для PAGE XML дополнительно формирует поисковую копию с раскрытыми распространёнными лигатурами и нормализацией отдельных знаков. В тесте на двенадцати отложенных каталогах Берлинской государственной библиотеки строгая символьная ошибка составила 3,69%; качество зависит от издания, шрифта, скана и принятого правила транскрибирования. Проверка касается распознавания уже выделенных строк и не оценивает обнаружение строк на новых страницах. На других книжных наборах данных модель заметно уступила Folio Early и Mannheim. Репозиторий содержит ONNX-версию размером 5,34 МБ; лицензия — CC BY-SA 4.0.

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

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

Ограничения

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

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

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

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

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

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

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

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

Открыть на Hugging Face

Folio SBB Print OCR

Transcribe historical printed lines from a scan or a PAGE layout on a CPU. The 5.34 MB ONNX reader produces a diplomatic transcription that preserves historical glyphs, including the private-use ligatures in Berlin State Library’s OCR-D ground truth. The PAGE command also writes a search copy that expands familiar ligatures such as ch and ct into ordinary letters.

On 1,393 masked lines from twelve Berlin catalogue works held out of fine-tuning, this model made 2,429 edits in 65,800 reference characters (3.69%). Mannheim frak2021 achieved 15.72% in its best tested setting. With common glyphs expanded on both sides of the comparison, the rates were 3.50% and 6.19%. On the separate RIDGES and DTA19 book benchmarks, Mannheim and the parent Folio Early reader both performed better. Per-work scores and all tested modes · Results on other books

Read a line or a segmented page

python -m pip install huggingface_hub
hf download foliokestrel/folio-sbb-print-ocr --local-dir sbb-reader
cd sbb-reader
python -m pip install -r requirements.txt
python folio_fraktur.py examples/line.png
python read_page.py examples/layout.xml --output readings.tsv

Latin line beginning “cri codicis locïs” from the Berlin example page

The example page contains 27 line polygons and has its transcriptions removed. The TSV gives the XML path, region ID, line ID, diplomatic reading and search copy for each line. On the pictured line the search copy reads cri codicis locis manifestum est. Adducta ea sunt et explanata in. The reference spells locïs with a diaeresis, which the model missed. Original work, line ID and exact Unicode strings

For your own layout, pass one or more PAGE XML paths. Each XML points to its raster using imageFilename. For a separately stored image, use python read_page.py layout.xml --image scan.tif --output readings.tsv. A page needs horizontal TextLine polygons in TextRegion elements. The TSV follows the source region and line order and retains IDs for joining against a catalogue or annotation tool. Raster dimensions are checked before recognition. For cropped line images, the Python runtime can reuse one model session.

from PIL import Image
from folio_fraktur import FrakturReader
from search_text import search_text

reader = FrakturReader(".")
with Image.open("examples/line.png") as image:
    diplomatic = reader(image)
print(diplomatic)
print(search_text(diplomatic))

Search and compare on your own collection

The two text fields support different uses. For example, the diplomatic field uses U+F502 for a joined ch. The search copy expands that character to ch, folds long ſ to s and represents a vowel with a superscript e as an umlaut. It preserves unlisted private-use characters and historical spellings. Search folding is a small documented set of substitutions. Search transformations · OCR-D encoding table

In an exact-token search test on the twelve works, we took 494 reference words of at least four characters that occurred in at least two works. Searching the diplomatic predictions found 1,533 of 2,600 relevant word–line pairs (59.0%). Searching the expanded copy found 2,372 (91.2%). It returned seven additional pairs absent from the transcribed references. These are searches derived from the test transcriptions. Query definitions, counts and scores · Search evaluation code

For a local comparison, make a UTF-8 TSV with image and reference columns and an optional group column. Image paths are relative to the TSV. With transcribed PAGE XML, the included sample exporter will create the TSV and masked PNGs. The comparison command reports strict CER, search CER and complete line matches. To include Mannheim, install its optional native binding and traineddata following the training guide. The default native mode here is raw-line. Mannheim download and checksum

PYTHONPATH=. python training/page_sample.py my-transcribed-page.xml --mask --output my-lines
python compare_lines.py my-lines/sample.tsv --folio SBB . --report local-scores.json
python compare_lines.py my-lines/sample.tsv --folio SBB . \
  --tesseract Mannheim frak2021 --tessdata tessdata --tesseract-psm raw-line

Accuracy and limits

Strict CER is the number of character substitutions, insertions and deletions divided by the number of reference characters, after NFC and whitespace normalization. The search column applies the same additional glyph expansions to both predictions and references. Every reader received the same masked grayscale crops in the frozen comparison. The resize rows are a subsequent input sensitivity check. A lower CER is better.

Reader and settingStrict CERSearch CERExact diplomatic lines / 1,393Empty readings
Folio SBB Print OCR3.69%3.50%5900
Mannheim frak2021, raw line15.72%6.19%1232
Mannheim, raw line resized to 48 px with white margins25.77%19.75%882
Mannheim, single line resized to 48 px with white margins27.00%19.00%115153
Mannheim, single line at source size32.25%24.68%117201
Folio Early39.58%32.01%314

The source-size raw-line comparison followed inspection of empty outputs in the original single-line setting. It improved Mannheim’s result considerably. Folio SBB still had lower strict CER on each of the twelve works. Giving each work equal weight, strict CER was 3.81% for Folio SBB and 15.58% for Mannheim raw-line. The Folio alphabet omitted 29 distinct test characters, accounting for 53 occurrences. The source collection contains multiple languages and typefaces. This evaluation measures recognition of annotated lines. It supplies no accuracy estimate for finding those lines on a new page. Frozen comparison and unseen characters · Diplomatic references and predictions

Transfer depends on both the scan and its transcription convention. On the four reserved RIDGES books (2,017 lines), strict CER was 13.72% for Folio SBB, 1.10% for Folio Early and 0.85% for Mannheim single-line. On DTA19 (1,344 lines), the corresponding rates were 11.85%, 0.60% and 0.52%. For Folio SBB, expanding glyphs lowered its transfer CER to 3.54% and 2.76% respectively. Transfer measurements

Training and rights

Folio Kestrel fine-tuned the Folio Early reader on masked line crops from 45 SBB works. Another eight works determined the choice of checkpoint. All twelve test works were held out of fine-tuning and checkpoint selection. An earlier baseline study had examined a different page from each of the test works. All pages used in that study were excluded from this trial. The supplied CPU reader reproduced 774 of 775 validation strings from GPU decoding. Starting with the original TIFFs and PAGE polygons reproduced all 1,393 recorded CPU test predictions across 78 pages. Training recipe and work splits · PAGE replay

The Berlin ground truth and scans are from OCR-D-GT-VD-SBB, published by Staatsbibliothek zu Berlin. Zenodo credits Konstantin Baierer, Maria Federbusch, Mike Gerber, Jörg Lehmann and Clemens Neudecker. Folio Kestrel removed transcriptions and word/glyph elements from the example layout, renamed the image reference and cropped the example line. The example TIFF retains its original bytes. The source images, SBB labels and SBB-derived evaluation tables use CC BY 4.0. The fine-tuned weights inherit CC BY-SA 4.0 from the Folio Early initializer trained on GT4HistOCR. The GT4HistOCR transfer table also uses CC BY-SA 4.0. The contributed code uses Apache 2.0. Berlin source · SBB data license · GT4HistOCR source · Original source notice · Weight license · Code license

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

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

GPU в ailist

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

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

Не удалось определить, чем загружать веса модели (нет library_name и architectures).

Ревизия весов
1d6baac

0 моделей