Tawkeed-OCR

Tawkeed's 2-billion parameter vision-language model specialized for Arabic OCR and document understanding. Extracts text from printed documents, handwritten notes, scanned PDFs, receipts, and more — with native Arabic fluency.

Developed by: Tawkeed — Saudi-native enterprise Edge AI platform.

Use Cases

  • Arabic document digitization — convert printed Arabic documents to editable text
  • Handwritten Arabic recognition — extract text from handwritten Arabic notes and forms
  • Scanned document processing — OCR scanned PDFs, books, and archival materials
  • Receipt and invoice extraction — read Arabic receipts, invoices, and financial documents
  • Arabic signage reading — recognize text from photos of Arabic signs, menus, and labels
  • Mixed Arabic-English OCR — handle documents containing both Arabic and English text

Usage

Transformers

from transformers import AutoProcessor, AutoModelForVision2Seq
from PIL import Image

model_id = "tawkeed-sa/tawkeed-ocr"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForVision2Seq.from_pretrained(
    model_id,
    device_map="auto",
    torch_dtype="auto",
)

# Load an Arabic document image
image = Image.open("arabic_document.png")

# Extract text
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image"},
            {"type": "text", "text": "استخرج جميع النصوص العربية من هذه الصورة"},
        ],
    }
]
inputs = processor.apply_chat_template(messages, images=[image], return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=2048)
result = processor.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True)
print(result)

Batch Processing

from pathlib import Path
from PIL import Image
from transformers import AutoProcessor, AutoModelForVision2Seq

model_id = "tawkeed-sa/tawkeed-ocr"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForVision2Seq.from_pretrained(model_id, device_map="auto", torch_dtype="auto")

# Process multiple document pages
for img_path in sorted(Path("scanned_pages/").glob("*.png")):
    image = Image.open(img_path)
    messages = [
        {
            "role": "user",
            "content": [
                {"type": "image"},
                {"type": "text", "text": "Extract all text from this document page."},
            ],
        }
    ]
    inputs = processor.apply_chat_template(messages, images=[image], return_tensors="pt").to(model.device)
    outputs = model.generate(**inputs, max_new_tokens=2048)
    text = processor.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True)
    print(f"--- {img_path.name} ---")
    print(text)

Model Details

Property Value
Parameters 2B
Type Vision-Language Model
Languages Arabic, English
License Apache 2.0
Input Text + Image

About Tawkeed

Tawkeed is a Saudi-native enterprise Edge AI platform building Arabic-first AI models and tools. Our models cover 18 Arabic dialects and are optimized for on-premises deployment with complete data privacy.

All Tawkeed models  |  Arabic LLM Benchmark

Downloads last month
36
Safetensors
Model size
2B params
Tensor type
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support