Indra OCR โ€” Church Slavonic fine-tune (ocs-mix-clean)

Fine-tuned Datalab Indra OCR line recognizer (rec.onnx) for Church Slavonic / Old Cyrillic manuscript lines. Detector, order, and other pipeline ONNX files are the shipped Indra stack; only the recognizer head/vocab were adapted in this run.

Built with indra-ocr-ft.

Credits

  • Datalab โ€” Indra OCR models and runtime (datalab-to/indra-ocr). Weights remain under their modified OpenRAIL-M terms (see LICENSE in this folder).
  • William Mattingly โ€” guidance and collaboration on the fine-tune setup.
  • Achim Rabus (Slavic Department, University of Freiburg) โ€” Church Slavonic PAGE datasets used for this fine-tune (same manuscript collection documented on his CRNN-CTC model card: achimrabus/crnn-ctc-church-slavonic). The Transkribus model behind that collection was trained by Elena Renje as part of the QuantiSlav project and curated by Achim Rabus.
  • Prof. Vladimir Polomac (University of Kragujevac, Serbia) โ€” Macarius Church Slavonic PAGE dataset.

Training data

Local mix of PAGE-XML + page images (GT line boxes):

Corpus Role Credit
cu-Generic_Church_Slavonic_Handwriting Primary Church Slavonic handwriting pages Achim Rabus / QuantiSlav (see above)
Macarius Additional Church Slavonic pages Prof. Vladimir Polomac (University of Kragujevac, Serbia)

Manuscript sources (as listed by Achim Rabus for this collection):

  • Codex Suprasliensis (10thโ€“11th c., South Slavic recension)
  • Catecheses of Cyril of Jerusalem (transmitted 11th c., East Slavic recension)
  • Methodius of Olympus, Symposion (transmitted 17th c., East Slavic recension)
  • Velikie Minei ฤŒetสนi (16th c., East Slavic): large parts of the March and May volumes; Apostolos from the June volume

Old Cyrillic styles (uncial / semi-uncial), primarily East Slavic with South Slavic material. See also achimrabus/crnn-ctc-church-slavonic.

Fine-tune recipe (ocs-mix-clean)

Setting Value
Base Datalab Indra rec.onnx (pinned via indra-ocr-ft)
Geometry GT PAGE boxes (build-lines --geometry gt)
Labels Unicode NFD (--nfd-labels); editorial strip (--strip-editorial: ยฌ, soft hyphen, ZW*)
Augmentation --aug mild (no horizontal flip)
Schedule cosine LR, lr=3e-4, AMP, batch 64, patience 15
Train lines 272,617 usable
Holdout manuscript GT lines (validation split)

Holdout results (this run)

Stage CER WER Line exact
Zero-shot (shipped Indra) 0.821 1.038 0.0%
Best fine-tune (ocs-mix-clean, epoch 181) 0.0398 0.233 46.8%

Early-stopped after epoch 196. Vocab widened for Church Slavonic (+101 characters vs shipped Latin-heavy vocab in this runโ€™s history).

CER is plain character error rate on NFD-normalized labels (editorial ยฌ removed so CTC is not trained to predict ink that is not on the page).

Intended use

  • Line-level HTR / OCR of Church Slavonic manuscript lines in the Indra ONNX pipeline
  • Research use in Slavic medieval studies and digital humanities

Limitations

  • Recognizer fine-tune only; page layout / LineNet detector is still the general Indra detector unless you fine-tune det.onnx separately
  • Domain is Church Slavonic handwriting matching the PAGE sets above โ€” other recensions, print, or modern Cyrillic may degrade
  • Full-page quality still depends on line detection and reading order

Usage

Drop-in Indra model directory (INDRA_OCR_MODEL_DIR / --model-dir):

pip install indra-ocr
# or: uv run indra-ocr-ft viewer --model-dir path/to/this/folder
indra-ocr page.jpg --model-dir path/to/this/folder --format json

With indra-ocr-ft:

uv run indra-ocr-ft viewer --model-dir run/ocs-mix-clean/model
uv run indra-ocr-ft infer-gt --model-dir run/ocs-mix-clean/model --image page.jpg --xml page.xml

Local inference viewer on a Church Slavonic page:

indra-ocr-ft viewer: Church Slavonic page with line boxes and Monomakh OCR text

License

  • Code (Indra / tooling): Apache-2.0 where applicable
  • Base Indra weights: modified OpenRAIL-M โ€” see LICENSE in this folder and datalab-to/indra-ocr
  • Respect dataset / project terms for the QuantiSlav / Transkribus Church Slavonic collection when redistributing derivatives

Citation / related work

Please cite Datalab Indra OCR when using this fine-tune, and credit the Church Slavonic data curation as on achimrabus/crnn-ctc-church-slavonic. Related public CRNN-CTC baseline on the same tradition:

@misc{rabus2026polyscriptor,
  title  = {Polyscriptor: Multi-Engine HTR Training \& Comparison Tool},
  author = {Rabus, Achim},
  year   = {2026},
  url    = {https://github.com/achimrabus/polyscriptor}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for johnlockejrr/ocs-mix-indra-ocr

Quantized
(8)
this model