/ Модель

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

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

folio-newspaper-fraktur

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

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

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

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

Folio Newspaper Fraktur — модель Folio Kestrel для распознавания печатных строк исторических немецких газет во фрактурном шрифте. Это дообученный свёрточно-рекуррентный CTC-распознаватель с 1,29 млн параметров; репозиторий содержит ONNX-версию для работы на CPU и веса safetensors. Модель принимает изображение с обрезанной горизонтальной строкой и выдаёт распознанный текст Unicode. Для страниц с разметкой PAGE XML прилагается инструмент чтения строк по заданным координатам.

На отложенной выборке из Люксембурга указана доля ошибок по символам 0,90%, на внешней выборке австрийских газет — 8,52%. Модель рассчитана на печатные строки с известными координатами, а не на рукописи или автоматическое обнаружение макета страницы. Алфавит следует люксембургской конвенции транскрипции и использует обычную «s» для обеих печатных форм s; незнакомые гарнитуры, имена, числа и пунктуацию рекомендуется сверять со сканом. Веса распространяются по лицензии CC BY-SA 4.0, исходный код — Apache 2.0.

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

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

Ограничения

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

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

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

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

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

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

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

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

Открыть на Hugging Face

Folio Newspaper Fraktur

Transcribe a cropped line of historical German newspaper print on a CPU. This 5.2 MB ONNX reader produces Unicode text, using ordinary s for both printed s forms. It scored 0.90% character error on 2,038 held-out Luxembourg lines and 8.52% on 813 lines from Austrian newspaper pages. The repository also includes a command for scans with existing PAGE XML line coordinates.

Luxembourg newspaper example

The example reads “Mantel umhüllt und hatte sanft, wie ein”. It comes from a BnL validation block. Sample provenance

Read a line

With Python 3.10 or later, download the runtime, the weights and an example. Once downloaded, recognition works offline.

python -m pip install huggingface_hub
hf download foliokestrel/folio-newspaper-fraktur model.onnx config.json folio_fraktur.py read_page.py requirements.txt examples/newspaper-line.png examples/newspaper-line.xml --local-dir folio-newspaper-fraktur
cd folio-newspaper-fraktur
python -m pip install -r requirements.txt
python folio_fraktur.py examples/newspaper-line.png

Provide one horizontal line per image. Include accents and descenders, and leave adjacent lines outside the crop. The command accepts multiple image paths. In Python, reuse one reader for all images to pay the model loading cost once.

from PIL import Image
from folio_fraktur import FrakturReader

read = FrakturReader()
with Image.open("examples/newspaper-line.png") as line:
    print(read(line))

Read an annotated page

python read_page.py examples/newspaper-line.xml
python read_page.py page.xml --image original-scan.jpg > lines.jsonl

The first command runs on the included one-line example. On a real scan, the second command reads every existing PAGE TextLine in XML document order. Each JSON row contains the zero-based index, original line ID, crop rectangle in source pixels and recognized text. Rectangle coordinates are left and top inclusive, right and bottom exclusive. A line with missing or out-of-bounds coordinates gets its own error row. Use an image matching the dimensions in the XML. For unsegmented pages, supply your own line crops or PAGE layout first. On 13 Austrian pages, the tool read 4,813 annotated lines and reproduced both crop coordinates and predictions on all 813 scored lines. Workflow verification

Measured accuracy

Character error rate (CER) divides character insertions, deletions and substitutions by the number of reference characters. Lower is better. “Fold ſ” treats ſ and s as equivalent in both prediction and reference. Exact matches count complete lines after NFC and whitespace normalization, with ſ and s distinct.

CPU readerLuxembourg CERFold ſExact / 2,038Austria CERFold ſExact / 813
Folio Newspaper Fraktur0.90%0.90%1,6208.52%8.52%152
Tesseract frak2021, Mannheim4.50%1.64%35729.33%27.45%154
Tesseract script/Fraktur, tessdata_fast8.89%6.48%11731.73%29.94%71
Folio Fraktur Line, book model22.67%20.09%2436.17%34.31%12

The Luxembourg panel contains 110 reserved text blocks and 93,230 reference characters. Folio Newspaper Fraktur made 843 edits. The source establishes separation by text block. Newspaper titles and issues may recur across splits. On one line in block 0777, the reference contains only “ist.” while a full printed line is visible. It remains in the score. Inspect the scan · Luxembourg predictions

The external Austrian panel contains 33,507 reference characters on 13 NewsEye / READ validation pages. Page identifiers span 1864–1933. The newspaper model made 2,854 edits. Crops use bounding rectangles around source polygons, which can include neighboring print. The frak2021 training notes list AustrianNewspapers among its sources. Its overlap with these specific pages is unknown. Austrian predictions · Specialist predictions · frak2021 training notes

Training and use limits

Folio Kestrel fine-tuned the 1.29-million-parameter convolutional recurrent CTC reader on 9,137 Luxembourg newspaper lines from 516 blocks. We chose epoch 11 using 1,918 validation lines from 110 different blocks and froze the checkpoint before scoring either panel. On validation, PyTorch and the CPU ONNX export gave identical strings on all 1,918 lines. With two CPU threads, median inference time per decoded line was 11.5 ms on the Luxembourg test panel and 12.1 ms on the Austrian panel. These timings exclude model loading and image decoding. Training recipe and splits · Evaluation and baselines

The alphabet follows the Luxembourg transcription convention. For work that requires a distinct long ſ, the book reader can output it. Proofread unfamiliar typefaces, names, numbers and punctuation against the scan. These measurements cover printed lines with known coordinates. Handwriting, automatic layout detection and transcription quality by individual language were outside the evaluation.

Weights are licensed CC BY-SA 4.0 and the original code is Apache 2.0. The Luxembourg example is from the Bibliothèque nationale du Luxembourg. Austrian references are from Guenter Muehlberger and Guenter Hackl’s NewsEye / READ dataset, with scans from the Austrian National Library. Attribution and source licenses

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

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

GPU в ailist

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

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

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

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

0 моделей