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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
id: https://doi.org/10.5281/zenodo.21788403
|
| 3 |
+
authors:
|
| 4 |
+
- name: Benjamin Kiessling
|
| 5 |
+
affiliation: ALMAnaCH, Inria Paris
|
| 6 |
+
orcid: https://orcid.org/0000-0001-9543-7827
|
| 7 |
+
summary: PP-OCRv6 (tiny) multilingual handwritten and printed text recognition model
|
| 8 |
+
license: apache-2.0
|
| 9 |
+
software_name: kraken
|
| 10 |
+
software_hints:
|
| 11 |
+
- kraken_version>=7.1.0
|
| 12 |
+
language:
|
| 13 |
+
- ara
|
| 14 |
+
- cat
|
| 15 |
+
- ces
|
| 16 |
+
- chu
|
| 17 |
+
- cos
|
| 18 |
+
- dan
|
| 19 |
+
- deu
|
| 20 |
+
- dum
|
| 21 |
+
- eng
|
| 22 |
+
- fas
|
| 23 |
+
- fin
|
| 24 |
+
- fra
|
| 25 |
+
- frm
|
| 26 |
+
- gez
|
| 27 |
+
- gle
|
| 28 |
+
- grc
|
| 29 |
+
- heb
|
| 30 |
+
- hun
|
| 31 |
+
- ita
|
| 32 |
+
- kat
|
| 33 |
+
- lat
|
| 34 |
+
- lav
|
| 35 |
+
- lit
|
| 36 |
+
- mal
|
| 37 |
+
- mul
|
| 38 |
+
- nld
|
| 39 |
+
- nor
|
| 40 |
+
- oci
|
| 41 |
+
- ota
|
| 42 |
+
- pcd
|
| 43 |
+
- pol
|
| 44 |
+
- por
|
| 45 |
+
- ron
|
| 46 |
+
- rus
|
| 47 |
+
- slk
|
| 48 |
+
- slv
|
| 49 |
+
- spa
|
| 50 |
+
- srp
|
| 51 |
+
- swe
|
| 52 |
+
- syr
|
| 53 |
+
- ukr
|
| 54 |
+
- urd
|
| 55 |
+
- xcl
|
| 56 |
+
- yid
|
| 57 |
+
script:
|
| 58 |
+
- Arab
|
| 59 |
+
- Armn
|
| 60 |
+
- Cyrl
|
| 61 |
+
- Ethi
|
| 62 |
+
- Geor
|
| 63 |
+
- Grek
|
| 64 |
+
- Hebr
|
| 65 |
+
- Latn
|
| 66 |
+
- Mlym
|
| 67 |
+
- Syrc
|
| 68 |
+
keywords:
|
| 69 |
+
- handwritten-text-recognition
|
| 70 |
+
- optical-character-recognition
|
| 71 |
+
- htr
|
| 72 |
+
- ocr
|
| 73 |
+
- kraken
|
| 74 |
+
- ppocr
|
| 75 |
+
- ppocrv6
|
| 76 |
+
- multilingual
|
| 77 |
+
variant_of:
|
| 78 |
+
- https://doi.org/10.5281/zenodo.21788405
|
| 79 |
+
- https://doi.org/10.5281/zenodo.21788410
|
| 80 |
+
model_type:
|
| 81 |
+
- recognition
|
| 82 |
+
metrics:
|
| 83 |
+
cer: 8.71
|
| 84 |
+
wer: 30.0
|
| 85 |
+
cer_macro: 10.99
|
| 86 |
+
wer_macro: 36.16
|
| 87 |
+
library_name: kraken
|
| 88 |
+
pipeline_tag: image-to-text
|
| 89 |
+
tags:
|
| 90 |
+
- handwritten-text-recognition
|
| 91 |
+
- optical-character-recognition
|
| 92 |
+
- htr
|
| 93 |
+
- ocr
|
| 94 |
+
- kraken
|
| 95 |
+
- ppocr
|
| 96 |
+
- ppocrv6
|
| 97 |
+
- multilingual
|
| 98 |
+
---
|
| 99 |
+
|
| 100 |
+
# PP-OCRv6 (tiny) multilingual text recognition base model
|
| 101 |
+
|
| 102 |
+
> **Hugging Face Hub mirror**
|
| 103 |
+
>
|
| 104 |
+
> This repository mirrors the [canonical Zenodo release](https://doi.org/10.5281/zenodo.21788403) by
|
| 105 |
+
> [Benjamin Kiessling](https://orcid.org/0000-0001-9543-7827), ALMAnaCH, Inria Paris.
|
| 106 |
+
> The weights are byte-identical to the Zenodo release and have not been modified by
|
| 107 |
+
> [Small Models for GLAM](https://huggingface.co/small-models-for-glam).
|
| 108 |
+
|
| 109 |
+
## Use from the Hugging Face Hub
|
| 110 |
+
|
| 111 |
+
Install Kraken and the Hugging Face Hub CLI:
|
| 112 |
+
|
| 113 |
+
```shell
|
| 114 |
+
pip install "kraken>=7.1.0" huggingface_hub
|
| 115 |
+
```
|
| 116 |
+
|
| 117 |
+
Download the model and run recognition:
|
| 118 |
+
|
| 119 |
+
```shell
|
| 120 |
+
hf download small-models-for-glam/kraken-ppocrv6-tiny \
|
| 121 |
+
tiny.safetensors \
|
| 122 |
+
--local-dir ./kraken-ppocrv6-tiny
|
| 123 |
+
|
| 124 |
+
kraken -i image.png output.txt \
|
| 125 |
+
segment -bl \
|
| 126 |
+
ocr -m ./kraken-ppocrv6-tiny/tiny.safetensors
|
| 127 |
+
```
|
| 128 |
+
|
| 129 |
+
|
| 130 |
+
## Description
|
| 131 |
+
|
| 132 |
+
This is the **tiny** variant (~0.69M parameters) of a family of PP-OCRv6
|
| 133 |
+
text-line recognition models (`tiny`, `small`, `medium`) for
|
| 134 |
+
[kraken](https://kraken.re). The models are trained from scratch with baseline
|
| 135 |
+
+ bounding polygon data with a very diverse corpus containing historical,
|
| 136 |
+
contemporary and born-digital document line images, handwritten and
|
| 137 |
+
machine-printed, covering 44 languages across 10 scripts (Arabic, Armenian,
|
| 138 |
+
Cyrillic, Ethiopic, Georgian, Greek, Hebrew, Latin, Malayalam, and Syriac).
|
| 139 |
+
|
| 140 |
+
## Architecture
|
| 141 |
+
|
| 142 |
+
PP-OCRv6 is a conventional CTC-based line recognizer consisting of a lightweight
|
| 143 |
+
convolutional backbone and a non-recurrent sequence-modelling neck.
|
| 144 |
+
|
| 145 |
+
The original architecture published as part of PaddlePaddle has been adapted
|
| 146 |
+
for historical ATR by:
|
| 147 |
+
|
| 148 |
+
* increasing line height to 128px
|
| 149 |
+
* uncapping line width/CTC label budget
|
| 150 |
+
* replacing the optimizer with Adam+Muon
|
| 151 |
+
|
| 152 |
+
## Uses
|
| 153 |
+
|
| 154 |
+
This is a base model that is supposed to produce usable output across a wide
|
| 155 |
+
range of scripts and materials out of the box while also allowing fine-tuning
|
| 156 |
+
with ease. It should offer similar accuracy and generalization to VLM-based
|
| 157 |
+
recognizers without hallucinations and with vastly higher throughput. This
|
| 158 |
+
medium variant model achieves the highest scores on the test set, `tiny` and
|
| 159 |
+
`small` trade accuracy for inference speed and a smaller memory footprint.
|
| 160 |
+
|
| 161 |
+
## Transcription guidelines, Normalization, and Transformations
|
| 162 |
+
|
| 163 |
+
No attempt has been made to normalize the source datasets to a single set of
|
| 164 |
+
transcription guidelines; the corpus mixes conventions, so inconsistent output
|
| 165 |
+
is to be expected, in particular for Latin-script European manuscripts which
|
| 166 |
+
mix large datasets such as CATMuS and TRIDIS that have very different
|
| 167 |
+
approaches to transcription. Text was normalized to Unicode **NFD** and
|
| 168 |
+
whitespace was normalized during training and evaluation.
|
| 169 |
+
|
| 170 |
+
## Bias, Risks, and Limitations
|
| 171 |
+
|
| 172 |
+
The training corpus is heavily skewed towards a handful of high-resource
|
| 173 |
+
languages (English, French, German, Latin, Dutch, Middle French, ...). Languages
|
| 174 |
+
with little real training material show markedly higher error rates and will
|
| 175 |
+
require fine-tuning for practical use. Because transcription conventions are
|
| 176 |
+
inconsistent across sources, the model may resolve abbreviations or expand
|
| 177 |
+
glyphs unpredictably.
|
| 178 |
+
|
| 179 |
+
The synthetic data used for training was created with the pangoline tool which
|
| 180 |
+
is limited to approximating modern, machine-printed text. For the
|
| 181 |
+
languages/scripts present only as synthetic data (Classical Armenian, Geʽez)
|
| 182 |
+
and to a lesser extent those sharing the Latin script (Irish, Latvian,
|
| 183 |
+
Lithuanian, Romanian, Serbian, Slovenian), real-world accuracy is probably
|
| 184 |
+
limited.
|
| 185 |
+
|
| 186 |
+
## How to Get Started with the Model
|
| 187 |
+
|
| 188 |
+
Install `kraken` (>= 7.1.0), download the model, and run recognition on an
|
| 189 |
+
input image:
|
| 190 |
+
|
| 191 |
+
```shell
|
| 192 |
+
kraken -i image.png output.txt \
|
| 193 |
+
segment -bl \
|
| 194 |
+
ocr -m tiny.safetensors
|
| 195 |
+
```
|
| 196 |
+
|
| 197 |
+
For more information, refer to the [documentation](https://kraken.re).
|
| 198 |
+
|
| 199 |
+
## Training Details
|
| 200 |
+
|
| 201 |
+
### Training Data
|
| 202 |
+
|
| 203 |
+
The model was trained on publicly available and restricted (private) datasets.
|
| 204 |
+
Datasets marked as *private* are part of the training mixture but are not
|
| 205 |
+
redistributable. A **†** marks languages that were additionally
|
| 206 |
+
augmented with synthetic training data (see below).
|
| 207 |
+
|
| 208 |
+
| Language | Script | Datasets |
|
| 209 |
+
|----------|:------:|----------|
|
| 210 |
+
| Ancient Greek † | Greek | [EPARCHOS](https://zenodo.org/records/4095301), [HPGTR](https://github.com/vivianpl/HPGTR), [HTR_CPgr23](https://gitlab.huma-num.fr/ecrinum/anthologia/htr_cpgr23), [Stavronikita Monastery Greek Handwritten Document Collection No. 114](https://zenodo.org/records/5578251), [Stavronikita Monastery Greek Handwritten Document Collection No. 53](https://zenodo.org/records/5595669), [Stavronikita Monastery Greek Handwritten Document Collection No. 79](https://zenodo.org/records/5578136), 11 private datasets |
|
| 211 |
+
| Arabic † | Arabic | [Agapet](https://zenodo.org/records/15473122), [arabic_ms_data](https://github.com/OpenITI/arabic_ms_data), [iskandar](https://github.com/OpenITI/arabic_ms_data), [Muharaf: Manuscripts of Handwritten Arabic Dataset](https://github.com/MehreenMehreen/muharaf), [OpenITI Arabic Print Data](https://github.com/OpenITI/arabic_print_data), [RASAM dataset](https://github.com/calfa-co/rasam-dataset), [TariMa](https://github.com/calfa-co/tarima) |
|
| 212 |
+
| Catalan | Latin | [FONDUE-CA-PRINT-20](https://github.com/FoNDUE-HTR/FONDUE-CA-PRINT-20), [htromance-spa](https://github.com/HTRomance-Project/middle-ages-in-spain), 1 private dataset |
|
| 213 |
+
| Church Slavonic | Cyrillic | 3 private datasets |
|
| 214 |
+
| Classical Armenian † | Armenian | *synthetic only* |
|
| 215 |
+
| Corsican | Latin | [OCR Corse](https://github.com/PSL-Chartes-HTR-Students/HN2021-OCR-Poesie-Corse) |
|
| 216 |
+
| Czech † | Latin | [2024--medieval-czech-main](https://github.com/HTR-School-Vienna/2024--medieval-czech), [2023--medieval-czech](https://github.com/HTR-School-Vienna/2023--medieval-czech), [HTR Winter School 2025 - Medieval Czech - Biblioteka Jagiellonska BJ Rkp 441 IV](https://github.com/HTR-School-Vienna/2025--medieval-czech), [Paderov Bible handwriting ground truth](https://zenodo.org/records/7467034), [ehri](https://github.com/FloChiff/ehri-dataset) |
|
| 217 |
+
| Danish | Latin | [ehri](https://github.com/FloChiff/ehri-dataset) |
|
| 218 |
+
| Dutch † | Latin | [6000 ground truth of VOC and notarial deeds / HTR of VOC, WIC and notarial deeds](https://zenodo.org/records/11209325), [ARletta](https://doi.org/10.5281/zenodo.11191457), [Dagboek Ernest Clarysse](https://zenodo.org/records/13769222), [FONDUE-NE-MSS-17-PR](https://github.com/FoNDUE-HTR/FONDUE-NE-MSS-17-PR) |
|
| 219 |
+
| English | Latin | [FONDUE-EN-PRINT-20](https://github.com/FoNDUE-HTR/FONDUE-EN-PRINT-20), [IAM Handwriting Database](https://fki.tic.heia-fr.ch/databases/iam-handwriting-database), [jcrs_train](https://zenodo.org/records/4243023), [jcrs_val](https://zenodo.org/records/4243023), [JosephHookerHTR](https://doi.org/10.5281/zenodo.8038689), [OCR-D gt_structure_text](https://github.com/OCR-D/gt_structure_text), [sloanelab](https://github.com/sloanelab-org/HTR-Model), [The Revolutionary City / RevCity documentation](https://americanphilosophicalsociety.github.io/RevCityDocs/), [Memorials for Jane Lathrop Stanford](https://github.com/PSL-Chartes-HTR-Students/HN2021-Memorials_Jane_Lathrop_Stanford), [ehri](https://github.com/FloChiff/ehri-dataset), 2 private datasets |
|
| 220 |
+
| Finnish † | Latin | [NewsEye/READ OCR Finnish Newspapers](https://zenodo.org/records/4599472) |
|
| 221 |
+
| French | Latin | [Antoine Verard extracts](https://github.com/LaurieHoeben/Verard-corpus), [Copiste-d-un-jour](https://github.com/banq-dcn/Copiste-d-un-jour), [corpus-HTR-lignes-mixtes](https://github.com/Front-Justice/corpus-HTR-lignes-mixtes), [dataset-celestine-doniau-danest](https://github.com/alix-tz/dataset-celestine-doniau-danest), [FONDUE-FR-MSS-19](https://github.com/FoNDUE-HTR/FONDUE-FR-MSS-19), [FONDUE-FR-MSS-19-PR](https://github.com/FoNDUE-HTR/FONDUE-FR-MSS-19-PR), [FONDUE-FR-PRINT-20](https://github.com/FoNDUE-HTR/FONDUE-FR-PRINT-20), [FONDUE-MLT-ART](https://github.com/FoNDUE-HTR/FONDUE-MLT-ART), [genauto-td-htr](https://github.com/jpmjpmjpm/genauto-td-htr), [HTR Front Justice](https://github.com/Front-Justice/htr-front-justice), [La Correspondance Doucet-Rene Jean](https://nakala.fr/10.34847/nkl.48ad8b8d), [Memoire sur St Domingue par H. M. Michel](https://zenodo.org/records/13784411), [Moonshines](https://github.com/alix-tz/moonshines), [NewsEye READ AS French Newspapers](https://zenodo.org/records/5654841), [NuBIS-OCR](https://github.com/ksefil/NuBIS-OCR), [Recensement Valaisan (Valais Time Machine)](https://github.com/PonteIneptique/valais-recensement), [Tapus Corpus](https://github.com/HTR-United/tapuscorpus), [TIMEUS Corpus](https://github.com/HTR-United/timeuscorpus), [TitresNobiliaires_17_18](https://github.com/HisMoDoc-HTR/TitresNobiliaires_17_18), [CREMMA Manuscrits du 20e](https://github.com/HTR-United/CREMMA-MSS-20), [CREMMA Wikipedia](https://github.com/HTR-United/cremma-wikipedia), [Maxime Kovalewsky - Coutume contemporaine et loi ancienne (1893)](https://github.com/PSL-Chartes-HTR-Students/HN2021-Kovalewsky-1893), [HTRomance, Modern Roman languages corpus](https://github.com/HTRomance-Project/modern-roman-languages), [Peraire Ground Truth](https://github.com/alix-tz/peraire-ground-truth), [PARES](https://zenodo.org/records/15719530), 1 private dataset |
|
| 222 |
+
| Georgian † | Georgian | 15 private datasets |
|
| 223 |
+
| German | Latin | [2024--medieval-german](https://github.com/JulianHelmchen/2024--medieval-german), [2025--Early-Modern-German](https://github.com/HTR-School-Vienna/2025--early-modern-german), [Bullinger Digital Gwalther handwriting ground truth](https://zenodo.org/records/5153263), [charlottenburger-amtsschrifttum](https://github.com/UB-Mannheim/charlottenburger-amtsschrifttum), [Chronicling Germany](https://github.com/Digital-History-Bonn/Chronicling-Germany-Code), [dach-gt](https://github.com/UB-Mannheim/dach-gt), [DigiTheo Ground Truth](https://github.com/tboenig/DTGT), [Dresdner Hofdiarium](https://zenodo.org/records/15303398), [Fibeln](https://github.com/UB-Mannheim/Fibeln), [FONDUE-DE-MSS-16-PR](https://github.com/FoNDUE-HTR/FONDUE-DE-MSS-16-PR), [FONDUE-DE-MSS-18](https://github.com/FoNDUE-HTR/FONDUE-DE-MSS-18), [FONDUE-DE-MSS-19-PR](https://github.com/FoNDUE-HTR/FONDUE-DE-MSS-19-PR), [FONDUE-DE-MSS-20-PR](https://github.com/FoNDUE-HTR/FONDUE-DE-MSS-20-PR), [FONDUE-MLT-ART](https://github.com/FoNDUE-HTR/FONDUE-MLT-ART), [FONDUE-MLT-PRINT-TEST](https://github.com/FoNDUE-HTR/FONDUE-MLT-PRINT-TEST), [FoNDUE_Kunsthistorisches-UZH_Archivdatenbank](https://github.com/FoNDUE-HTR/FoNDUE_Kunsthistorisches-UZH_Archivdatenbank), [Ground truth for Neue Zurcher Zeitung black letter](https://zenodo.org/records/3333627), [Hakenkreuzbanner](https://github.com/UB-Mannheim/Hakenkreuzbanner), [inzigkofen](https://zenodo.org/records/17978574), [Klosterneuburg, Stiftsbibl., Cod. 48](https://zenodo.org/records/7466928), [koenigsfelden](https://zenodo.org/records/5179361), [mkn-kurrent-gt](https://github.com/bertsky/mkn-kurrent-gt), [NewsEye / READ OCR Austrian Newspapers](https://zenodo.org/records/3387369), [nuremberg_letterbooks](https://zenodo.org/records/13881575), [OCR-D gt_structure_text](https://github.com/OCR-D/gt_structure_text), [reichsanzeiger-gt](https://github.com/UB-Mannheim/reichsanzeiger-gt), [Training Data Incunabula Reichenau](https://zenodo.org/records/11046062), [Weisthuemer](https://github.com/UB-Mannheim/Weisthuemer), [gt-fraktur](https://github.com/ubtue/gt-fraktur), [german_kurrent_handwritten_text_lines](https://zenodo.org/records/17252677), [Ground Truth (Tagebücher Edwin Hennig)](https://github.com/ubtue/Ground-Truth), [ehri](https://github.com/FloChiff/ehri-dataset), [Fanny loves Wilhelm](https://zenodo.org/records/15223355), [Frauen im Fokus](https://zenodo.org/records/11038498), [Graphemic Early New German](https://zenodo.org/records/18441031), 1 private dataset |
|
| 224 |
+
| German (shorthand) | Latin | 1 private dataset |
|
| 225 |
+
| Geʽez † | Ethiopic | *synthetic only* |
|
| 226 |
+
| Hebrew | Hebrew | [2025-hebrew](https://github.com/HTR-School-Vienna/2025-hebrew), 2 private datasets |
|
| 227 |
+
| Hungarian | Latin | [ehri](https://github.com/FloChiff/ehri-dataset) |
|
| 228 |
+
| Irish † | Latin | *synthetic only* |
|
| 229 |
+
| Italian | Latin | [Diario del Soldato Bruno Celestino](https://zenodo.org/records/13760586), [EpiSearch HTR](https://github.com/vedph/episearch-htr), [FONDUE-IT-PRINT-20](https://github.com/FoNDUE-HTR/FONDUE-IT-PRINT-20), [FONDUE-IT-PRINT-20-PR](https://github.com/FoNDUE-HTR/FONDUE-IT-PRINT-20-PR), [HTRogène Medieval Italian Manuscripts](https://github.com/HTRogene/italian), [HTRomance, Medieval Italian corpus of ground-truth for Handwritten Text Recognition](https://github.com/HTRomance-Project/medieval-italian), [leopardi](https://github.com/aimagelab/HWD/releases/tag/leopardi), [LiDi1.0-project](https://github.com/Giorgiaagostini/LiDi1.0-project), [LAM](https://aimagelab-legacy.ing.unimore.it/imagelab/page.asp?IdPage=46), 1 private dataset |
|
| 230 |
+
| Latin | Latin | [2025--late-medieval-latin-main](https://htr-school-vienna.github.io/2025--late-medieval-latin/), [burchards-dekret-digital](https://gitlab.rlp.net/adwmainz/projekte/burchards-dekret-digital/data.git), [Caroline Minuscule ground truth](https://github.com/rescribe/carolineminuscule-groundtruth), [Carolingian Latin Group HTR Wien Winter School 2025](https://github.com/HTR-School-Vienna/2025--Carolingian_Latin-), [CREMMA Medii Aevi](https://github.com/HTR-United/CREMMA-Medieval-LAT), [DISTINGUO Latin ground truth](https://zenodo.org/records/4780947), [Eutyches](https://github.com/malamatenia/Eutyches), [FONDUE-LA-MSS-16-PR](https://github.com/FoNDUE-HTR/FONDUE-LA-MSS-16-PR), [FONDUE-LA-MSS-17-PR](https://github.com/FoNDUE-HTR/FONDUE-LA-MSS-17-PR), [FONDUE-LA-MSS-MA](https://github.com/FoNDUE-HTR/FONDUE-LA-MSS-MA), [FONDUE-LA-PRINT-16](https://github.com/FoNDUE-HTR/FONDUE-LA-PRINT-16), [HTR Winter School 2023/2024 - Late Medieval Latin, ONB 3891](https://github.com/HTR-School-Vienna/2023--late-medieval-latin), [HTR Winter School 2024/2025 - Late Medieval Latin, ONB 4135; ONB 4680](https://github.com/HTR-School-Vienna/2024--late-medieval-latin), [HTRogène Medieval Latin Manuscripts](https://github.com/HTRogene/latin), [HTRomance, Medieval Latin corpus of ground-truth for Handwritten Text Recognition](https://github.com/HTRomance-Project/medieval-latin), [notarial_charter](https://dl.acm.org/doi/abs/10.1007/978-3-032-04624-6_20), [nubis](https://github.com/ksefil/NuBIS-OCR), [OCR-D gt_structure_text](https://github.com/OCR-D/gt_structure_text), [Paris Bible Project](https://github.com/parisbible/ground_truth), [Training Data Incunabula Reichenau](https://zenodo.org/records/11046062), [Wien ONB Cod 2160 ground truth](https://zenodo.org/records/7537204) |
|
| 231 |
+
| Latvian † | Latin | *synthetic only* |
|
| 232 |
+
| Lithuanian † | Latin | *synthetic only* |
|
| 233 |
+
| Malayalam | Malayalam | [Ground Truth data for printed Malayalam](https://doi.org/10.11588/data/L2KRZO) |
|
| 234 |
+
| Middle Dutch | Latin | [data](https://zenodo.org/records/10005366) |
|
| 235 |
+
| Middle French | Latin | [Cremma Medieval](https://github.com/HTR-United/cremma-medieval), [De la généalogie des dieux](https://github.com/PSL-Chartes-HTR-Students/HN2021-Boccace), [Données imprimés du 16e siècle](https://github.com/Gallicorpora/HTR-imprime-16e-siecle), [Données HTR incunables du 15e siècle](https://github.com/Gallicorpora/HTR-incunable-15e-siecle), [Données HTR manuscrits du 15e siècle](https://github.com/Gallicorpora/HTR-MSS-15e-Siecle), [Données imprimés du 18e siècle](https://github.com/Gallicorpora/HTR-imprime-18e-siecle), [Données imprimés gothiques du 16e siècle](https://github.com/Gallicorpora/HTR-imprime-16e-siecle), [Fabliaux](https://github.com/CIHAM-HTR/Fabliaux), [FONDUE-FR-AAEB-16](https://github.com/FoNDUE-HTR/FONDUE-FR-AAEB-16), [FONDUE-FR-AAEB-17](https://github.com/FoNDUE-HTR/FONDUE-FR-AAEB-17), [FONDUE-FR-MSS-18](https://github.com/FoNDUE-HTR/FONDUE-FR-MSS-18), [FONDUE-FR-PRINT-16](https://github.com/FoNDUE-HTR/FONDUE-FR-PRINT-16), [FONDUE-FR-PRINT-17](https://github.com/FoNDUE-HTR/FONDUE-FR-PRINT-17), [HTR-SETAF-Jean-Michel](https://github.com/SETAFDH/HTR-SETAF-Jean-Michel), [HTR-SETAF-LesFaictzJCH](https://github.com/SETAFDH/HTR-SETAF-LesFaictzJCH), [HTR-SETAF-Pierre-de-Vingle](https://github.com/SETAFDH/HTR-SETAF-Pierre-de-Vingle), [HTRogene French](https://github.com/HTRogene/french), [HTRomance, Medieval French corpus of ground-truth for Handwritten Text Recognition](https://github.com/HTRomance-Project/medieval-french), [Imprimés 17e siècle](https://github.com/Gallicorpora/HTR-imprime-17e-siecle), [Liber](https://github.com/CIHAM-HTR/Liber), [OCR17plus](https://github.com/e-ditiones/OCR17), [TNAH-2021-DecameronFR](https://github.com/PSL-Chartes-HTR-Students/TNAH-2021-DecameronFR), [transcription-chastel](https://github.com/LaBretelle/transcription-chastel) |
|
| 236 |
+
| Multilingual (mixed) | Latin | [Training Data Incunabula Reichenau](https://zenodo.org/records/11046062), [TranscriboQuest25_MedVernacReligio](https://doi.org/10.5281/zenodo.15030337) |
|
| 237 |
+
| Norwegian | Latin | [NorHand v3 / Dataset for Handwritten Text Recognition in Norwegian](https://zenodo.org/records/10255840) |
|
| 238 |
+
| Occitan | Latin | [HTRogène Medieval Occitan Manuscripts](https://github.com/HTRogene/occitan), 1 private dataset |
|
| 239 |
+
| Ottoman Turkish | Arabic | [mehmed_ibn_mehmed_uskubi_cukrikcizade_altiparmak_risale](https://github.com/OpenITI/arabic_ms_data), [OpenITI Arabic-script OCR Catalyst Project print/typeface data](https://github.com/OpenITI/arabic_print_data) |
|
| 240 |
+
| Persian † | Arabic | [hafiz_divan](https://github.com/OpenITI/arabic_ms_data), [OpenITI Arabic-script OCR Catalyst Project print/typeface data](https://github.com/OpenITI/arabic_print_data), [sadi_gulistan](https://github.com/OpenITI/arabic_ms_data) |
|
| 241 |
+
| Picard | Latin | 1 private dataset |
|
| 242 |
+
| Polish † | Latin | [ehri](https://github.com/FloChiff/ehri-dataset) |
|
| 243 |
+
| Portuguese | Latin | [iForal-Dataset](https://github.com/Arch-W/iForal-Dataset), [Portuguese Handwriting 16th-19th c.](https://zenodo.org/records/13986218) |
|
| 244 |
+
| Romanian † | Latin | *synthetic only* |
|
| 245 |
+
| Russian † | Cyrillic | 2 private datasets |
|
| 246 |
+
| Serbian (Cyrillic) † | Cyrillic | *synthetic only* |
|
| 247 |
+
| Slovak | Latin | [Slovensky Supermodel P&T1](https://zenodo.org/records/11218527), [ehri](https://github.com/FloChiff/ehri-dataset) |
|
| 248 |
+
| Slovenian † | Latin | *synthetic only* |
|
| 249 |
+
| Spanish | Latin | [FoNDUE Spanish chapbooks 19th c. Dataset](https://github.com/DesenrollandoElCordel/FoNDUE-Spanish-chapbooks-Dataset), [FONDUE-ES-MSS-19-PR](https://github.com/FoNDUE-HTR/FONDUE-ES-MSS-19-PR), [FONDUE-ES-PRINT-19](https://github.com/FoNDUE-HTR/FONDUE-ES-PRINT-19), [HTR - Araucania manuscript XIX](https://github.com/Proyecto-Ocupacion-Araucania-UChile/HTR_Araucania_XIX), [HTRogène Medieval Spanish Manuscripts](https://github.com/HTRogene/spanish), [HTRomance, Medieval Spain corpus of ground-truth for Handwritten Text Recognition](https://github.com/HTRomance-Project/middle-ages-in-spain), [ohg](https://zenodo.org/records/1322666), 3 private datasets |
|
| 250 |
+
| Swedish | Latin | [Finnish Court Records-sub500](https://zenodo.org/records/3945088), [kat57 Swedish ground truth dataset](https://zenodo.org/records/14679534), [NewsEye / READ OCR training dataset from Swedish Newspapers](https://zenodo.org/records/4599624), [riskarchiv](https://huggingface.co/collections/Riksarkivet/training-data-for-swedish-lion-libre) |
|
| 251 |
+
| Syriac † | Syriac | [zenodo.18157525](https://doi.org/10.5281/zenodo.18157525), [winter_school_vienna](https://zenodo.org/records/14714089), 2 private datasets |
|
| 252 |
+
| Ukrainian | Cyrillic | 1 private dataset |
|
| 253 |
+
| Urdu | Arabic | [OpenITI Arabic-script OCR Catalyst Project print/typeface data](https://github.com/OpenITI/arabic_print_data) |
|
| 254 |
+
| Yiddish | Hebrew | 7 private datasets |
|
| 255 |
+
|
| 256 |
+
### Synthetic Training Data
|
| 257 |
+
|
| 258 |
+
Synthetic line images were generated as additional training material for
|
| 259 |
+
18 languages: Ancient Greek, Arabic, Classical Armenian, Czech, Dutch, Finnish, Georgian, Geʽez, Irish, Latvian, Lithuanian, Persian, Polish, Romanian, Russian, Serbian, Slovenian, Syriac.
|
| 260 |
+
Of these, eight are present **only** as synthetic data: Classical Armenian, Geʽez, Irish, Latvian, Lithuanian, Romanian, Serbian (Cyrillic), Slovenian.
|
| 261 |
+
|
| 262 |
+
### Training Procedure and Hyperparameters
|
| 263 |
+
|
| 264 |
+
The model was trained with kraken (feature/ppocrv6_rec branch).
|
| 265 |
+
|
| 266 |
+
| | |
|
| 267 |
+
|---|---|
|
| 268 |
+
| Hardware | 3 × NVIDIA H100 |
|
| 269 |
+
| Precision | bf16-mixed |
|
| 270 |
+
| Optimizer | AdamW + Muon (momentum 0.95, weight decay 0.01) |
|
| 271 |
+
| Learning rate | 1.7e-3 (cosine schedule, 1500 step warmup, min 1e-6) |
|
| 272 |
+
| Batch size | 128 |
|
| 273 |
+
| Gradient clipping | 1.0 |
|
| 274 |
+
| Epochs | 16 |
|
| 275 |
+
| Normalization | NFD + whitespace |
|
| 276 |
+
| Augmentation | enabled |
|
| 277 |
+
|
| 278 |
+
## Evaluation
|
| 279 |
+
|
| 280 |
+
### Testing Data
|
| 281 |
+
|
| 282 |
+
Metrics are computed on a held-out test set for each language. The test split
|
| 283 |
+
was obtained by random 5% split with an upper limit of 100 document pages per
|
| 284 |
+
language. No attempt has been made to split in a manner that separates documents
|
| 285 |
+
between train and test. The scores below are therefore best read as in-domain
|
| 286 |
+
generalization.
|
| 287 |
+
|
| 288 |
+
Evaluations with purely synthetic data are marked with **‡**. CER and WER are
|
| 289 |
+
the character- and word-level error rates, computed with `torchmetrics` using
|
| 290 |
+
greedy CTC decoding and the NFD + whitespace normalization (equivalent to
|
| 291 |
+
`ketos test -u NFD -n`).
|
| 292 |
+
|
| 293 |
+
### Metrics
|
| 294 |
+
|
| 295 |
+
| Language | Lines | CER (%) | WER (%) |
|
| 296 |
+
|----------|------:|--------:|--------:|
|
| 297 |
+
| Ancient Greek | 451 | 22.98 | 87.79 |
|
| 298 |
+
| Arabic | 1,926 | 20.11 | 68.77 |
|
| 299 |
+
| Catalan | 128 | 5.47 | 26.59 |
|
| 300 |
+
| Church Slavonic | 6,599 | 17.81 | 65.44 |
|
| 301 |
+
| Classical Armenian ‡ | 3,580 | 0.64 | 3.23 |
|
| 302 |
+
| Corsican | 50 | 1.88 | 13.33 |
|
| 303 |
+
| Czech | 922 | 15.47 | 61.28 |
|
| 304 |
+
| Danish | 25 | 1.29 | 10.89 |
|
| 305 |
+
| Dutch | 4,384 | 14.31 | 51.81 |
|
| 306 |
+
| English | 2,005 | 14.43 | 46.77 |
|
| 307 |
+
| Finnish | 7,907 | 1.16 | 6.83 |
|
| 308 |
+
| French | 5,967 | 14.02 | 31.40 |
|
| 309 |
+
| Georgian | 394 | 28.72 | 85.71 |
|
| 310 |
+
| German | 3,007 | 4.61 | 17.96 |
|
| 311 |
+
| German (shorthand) | 830 | 41.20 | 84.51 |
|
| 312 |
+
| Geʽez ‡ | 2,992 | 1.27 | 5.58 |
|
| 313 |
+
| Hebrew | 3,426 | 9.11 | 26.32 |
|
| 314 |
+
| Hungarian | 38 | 3.20 | 23.05 |
|
| 315 |
+
| Irish ‡ | 2,824 | 1.00 | 4.15 |
|
| 316 |
+
| Italian | 2,611 | 7.22 | 28.24 |
|
| 317 |
+
| Latin | 5,748 | 14.03 | 44.34 |
|
| 318 |
+
| Latvian ‡ | 2,397 | 1.25 | 6.48 |
|
| 319 |
+
| Lithuanian ‡ | 2,615 | 1.30 | 6.73 |
|
| 320 |
+
| Malayalam | 59 | 48.79 | 99.21 |
|
| 321 |
+
| Middle Dutch | 3,014 | 12.44 | 43.63 |
|
| 322 |
+
| Middle French | 3,970 | 8.70 | 32.38 |
|
| 323 |
+
| Multilingual (mixed) | 241 | 3.49 | 17.99 |
|
| 324 |
+
| Norwegian | 2,335 | 14.96 | 48.04 |
|
| 325 |
+
| Ottoman Turkish | 451 | 10.70 | 48.25 |
|
| 326 |
+
| Persian | 990 | 9.34 | 36.76 |
|
| 327 |
+
| Polish | 2,766 | 1.93 | 10.21 |
|
| 328 |
+
| Portuguese | 2,763 | 23.53 | 71.50 |
|
| 329 |
+
| Romanian ‡ | 2,412 | 1.50 | 6.87 |
|
| 330 |
+
| Russian | 3,053 | 25.11 | 68.33 |
|
| 331 |
+
| Serbian (Cyrillic) ‡ | 2,789 | 0.58 | 2.71 |
|
| 332 |
+
| Slovak | 1,550 | 5.11 | 21.50 |
|
| 333 |
+
| Slovenian ‡ | 2,741 | 2.42 | 6.87 |
|
| 334 |
+
| Spanish | 5,465 | 6.19 | 21.49 |
|
| 335 |
+
| Swedish | 3,555 | 11.89 | 45.04 |
|
| 336 |
+
| Syriac | 1,801 | 10.74 | 44.40 |
|
| 337 |
+
| Ukrainian | 1,253 | 13.71 | 47.56 |
|
| 338 |
+
| Urdu | 1,656 | 10.20 | 41.89 |
|
| 339 |
+
| Yiddish | 4,320 | 8.96 | 32.79 |
|
| 340 |
+
| **Aggregate (micro-average)** | 108,010 | **8.71** | **30.00** |
|
| 341 |
+
| **Aggregate (macro-average)** | | **10.99** | **36.16** |
|
| 342 |
+
|
| 343 |
+
## License
|
| 344 |
+
|
| 345 |
+
Released under the Apache-2.0 license.
|
| 346 |
+
|
| 347 |
+
## Acknowledgements
|
| 348 |
+
|
| 349 |
+
Training of this model was funded by the European Union under Grant Agreement
|
| 350 |
+
No.~101132163 (ATRIUM) and No.~101071829 (MiDRASH). Views and opinions
|
| 351 |
+
expressed are those of the authors only and do not necessarily reflect those of
|
| 352 |
+
the European Union.
|
| 353 |
+
|
| 354 |
+
This project also received funding from the BPI Scribe project.
|
| 355 |
+
|
| 356 |
+
## Citation
|
| 357 |
+
|
| 358 |
+
If you use this model, please cite kraken and if possible credit the dataset
|
| 359 |
+
providers linked in the front matter and the table above.
|
tiny.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:972700b1c72de14bdde028f9b06d77f13c88ec60da5e942bb9e57aca421fa361
|
| 3 |
+
size 2837508
|