/ Модель

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

Лицензия
CC BY-SA 4.0
Базовая модель
folio-swedish-newspaper-ocr
Опубликована
1 дек 2026

folio-finland-swedish-newspaper-ocr

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

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

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

Компактная OCR-модель Folio Kestrel распознаёт строки исторических газет на шведском языке, напечатанные в Финляндии.

Folio Kestrel разработала Folio Finland Swedish newspaper OCR — компактную модель для распознавания печатных строк исторических газет на шведском языке в Финляндии. Она принимает обрезанную строку или скан страницы вместе с полигонами строк в формате PAGE XML. Модель доступна в форматах ONNX и safetensors; компактный ONNX-файл размером 1,33 МБ рассчитан на запуск на CPU. Лицензия — CC BY-SA 4.0.

На тесте из 898 строк девяти газет модель показала CER 1,06%, если ей заранее переданы полигоны строк. Она сохраняет историческое написание и пунктуацию, включая фрактурную печать. Для сканов газет из Швеции качество переноса ниже: CER составил 8,07% и 10,10% на двух наборах, а отдельные страницы и типографские элементы могут распознаваться заметно хуже. Модель не обнаруживает строки, не восстанавливает порядок чтения и не распознаёт рукописный текст; результат следует вычитывать.

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

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

Ограничения

Для обработки целой страницы нужны готовые полигоны строк в PAGE XML: модель сама не обнаруживает строки и не восстанавливает порядок чтения. Качество на газетах из Швеции ниже, отдельные сложные страницы и пунктирные лидеры могут распознаваться плохо; результат следует вычитывать.

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

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

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

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

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

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

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

Открыть на Hugging Face

Folio Finland Swedish newspaper OCR

Read a cropped line of historical Swedish print from Finland, or supply a newspaper scan and its PAGE XML line polygons. The default 1.33 MB ONNX model runs on CPU. On 898 lines from nine held-out newspaper titles it made 411 character edits against 38,644 reference characters (1.06% CER). The Swedish variable-height parent scored 5.47% on the same crops.

Read a line

Download the runtime, example and weights with the Hugging Face CLI. Use Python 3.10 or 3.11 for the commands below.

hf download foliokestrel/folio-finland-swedish-newspaper-ocr config.json model.onnx folio_fraktur.py read_page_lines.py requirements.txt examples/line.png examples/source.json --local-dir finland-swedish
cd finland-swedish
python -m pip install -r requirements.txt
python folio_fraktur.py examples/line.png

The example is an archive line from the development set, selected by hashing the line ID. The compact model reads

sade: „Se människan"! Men folket kände

The archive transcription is “sade: „Se människan"! Men folket kände”. The original page, polygon, reference and output are recorded in the example metadata.

To read the 73 lines on the original newspaper page from 16 March 1899, download the optional example into the same directory and run the PAGE reader. This TIFF and its PAGE file differ in declared dimensions. The published polygons have been verified in native scan coordinates. For your own scans, supply the matching PAGE 2013 or 2019 XML file.

hf download foliokestrel/folio-finland-swedish-newspaper-ocr examples/newspaper.xml examples/newspaper.tif --local-dir .
python read_page_lines.py examples/newspaper.xml examples/newspaper.tif --native-coordinates --output readings.jsonl

Each JSON record carries the region and line IDs, polygon, source hashes, original text alternatives and the new folio_swedish reading. Supply a new output filename. When you have verified that the PAGE polygon coordinates refer directly to scan pixels despite a dimension discrepancy, add --native-coordinates to clip polygons at the scan boundary. Line detection, reading order reconstruction, handwriting and modern Swedish spelling are outside the evaluated task. The line recognizer decodes characters greedily, including historical spelling and punctuation. Proofread before quoting.

Evaluation

Both panels use the same reference normalization (Unicode NFC and collapsed whitespace). CER and word error rate (WER) divide total edit distance by total reference length. Macro CER gives each publication equal weight. Exact is the number of matching lines. The two score files give counts for every reader and title. Their folders also include the reference and predicted text for each line. Held-out scores · Official validation scores · Rescoring script

