| --- |
| 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 |
|
|
| <div align="center"> |
|
|
|  |
|  |
|  |
|  |
|
|
| </div> |
|
|
| <div align="center"> |
| <img src="https://cdn-uploads.huggingface.co/production/uploads/628f7a71dd993507cfcbe587/Txz_HjVy6NsdmcghXqVH_.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 |
|
|
| | 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 |
|
|
| <div align="center"> |
|
|
| | 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 | |
|
|
| </div> |
|
|
| ## π 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 |
|
|
| ```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} |
| } |
| ``` |
|
|
|
|
|
|