A compact PP-OCRv6-inspired, line-level OCR recognizer for Amharic/Fidel text.
This repository contains the deployable Stage 1 student checkpoint from a broader teacher–student Amharic OCR project. The model is designed for efficient recognition of cropped handwritten, typed, and synthetic Amharic text-line images.
Model summary
Property
Value
Task
Amharic text-line recognition
Language
Amharic
Script
Ethiopic/Fidel
Framework
PyTorch
Inference parameters
24.48M
Training parameters
Approximately 31.25M
Input
One cropped grayscale text-line image
Input height
48 pixels
Output vocabulary
354 Fidel symbols + CTC blank
Main inference head
CTC
Decoding
Greedy CTC
Training-only auxiliary head
NRTR
Current stage
Stage 1 student baseline
Architecture
The inference pipeline is:
text
1Cropped Amharic line image
2 ↓
3LCNetV4-style CNN backbone
4 ↓
5Height compression
6 ↓
7LightSVTR sequence encoder
8 ↓
9CTC classification head
10 ↓
11Recognized Fidel text
The model contains:
an LCNetV4-style lightweight CNN backbone;
MetaFormer-style visual feature-mixing blocks;
height compression that converts the feature map into a horizontal sequence;
a LightSVTR neck with local convolutional and global self-attention context;
a CTC recognition head for single-pass inference;
an auxiliary NRTR decoder used only during training.
The NRTR branch is not included in the inference checkpoint.
Stage 1 results
Official Fidel test set
Evaluation
Samples
Macro CER
Micro CER
Macro WER
Micro WER
Exact line accuracy
Official all test
18,011
8.24%
6.92%
19.52%
16.34%
36.99%
Official handwritten
6,035
17.41%
17.17%
45.11%
44.87%
0.91%
Official typed
5,924
4.05%
3.99%
6.47%
6.36%
68.38%
Official synthetic
6,052
3.18%
2.88%
6.78%
6.00%
42.23%
Writer-disjoint handwritten validation
Metric
Result
Validation writers
41
Training writers
370
Writer overlap
0
Validation samples
3,584
Macro CER
14.71%
Micro CER
14.12%
Macro WER
39.59%
Micro WER
38.24%
The official test split supports comparison with published Fidel results. The writer-disjoint validation split measures generalization to unseen handwriting styles.
Handwritten error analysis
On the official handwritten test set, the model produced 58,222 character errors:
Error category
Count
Percentage
Substitutions
38,543
66.20%
Deletions
16,155
27.75%
Insertions
3,524
6.05%
Of these errors:
Category
Count
Percentage
Space-related errors
8,486
14.58%
Non-space character errors
49,736
85.42%
Frequent handwritten confusions include:
text
1ሰ ↔ ስ
2ላ ↔ ለ
3አ ↔ እ
4ደ ↔ ዳ
5ባ ↔ በ
6ሞ ↔ ም
The main Stage 1 limitation is fine-grained handwritten Fidel character discrimination rather than spacing alone.
Expected input
The model expects one cropped Amharic text-line image.
It does not detect text regions or process full document pages directly.
Supported input formats include image types readable by Pillow, such as:
text
1PNG
2JPEG
3BMP
4WEBP
Preprocessing
The included inference script applies the same main preprocessing used during training:
correct EXIF orientation;
convert the image to grayscale;
remove excessive horizontal white margins;
resize the image to a height of 48 pixels;
preserve the original aspect ratio;
normalize pixel values to [-1, 1];
preserve the true resized width for CTC decoding.
Installation
Install the required packages:
pip install torch numpy pillow huggingface_hub
Alternatively, after downloading the repository:
pip install -r requirements.txt
Authentication for the private repository
This repository is currently private.
Authenticate before downloading:
hf auth login
The authenticated account must have access to:
Beeface/amharic-fidel-ocr-student
Usage with snapshot_download
This is the recommended Python usage for the current custom PyTorch release:
soft targets or logits where available and compatible;
focused guidance on difficult handwritten samples.
The inference architecture will remain unchanged:
LCNetV4-style backbone → LightSVTR → CTC
The teacher will not be required during deployment.
Research status
text
1Stage 1 student training: completed
2Official test evaluation: completed
3Writer-disjoint evaluation: completed
4Handwritten error analysis: completed
5Stage 2 teacher evaluation: not started
6Teacher prediction generation: not started
7Student distillation: not started
Source code
Project source code, training scripts, notebooks, and evaluation results are maintained at:
BeefaceData/amharic-ocr-recognizer
Acknowledgements
This work uses the Fidel Amharic OCR dataset.
The student recognizer is inspired by the PP-OCRv6 recognition design, particularly lightweight convolutional visual encoding, LightSVTR-style sequence modeling, CTC inference, and auxiliary sequence supervision.
SuryaOCR is the planned high-capacity teacher for Stage 2.
License
No license has been selected for this model repository yet.
The absence of a license means that reuse rights are not automatically granted. The Fidel dataset is governed separately by its own license and terms.