/ Модель

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

Лицензия
CC BY-SA 4.0
Опубликована
30 ноя 2026

folio-fraktur-line

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

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

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

Folio Fraktur Line распознаёт обрезанные строки исторической немецкой печати и сохраняет символ ſ.

Folio Fraktur Line — модель OCR для распознавания отдельных строк исторической немецкой печати. Она обучена с нуля на 74 248 строках Deutsches Textarchiv и предназначена для локального запуска на CPU через ONNX; в репозитории также есть веса Safetensors. На вход подаётся изображение одной горизонтальной печатной строки, обрезанное близко к тексту, с тёмными символами на светлом фоне. Модель возвращает Unicode-текст и сохраняет исторический символ ſ.

На отложенной выборке Deutsches Textarchiv из 1 344 строк семи авторов частота символьных ошибок составила 0,74% против 6,49% у Tesseract Fraktur. Однако на небольшой проверке 24 строк из двух швейцарских книг ошибка Folio составила 27,18%, тогда как у Tesseract — 5,93%, поэтому перед обработкой новой коллекции рекомендуется сравнить системы на её примерах. Модель не выполняет поиск строк или разметку страниц: подготовка обрезанных строк должна быть сделана отдельно. Рукописный текст, вертикальная печать и другие письменности не входят в проверенные сценарии. Лицензия — CC BY-SA 4.0.

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

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

Ограничения

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

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

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

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

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

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

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

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

Открыть на Hugging Face

Folio Fraktur Line

Transcribe a cropped line of historical German print on a CPU. The 5.20 MB ONNX model returns Unicode text and preserves characters such as long ſ. It was trained on normalized line images from the Deutsches Textarchiv (DTA). Each input should contain one horizontal printed line, cropped close to the text, with dark ink on a light background.

On 1,344 DTA lines from seven authors held out of training and validation, the reader made 384 edits in 52,045 characters (0.74%). Tesseract’s Fraktur model made 3,376 (6.49%). On line crops from two Swiss scans the ordering reversed, with 27.18% character error for this reader and 5.93% for Tesseract. For a new collection, compare both readers on a small transcription sample before processing the collection.

Read a line offline

Install the dependencies and download the runtime files once. The reader then runs locally with no service or API key. The CLI accepts one or more image paths and writes one transcription per image, in order.

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

One line from the DTA Keller volume

heiteren Gedanken auf meinem Poſten. Das

The image and transcription come from Gottfried Keller’s Der grüne Heinrich (1854), DTA validation line 08925. For a search index that treats both forms of s alike, store the diplomatic output and derive a search string with text.replace("ſ", "s").

Create the reader once when processing many cropped lines.

from PIL import Image
from folio_fraktur import FrakturReader

reader = FrakturReader(threads=2)
with Image.open("examples/dta-line.png") as image:
    text = reader(image)
print(text)

Line detection and page layout must be handled upstream. Handwriting, vertical text and other scripts are outside the evaluated use. The repository also contains PyTorch Safetensors weights for training or inspection.

Evaluation

We grouped all works from the same catalogue author together. The reader trained from scratch on 74,248 lines by 24 authors. Five other authors supplied 960 validation lines. Of six training epochs on one H100, epoch five had the lowest validation error. The same validation data selected Tesseract script/Fraktur over deu (3.94% versus 10.69%). We froze the weights, the baseline and the evaluation rules before scoring the seven remaining authors. The corpus was published in 2018. Overlap with Tesseract’s own training data is unknown.

Held-out DTA author IDLinesFolio CERTesseract Fraktur CER
boerne1920.43%4.36%
clauren1920.38%4.87%
lenau1920.52%7.44%
menzel1920.57%5.53%
paul1920.75%8.16%
storm1921.70%7.68%
wackenroder1921.16%8.81%
All characters pooled1,3440.74%6.49%

The readers transcribed 1,129 and 204 DTA lines exactly, respectively. CER counts Unicode character insertions, deletions and substitutions, including punctuation, after NFC and whitespace normalization. On Wackenroder line 03641, Folio transcribed every word correctly but changed the final period to a question mark. Equal weighting per author gives 0.79% versus 6.69% CER. Full results and per-line predictions

On a two-thread x86-64 CPU run, ONNX took a median 10.2 ms and a 95th percentile of 12.1 ms per held-out line, including preprocessing and decoding with the image already in memory. Both CPU formats produced identical transcriptions across all 1,344 DTA test lines and all 24 Swiss lines. Single-image CPU inference differed from the batched GPU validation output on one of 960 lines, adding one character edit. Runtime measurements

Transfer to scans from two Swiss books

For each book, we sampled 12 complete lines using page geometry and a fixed hash. An AI reader transcribed the 24 crops before seeing any system output or the source OCR. This small panel uses search-oriented text normalization, including folding ſ to s. All three systems were scored against the same references. One reading contains an uncertain glyph.

Original page cropsLinesFolio CERTesseract Fraktur CER
Junod, 18401212.44%1.58%
Wolf, 18731245.23%11.25%
Combined2427.18%5.93%

Folio reproduced zero full Swiss lines exactly. Tesseract Fraktur reproduced six. Restricting the comparison to the 23 clear references gives 27.81% versus 6.12%. The included Wolf crop shows the failure directly. The print reads “Sie erschien zuerst 1712” near the start of the line, and Folio renders that passage as “erdhien ert UlO”. Both example crops and the raw outputs are included so readers can inspect the mismatch. Wolf crop · Junod crop · Raw Swiss predictions

Training data and license

The Deutsches Textarchiv supplied the DTA19 component of GT4HistOCR, collected by Uwe Springmann, Christian Reul, Stefanie Dipper and Johannes Baiter. Folio Kestrel trained the model, exported the weights and evaluated both readers. The weights are distributed under CC BY-SA 4.0 and the Python code under Apache 2.0. Source attribution, the author split, training code and evaluation instructions are included. GT4HistOCR · Source notices · Reproduce the trial

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

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

GPU в ailist

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

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

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

Ревизия весов
0ae1750

0 моделей