CoolFace
Datasetpublic

NAMAA-Space/QariOCR-v0.3-markdown-mixed-dataset

QARI Markdown Mixed Dataset ๐Ÿ“‹ Dataset Summary The QARI v0.3 Markdown Mixed Dataset is a specialized synthetic dataset designed for training Arabic OCR models with a focus on complex document layouts and HTML structure understanding. This dataset is part of the QARI-OCR project, which achieves state-of-the-art performance in Arabic text recognition. This dataset contains 37,000 synthetically generated Arabic document images (29.6k train, 3.7kโ€ฆ See the full description on the dataset page: https://huggingface.co/datasets/NAMAA-Space/QariOCR-v0.3-markdown-mixed-dataset.

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
13likes543downloads
Dataset Card

QARI Markdown Mixed Dataset

<div align="center">

QARI OCR Arabic Dataset License

</div>

<div align="center"> <img src="https://cdn-uploads.huggingface.co/production/uploads/628f7a71dd993507cfcbe587/TxzHjVy6NsdmcghXqVH.png" alt="QARI Logo" width="400"> </div>

๐Ÿ“‹ Dataset Summary

The QARI v0.3 Markdown Mixed Dataset is a specialized synthetic dataset designed for training Arabic OCR models with a focus on complex document layouts and HTML structure understanding. This dataset is part of the QARI-OCR project, which achieves state-of-the-art performance in Arabic text recognition.

This dataset contains 37,000 synthetically generated Arabic document images (29.6k train, 3.7k validation, 3.7k test) with corresponding ground truth text in HTML/Markdown format, featuring:

  • โ€”๐Ÿ”ค Full diacritical marks (tashkeel) support
  • โ€”๐Ÿ“ Mixed font sizes within documents (headers, body text, annotations)
  • โ€”๐ŸŽจ 12 distinct Arabic fonts ranging from common Naskh to ornate calligraphic styles
  • โ€”๐Ÿ“„ Realistic document layouts with structural HTML tags
  • โ€”๐Ÿ–ผ๏ธ Multiple text sources including Basma2423 and YoussefAnwar Arabic news

๐ŸŽฏ Intended Use

This dataset is specifically designed for:

  • โ€”Training OCR models that need to understand document structure
  • โ€”Fine-tuning vision-language models for Arabic text recognition
  • โ€”Developing systems that preserve formatting and layout information
  • โ€”Research in Arabic document analysis and understanding

๐Ÿ“Š Dataset Statistics

MetricValue
Total Images37,000
Train Set29,600 (80%)
Validation Set3,700 (10%)
Test Set3,700 (10%)
Text Sourcesoddadmix/Basma2423-Text-with-Diacritics-Correction + YoussefAnwar/Arabic-news
Font Variety12 Arabic fonts
Font Size Range14px - 100px
Diacritics Supportโœ… Full tashkeel
HTML Structureโœ… Preserved
Layout Complexityโœ… High (mixed sizes, headers)

๐Ÿ”ง Data Generation Pipeline

<div align="center">

StageProcessDetails
1. Text CollectionSource gatheringBasma2423 (with diacritics) + YoussefAnwar Arabic news
2. HTML TemplatingLayout generationMixed font sizes, structural elements
3. RenderingWeasyPrint โ†’ PDF โ†’ ImageHigh-quality document rendering
4. DegradationSynthetic noiseClean / Moderate / Heavy variants

</div>

๐Ÿ“ˆ Model Performance

When used to train QARI v0.3, this dataset enables:

MetricScore
Character Error Rate (CER)0.300
Word Error Rate (WER)0.485
BLEU Score0.545
Training Time11 hours
COโ‚‚ Emissions1.88 kg eq.

Key Advantages:

  • โ€”๐Ÿ“ Superior layout understanding compared to plain text models
  • โ€”๐Ÿท๏ธ HTML tag preservation for structured document conversion
  • โ€”โšก Resource efficient - 5x less training time than larger datasets
  • โ€”๐ŸŽฏ Specialized performance for document structure tasks

Citation

markdown
@article{wasfy2025qari,
  title={QARI-OCR: High-Fidelity Arabic Text Recognition through Multimodal Large Language Model Adaptation},
  author={Wasfy, Ahmed and Nacar, Omer and Elkhateb, Abdelakreem and Reda, Mahmoud and Elshehy, Omar and Ammar, Adel and Boulila, Wadii},
  journal={arXiv preprint arXiv:2506.02295},
  year={2025}
}