CoolFace
Apppublic

Omartificial-Intelligence-Space/Khatt-Vision-Arabic-Calligraphy-OCR

sourceHugging Faceupdated 1mo agoView on Hugging Face
2likes
App README

KhattVision OCR

An interactive research demo for Arabic calligraphy understanding using a Muse Glimmer 30B vision-language model fine-tuned with LoRA on DuwatBench.

The demo supports:

  • —full-image Arabic OCR;
  • —structured JSON extraction;
  • —six-way calligraphic style recognition;
  • —nine-way theme classification; and
  • —normalized text-region localization.

Model configuration

Create a Space variable named ADAPTER_REPO containing the Hugging Face model ID of the pushed LoRA adapter, for example:

text
Omartificial-Intelligence-Space/KhattVision-Muse-Glimmer-30B-LoRA

If the adapter or base model is gated/private, also create a private Space secret named HF_TOKEN with read access.

Hardware

The model is loaded in 4-bit. 1x L40S (48 GB) is the recommended reliable public-demo configuration. 1x L4 (24 GB) may work with embedding offload but has much less memory headroom.

Held-out results

MetricBaseFine-tuned
Normalized CER ↓0.7970.583
Normalized WER ↓1.1180.767
chrF2 ↑41.4746.27
Exact match ↑22%38%

Structured evaluation: 100% valid JSON, 76% exact style accuracy, 50% exact theme accuracy, 0.707 mean matched IoU, and 71.0% box recall at IoU 0.5.

Limitation

This is a research demo. Dense, overlapping, highly decorative calligraphy can cause plausible but incorrect Arabic text generation. Verify transcriptions before using them in research, archival, religious, or legal contexts.