Coptic HTR (calamari)

Handwritten text recognition checkpoint for Coptic manuscript line crops. This is the stable checkpoint published by nomikos-project.

Field Value
registry model id coptic-calamari-v1
registry tag stable
script coptic
architecture calamari
model version v1
task transcribe
weights source hf://nomikos-project/coptic-htr-calamari@stable

The Hub file is best.pt (calamari-pytorch-v1): CNN (40/60 filters) + 2 bidirectional LSTMs, line height 48, CTC charset size 39. Trained from scratch on the Coptic finetuning split (no separate Coptic pretraining corpus). A wider CNN (60/80) was worse on the same test set.

Intended use

  • Transcribe already-segmented Coptic line images.
  • Expert-in-the-loop HTR.

Out of scope: page-level layout, other scripts, or unsegmented folios.

How to use

weights_source: hf://nomikos-project/coptic-htr-calamari@stable
PYTHONPATH=. python scripts/hf/fetch_model.py coptic-calamari-v1 --registry-tag stable
from huggingface_hub import hf_hub_download
from src.inference.calamari import CalamariPredictor

path = hf_hub_download("nomikos-project/coptic-htr-calamari", "best.pt")
CalamariPredictor([path]).predict_files(["line.png"], output_dir="preds")

Training

Single-stage CTC training on Coptic GT (seed 1111, batch 32, 5 augmented copies + 1 original, LR 0.001, 150-epoch schedule):

  • Data: data/processed/coptic/finetuning — 2258 / 282 / 283 train/val/test lines (line-level 80/10/10).
  • Architecture: lstm_layers=2, conv0_filters=40, conv1_filters=60.
  • W&B: coptic_training_lstm2 (run name coptic_training_lstm2).

best.pt is the lowest-val-CER checkpoint from that run.

Evaluation

Official test split (evaluation.split=test, 283 lines):

Metric Value
CER 8.23%
WER 59.1%
Exact match 43.1%

Compared on the same test set, the 60/80-filter variant scored CER 8.76% / WER 63.4% / exact match 38.9%, so this smaller CNN is the published stable model.

Files

File Role
best.pt PyTorch Calamari checkpoint
best.onnx ONNX export for deployment
config.yaml Training Hydra config snapshot
README.md This model card
Downloads last month
26
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Evaluation results