Logo Lanfrica

The-African-Research-Collective/karanta-ocr

Domaine:

natural language processing

Type de record:

modelsoftware
Créateur:
The
Hôte:
karantaOCR -- Efficient Document Processing for African Languages Karanta OCR # KarantaOCR: Efficient Document Processing for African Languages Karanta means "read" in Hausa, a language spoken in Nigeria and other West African countries. This project is a OCR toolkit for processing scanned documents containing content in african languages and extracting the text in them at scale. We would like to give huge credits to the OlmoOCR project and team for providing the blueprint that we've adapted for Karanta. ## Table of Contents - Model Description - Training Data - Stage 1: General OCR Training - Stage 2: African Language Fine-Tuning - Training Plots - Capabilities - Evaluation - Results -- KarantaOCR-Bench - Results -- OlmoOCR-Bench - How to Use - Load the Model and Processor - Prepare a PDF Page for Inference - Run OCR Inference - End-to-End Example - Citation Information --- ## Model Description #### Paper **KarantaOCR** is an open-source document OCR and processing model designed for **high-accuracy text extraction in African languages**. The model focuses on preserving language-specific characters and diacritics that are often lost, normalized, or mis-transcribed by existing OCR systems. KarantaOCR is fine-tuned from Qwen/Qwen2.5-VL-3B-Instruct, a vision-language model that combines a strong vision encoder with a large language model. Through targeted curriculum fine-tuning, KarantaOCR extends these capabilities to robust document understanding across diverse PDF formats and multilingual settings. ## Training Data KarantaOCR was trained using a **two-stage curriculum fine-tuning strategy**. ### Stage 1: General OCR Training * **100,000 documents** sampled from Allenai OCRMix * Purpose: learn general OCR skills across layouts, fonts, tables, and document structures ### Stage 2: African Language Fine-Tuning * **50,000 PDFs** containing text in **10 African languages**, crawled from the web * Domains include: * Religious texts * Legal documents * Dictionaries * Novels * Other long-form and structured documents Thi …