Greek OCR (v0.10)
A line-level text recogniser for printed Greek. It reads modern (monotonic) and polytonic Greek and also Latin and Cyrillic text, as well as mixed lines, numbers and page furniture. All of this comes from one codec of 266 classes.
The model takes one cropped text-line image and returns its text. It needs only a line segmenter in front of it to cut the page into lines; no layout model is required. The line segmenter is part of the toolkit. Docling has no line segmenter of its own; it provides page layout. The toolkit's Docling OCR plugin runs the toolkit's line segmenter on each page and then this recogniser on each line.
Three sizes are released, all trained on the same data with the same recipe:
Each folder holds model.safetensors, config.json, codec.json and MANIFEST.json (sha256 of each file).
Related artefacts
- Collection: Greek OCR (models + datasets)
- Dataset:
fffoivos/greek-ocr-lines(v0.5, commit8f3de247), the exact line images and labels used for training, validation and testing. Configrealholds the real lines; configsyntheticholds the synthetic training lines, each with its applied degradation ops, font and the generator recipe - Code (training, export, Docling plugin):
fffoivos/greek-ocr-toolkit
Results
CER is the character error rate as a fraction (0.0100 = 1.00%). Exact = the share of lines read perfectly (NFC). Each released checkpoint is the best of the 8 epoch-end evaluations on seal04_dev; Stage B chose hyperparameters on pooled dev (harvest_dev + seal04_dev). The test sets were reported once and selected nothing.
Test (report only)
| Model | harvest_test CER (NFC) | harvest_test exact | seal04_test CER (NFC) | seal04_test exact |
|---|---|---|---|---|
| Γ1 | 0.0064 | 81.6% | 0.0190 | 79.2% |
| Γ1.5 | 0.0063 | 81.9% | 0.0187 | 80.4% |
| Γ2 | 0.0060 | 82.4% | 0.0175 | 81.2% |
Dev (used for checkpoint selection)
| Model | harvest_dev CER (NFC) | harvest_dev exact | seal04_dev CER (NFC) | seal04_dev exact |
|---|---|---|---|---|
| Γ1 | 0.0106 | 82.2% | 0.0346 | 80.8% |
| Γ1.5 | 0.0108 | 82.3% | 0.0331 | 79.6% |
| Γ2 | 0.0104 | 83.0% | 0.0324 | 78.9% |
- harvest_test: 52,847 lines (harvest_dev: 16,350). These are real book pages from many sources (Internet Archive polytonic 1850s/1900s and Greek 1950β1980, NLG, BSB, Serbian Cyrillic, IEP, University of Ioannina), mostly polytonic.
- seal04_test: 2,253 lines (seal04_dev: 437). This is a hand-checked panel.
- The Γ2 model is the most accurate. Γ1 is within about 0.0004 CER on harvest_test at under half the size. The full per-source, per-script, per-length breakdowns, the confusion tables and the paired bootstrap are in
evaluation/REPORT.md; the machine-readable numbers are inevaluation/SUMMARY.json.
Speed (harvest_dev sample, see REPORT.md): on a GH200 GPU in bf16, Γ1.5 runs at about 2.9 ms/line with batch 256 (β350 lines/s). On CPU fp32 it runs at about 230 ms/line with batch 1 and 8 threads. Some CPU batch-32 timings were slower than batch 1, which is an open benchmarking anomaly.
Model details
- Architecture: compact convolutional line recogniser with a CTC head (
arch=compact,head=nfd), 266 output classes, codecv2.1(sha256eae613e8eb18fd144314f68ae3b6424fb48dd778a2134fef417b06ac2353c4b6). - Input: grayscale line image resized to height 48, normalised with mean 0.5 / std 0.5, right-padded with the line's own background (margin 128).
- Decoding: greedy CTC. Characters are predicted in NFD (base letter + combining accents/breathings), and output is returned in NFC.
- Training: 8 epochs on real lines (β50%) mixed with synthetic lines (β50%). The selected checkpoint is the end of epoch 8 for all three widths, chosen by strict improvement over the eight epoch-end seal04_dev evaluations.
Usage
With the toolkit installed (greekocr package from the GitHub repo):
from huggingface_hub import snapshot_download
from greekocr.train.export import load_release
path = snapshot_download("fffoivos/greek-ocr", allow_patterns=["x2/*"])
model, codec, config = load_release(f"{path}/x2") # fp32, eval mode
To use it in Docling, point the toolkit's Docling OCR plugin (greekocr.deploy.docling_plugin) at the release folder; the plugin runs the toolkit's line segmenter and then this model.
Training state
The intermediate per-epoch checkpoints (step-*.pt) for every width are on the training-state branch.
Versions
- v0.10 (2026-10-29): first public release of Γ1, Γ1.5 and Γ2 (the tenth OCR model generation; see
VERSIONS.mdin the toolkit). Docling-path parity check: pending (non-blocking). The repo layout and card are being completed by the release builder: predictions, loss curves,training_source/, and the full continuation closure ontraining-state.