Amharic OCR: CRNN-CTC pipeline for printed Ge'ez script. 96.3% accuracy, 0.64% CER. CNN+BiLSTM+CTC with weighted sampling for 280 glyphs. LLM-augmented correction outperforms ChatGPT OCR. 167 FPS on GPU.
# Amharic OCR: CRNN-CTC for Printed Ge'ez Script Recognition
A complete OCR pipeline for printed Amharic text using a Convolutional Recurrent Neural Network (CRNN) with Connectionist Temporal Classification (CTC) loss. Achieves **96.3% line-level accuracy** and **0.64% Character Error Rate** on held-out real printed data.
**Key Innovation:** LLM-augmented OCR pipeline that combines our specialized CRNN with large language model post-processing, outperforming general-purpose vision models on Amharic text.
---
## 🎯 Problem
Amharic, written in the Ge'ez script (ግዕዝ), is a liturgical and literary language used by the Ethiopian Orthodox Church and millions of speakers. Despite its cultural importance, **no mainstream OCR solution exists** for Amharic comparable to English OCR systems. The script presents unique challenges:
- **280 unique glyphs** (abugida system: consonant + vowel combinations)
- **Complex morphology** with subtle diacritic distinctions (e.g., ሰ vs ሠ, ሰ vs ስ)
- **Severe class imbalance** (Zipf's law: 40 characters appear ≤10 times)
- **Limited digitized training data** compared to Latin scripts
---
## 🏗️ Architecture
We implement a **CRNN-CTC** architecture inspired by Shi et al. (2017):
```
Input (1×64×256)
↓
CNN Backbone (7 conv layers, VGG-style)
↓
Feature Map (512×4×64) → Reshape → Sequence (64×2048)
↓
2-Layer Bidirectional LSTM (hidden=256) → (64×512)
↓
Linear Classifier → (64×280 classes)
↓
CTC Loss (alignment-free training)
```
| Component | Details |
|-----------|---------|
| **CNN** | 7 convolutional layers with BatchNorm, ReLU, progressive max-pooling. Output stride: 4× in width, 16× in height |
| **RNN** | 2-layer BiLSTM, 256 hidden units, bidirectional |
| **Output** | 280 classes (278 characters + space + CTC blank) |
| **Parameters** | ~7.5M total |
| **Loss** | CTC Loss (Graves et al., 2006) — no character-level annotations needed |
### Design Choices
| Choice | Justification |
|--------|---------------|
| **CNN backbo …