Surya OCR fine-tuned on Fidel (Amharic text lines)
The Surya text-recognition model (surya-ocr==0.13.1, checkpoint
text_recognition/2025_02_18, ~470M parameters) fine-tuned on all three modalities (handwritten, typed, synthetic) of the
Fidel dataset for Amharic line-level OCR.
Results on the official Fidel test set
| Modality | Lines | CER % | WER % |
|---|---|---|---|
| handwritten | 6035 | 17.36 | 40.30 |
| typed | 5924 | 3.95 | 6.65 |
| synthetic | 6052 | 2.59 | 5.35 |
| ALL | 18011 | 6.85 | 15.03 |
CER/WER are micro-averaged edit distances on whitespace-normalised text. Best validation CER: 4.69% (epoch 8) on a writer/document-disjoint validation split. Note: the public test split is not writer/document-disjoint from training.
Usage
Requires surya-ocr==0.13.1 and transformers==4.48.3. Input is a cropped image of a single text line.
from PIL import Image
from surya.recognition import RecognitionPredictor
predictor = RecognitionPredictor(checkpoint="kiyam/surya-fidel-amharic")
# Surya always resizes to its built-in 256x896; this model was trained at 256x1024, so set it explicitly
predictor.processor.image_processor.max_size = {"height": 256, "width": 1024}
text, conf = predictor.batch_recognition([Image.open("line.png").convert("RGB")], [["am"]])
print(text[0])
Training
- Base: Surya recognition
2025_02_18; encoder, text encoder and decoder all trained - Input 256x1024 (patch position embeddings bilinearly stretched from width 896), language prompt
['am'] - 10 epochs, AdamW lr 0.0001, weight decay 0.01, effective batch 32, no LR schedule, grad clip 1.0, bf16 mixed precision, one NVIDIA A100
- Training lines longer than 170 characters dropped
- Code: https://github.com/kidist-amde/fidel-ocr
License
These weights are a derivative of the Surya model weights and are released under the same terms: cc-by-nc-sa-4.0, plus Datalab's conditions for the Surya weights (free use only for organisations under $5M revenue / funding that are not competitive with the Datalab API; see the Surya repository). Not for commercial use otherwise. Check the Fidel dataset's terms before use.