Yonatanhaile2026/tigrinya-trocrprinted
TrOCR-Printed for Tigrinya OCR
  ![Language: Tigrinya]() ![Script: Ge'ez]() 
Tigrinya TrOCR — Printed Variant
Adapting TrOCR for Printed Tigrinya Text Recognition: Word-Aware Loss Weighting for Cross-Script Transfer Learning
A fine-tuned TrOCR model for printed Tigrinya line-level text recognition. This is the printed pre-training variant, fine-tuned from microsoft/trocr-base-printed using vocabulary extension and Word-Aware Loss Weighting to resolve word-boundary failures caused by BPE space-marker conventions.
Model Details
Performance
Evaluated on a held-out test set of 5,000 synthetic Tigrinya text-line images.
Bootstrap 95% Confidence Intervals (1,000 iterations, TrOCR-Printed)
Comparison (same dataset and split)
Training Details
How to Use
from transformers import VisionEncoderDecoderModel, TrOCRProcessor
from PIL import Image
processor = TrOCRProcessor.from_pretrained("Yonatanhaile2026/tigrinya-trocrprinted")
model = VisionEncoderDecoderModel.from_pretrained("Yonatanhaile2026/tigrinya-trocrprinted")
Load your text-line image
image = Image.open("your_tigrinya_text_line.png").convert("RGB")
pixel_values = processor(images=image, return_tensors="pt").pixel_values
generated_ids = model.generate(pixel_values, num_beams=5, max_length=128)
prediction = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(prediction)Intended Use
Suitable for:
- Printed Tigrinya OCR on synthetic or clean text-line images
- Benchmarking Transformer-based OCR for low-resource scripts
- Research on cross-script transfer learning and BPE tokenizer adaptation
Not suitable for:
- Handwritten Tigrinya OCR
- Real scanned documents with degradation, skew, or complex layout
- General-purpose multilingual OCR without task-specific validation
Limitations
- Trained and evaluated exclusively on synthetic printed data from a single domain (newspaper text lines)
- Performance on real-world scanned documents is not validated
- Results reflect a single training run on one hardware configuration
- The error analysis relies on automatic Unicode-based heuristics
Related Resources
- Handwritten variant: `Yonatanhaile2026/tigrinya-trocr-handwritten`
- Code repository: github.com/YoHa2024NKU/Tigrinya_TrOCR_Printed
- Dataset: GLOCR — Harvard Dataverse
## Citation
If you use this model, please cite the associated paper and repository:
@misc{medhanie2026adaptingtrocrprintedtigrinya, title={Adapting TrOCR for Printed Tigrinya Text Recognition: Word-Aware Loss Weighting for Cross-Script Transfer Learning}, author={Yonatan Haile Medhanie and Yuanhua Ni}, year={2026}, eprint={2604.20813}, archivePrefix={arXiv}, primaryClass={cs.CV}, url={https://arxiv.org/abs/2604.20813}, }
---
## License
MIT License