mdnaseif's picture
Update README.md
0c34ca3 verified
metadata
language:
  - ar
task_categories:
  - image-to-text
tags:
  - ocr
  - arabic
  - manuscripts
  - historical-documents
size_categories:
  - 10K<n<100K
license: cc-by-4.0

HAFITH Combined Benchmark Dataset

Combined benchmark of three Arabic manuscript datasets for OCR evaluation: MUHARAF, KHATT, and RASAM.

Dataset Summary

Dataset Train Val Test Total Description
MUHARAF 21,129 1,021 1,278 23,428 Archival documents (19th-20th century)
KHATT 15,886 962 1,197 18,045 Contemporary handwriting (1,000 writers)
RASAM 2,739 915 906 4,560 Maghrebi manuscripts (10th-20th century)
Total 37,203 2,898 3,381 43,482 Combined (after filtering)

Data Fields

  • image: Text line image (PIL Image)
  • text: Ground truth Arabic text (Unicode normalized)
  • source: Dataset origin ('MUHARAF', 'KHATT', or 'RASAM')
  • filename: Original filename

Quality Filtering

Dataset has been filtered to remove (2.49% of samples):

  • Empty/missing labels
  • Mixed Arabic-Latin scripts (>20% Latin)
  • Invalid characters
  • Non-text images (stamps, seals)
  • Multi-line segmentation errors

Usage

from datasets import load_dataset

# Load full dataset
dataset = load_dataset("mdnaseif/hafith-combined-benchmark")

# Load specific split
train = dataset['train']

# Filter by source
muharaf_samples = train.filter(lambda x: x['source'] == 'MUHARAF')

Benchmark Results (HAFITH)

Dataset CER WER
MUHARAF 8.35% 24.76%
KHATT 11.21% 37.36%
RASAM 4.95% 18.94%
Combined 5.10% 18.05%

Citation

@article{naseif2026hafith,
  title={HAFITH: Aspect-Ratio Preserving Vision-Language Model for Historical Arabic Manuscript Recognition},
  author={Naseif, Mohammed and Mesabah, Islam and Hajjaj, Dalia and Hassan, Abdulrahman and Elhayek, Ahmed and Koubaa, Anis},
  year={2026}
}

Original Datasets

MUHARAF: Al-Zaidy et al. (2024). [NeurIPS 2024]
KHATT: Mahmoud et al. (2014). [Pattern Recognition]
RASAM: Vidal-Gorène et al. (2021). [ICDAR Workshops]

Links

License

Please refer to original dataset licenses. Combined dataset for research purposes only.