Datasets:

Modalities:
Image
Text
Formats:
parquet
Languages:
Arabic
ArXiv:
Libraries:
Datasets
pandas
License:
Omartificial-Intelligence-Space's picture
Update README.md
4191d32 verified
metadata
license: apache-2.0
task_categories:
  - text-to-image
language:
  - ar
tags:
  - arabic
  - Qari
  - OCR
  - ArabicOCR
  - BookStyle
  - Markdown
pretty_name: Qari-OCR
size_categories:
  - 10K<n<100K

QARI Markdown Mixed Dataset

QARI OCR Arabic Dataset License

QARI Logo

πŸ“‹ 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

Metric Value
Total Images 37,000
Train Set 29,600 (80%)
Validation Set 3,700 (10%)
Test Set 3,700 (10%)
Text Sources oddadmix/Basma2423-Text-with-Diacritics-Correction + YoussefAnwar/Arabic-news
Font Variety 12 Arabic fonts
Font Size Range 14px - 100px
Diacritics Support βœ… Full tashkeel
HTML Structure βœ… Preserved
Layout Complexity βœ… High (mixed sizes, headers)

πŸ”§ Data Generation Pipeline

Stage Process Details
1. Text Collection Source gathering Basma2423 (with diacritics) + YoussefAnwar Arabic news
2. HTML Templating Layout generation Mixed font sizes, structural elements
3. Rendering WeasyPrint β†’ PDF β†’ Image High-quality document rendering
4. Degradation Synthetic noise Clean / Moderate / Heavy variants

πŸ“ˆ Model Performance

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

Metric Score
Character Error Rate (CER) 0.300
Word Error Rate (WER) 0.485
BLEU Score 0.545
Training Time 11 hours
COβ‚‚ Emissions 1.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

@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}
}