ReaderHeld-out CERMacro CERWERExact / 898Official CERMacro CERWERExact / 1,410
Finland Swedish compact1.06%0.85%5.09%7258.61%7.47%24.55%655
Finland Swedish FP321.07%0.86%5.13%7218.61%7.46%24.69%651
Swedish variable-height5.47%5.29%27.88%1389.41%8.49%32.58%364
Swedish page crops5.42%5.25%27.68%1399.69%8.58%33.04%360
Folio Finnish3.32%3.01%16.73%36411.75%9.17%36.21%386
Tesseract Swedish, single line14.24%13.53%49.52%3512.75%17.81%40.80%338
Tesseract Swedish, raw line13.78%13.31%49.87%3715.72%22.68%46.03%294
Tesseract frak2021, single line10.01%9.55%37.50%8511.06%13.02%37.56%274
Tesseract frak2021, raw line9.10%8.88%37.01%8515.83%15.22%47.00%185

The held-out panel uses 15 pages from nine titles in the NewsEye training ZIP. Epoch 7 was frozen on development data before test inference. The compact model improved on 9 of nine titles relative to the compact variable-height parent. Each score is conditional on the supplied line polygons.

Held-out title IDLinesFinland Swedish CERSwedish parent CERFinnish CER
1238-57431920.67%5.20%1.85%
1457-4276960.90%5.08%2.25%
1457-4799904.05%8.10%9.50%
fk00207690.48%5.66%2.28%
fk00989700.19%4.50%2.29%
fk00996250.24%5.02%2.27%
fk011471200.17%4.61%1.89%
fk09600960.30%4.07%2.02%
fk148641400.68%5.40%2.75%

The official validation ZIP contributes a separate transfer panel. Its six pages had been examined in earlier reader studies. Two pages from the same title contribute 1,089 of the 1,410 lines, so its pooled CER gives that title substantial weight.

Official scanLinesFinland Swedish CERSwedish parent CERFinnish CER
0356-0694_1899-03-16_6_11-gt2730.04%5.24%1.10%
0356-0724_1876_11_22_pr-000034354.59%6.15%6.61%
0356-0724_1909_01_22_pr-0000165414.48%13.57%19.95%
0785-398X_1842-10-19_82_1-gt2771.13%5.81%2.82%
1458-0683_1886-12-24_299_7-gt21260.57%5.50%1.66%
fk01706_1847-01-02_1_8-gt24525.53%15.63%26.24%

Character error increased on the 1909 scan (13.57% to 14.48%) and on the 1847 scan (15.63% to 25.53%). On the 1847 page, 35 reference lines contain a run of at least three periods, optionally separated by spaces. The compact model retained such a run on 0 lines and its Swedish parent on 34. Proofread dotted leaders when transcribing an index or contents page.

Transfer to newspapers printed in Sweden

We also compared the frozen compact readers on the original line rectangles of two previously studied collections from Sweden. The page images and ground truth were distributed by Språkbanken Text. We retained each JPEG hash, rectangle and paired reading in the evaluation files. These panels were used only to describe transfer after the Finland checkpoint was frozen. 1818–1870 source · 1871–1906 source

CollectionLinesFinland Swedish CERSwedish parent CER
1818–18702,8888.07%4.61%
1871–190662410.10%8.63%

Weights, training and attribution

The compact file stores 18 tensors in int8 and dequantizes for floating-point inference. Full-precision ONNX lives in fp32/. During export, CPU FP32 ONNX agreed with single-line PyTorch on all 860 development readings. Compact and FP32 agreed exactly on 847. The root safetensors contain the selected PyTorch weights.

Folio Kestrel adapted the Swedish variable-height reader on 4,413 lines from 36 titles. Its alphabet retains the prior character IDs and adds 16 symbols observed in training. The training archive was split by publication after excluding known Finnish-parent training titles and rasters and the separate official validation titles and rasters. All selected crop pixel hashes were deduplicated. The development split contains 860 lines on 14 pages from nine other titles. The exact initializer, manifests, source checksums, training history and rebuild instructions are included.

Guenter Muehlberger and Guenter Hackl published the NewsEye / READ Swedish newspaper images and PAGE transcriptions from the National Library of Finland under CC BY 4.0. Weights are CC BY-SA 4.0, code is Apache-2.0, and the example, metadata and evaluation records are CC BY 4.0. Source archive · Full credits and inherited sources

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

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

GPU в ailist

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

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

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

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

0 моделей