---
title: 'SARD: Synthetic Arabic OCR Dataset'
url: https://www.emergentmind.com/topics/sard
type: topic
---

# SARD: Synthetic Arabic OCR Dataset

SARD, short for the **Large-Scale Synthetic Arabic OCR Dataset**, is a massive, synthetically generated dataset specifically designed to simulate book-style documents for Arabic optical character recognition (OCR) [2505.24600]. It was introduced to address the lack of large, diverse, and well-structured datasets that mimic real-world book layouts, a limitation that has hampered training of modern OCR models, especially powerful vision-language models. SARD comprises **843,622 document images** containing **approximately 690 million words**, rendered across **ten distinct Arabic fonts**, and is entirely **noise-free and distortion-free**, with perfect ground-truth alignment guaranteed by saving the original text used for each image [2505.24600].

## 1. Definition, scope, and naming

SARD denotes a dataset resource for **Arabic OCR** rather than a single recognition model. Its stated role is to provide a **clean and controlled environment for model training** while retaining the typographic and structural properties of book-style Arabic pages. Existing Arabic OCR datasets are described as often focusing on **isolated words or lines** or being **limited in scale, typographic variety, or structural complexity found in books**, and SARD is positioned as a response to that specific gap [2505.24600].

The acronym is overloaded in the arXiv literature. Separate works use **SARD** for **“A Human-AI Collaborative Story Generation”** [2403.01575], **“Segmentation-Aware Anomaly Synthesis via Region-Constrained Diffusion with Discriminative Mask Guidance”** [2508.03143], and **“A YOLOv8-Based System for Solar Active Region Detection with SDO/HMI Magnetograms”** [2507.21866]. In the OCR context, however, SARD refers specifically to the **Large-Scale Synthetic Arabic OCR Dataset for Book-Style Text Recognition**.

## 2. Corpus design and composition

SARD is organized at the level of **full-page document images** rather than isolated tokens or single lines. The dataset specification emphasizes scale, typographic diversity, structural regularity, and perfect supervision [2505.24600].

| Property | Specification |
|---|---|
| Full-page document images | 843,622 |
| Total words | Approximately 690 million |
| Page format | A4 (8.27 × 11.69 in), grayscale, 300 DPI |
| Text direction and layout | Right-to-Left, right-justified, line spacing 1.15 |
| Noise model | Entirely noise-free and distortion-free |
| Ground truth | Exact source text stored with layout metadata |

The ten fonts were **carefully selected** to cover **classical, modern, UI-optimized, monospaced and stylized publications**. They are: **Amiri (classical Naskh)**, **Arial (modern sans-serif)**, **Calibri (digital-era sans-serif)**, **Sakkal Majalla (contemporary publishing)**, **Scheherazade New (manuscript-inspired)**, **Noto Naskh Arabic UI (UI-optimized)**, **Lateef (small-size readability)**, **Thabit (monospaced, technical)**, **Jozoor (stylized forms)**, and **Al-Jazeera-Arabic-Regular (journalistic typography)** [2505.24600]. The stated rationale is that these ten cover the most prevalent typographic styles in Arabic-language books, ensuring models see a broad spectrum of **glyph shapes, ligatures, diacritic placements and whitespace patterns**.

The page specification is fixed at **A4**, **grayscale**, and **300 DPI**, with margins **left=0.9 in, right=0.9 in, top=1.0 in, bottom=1.0 in, gutter=0.2 in**. Text is **Right-to-Left**, **right-justified**, with **line spacing 1.15**. Words per page are **varied per font (e.g., 50–500 words/page)** to simulate **sparse to dense text blocks**, and **paragraph structure, line-breaking and hyphenation follow standard book typesetting conventions** [2505.24600].

SARD is explicitly **free from real-world noise and distortions**: it contains **no scanning artifacts (skew, blur, ink-bleed)**. At the same time, **anti-aliasing** is applied during rendering to mimic printed quality. This combination yields a synthetic corpus that is both typographically rich and procedurally controlled. Future plans include optional noise modules such as **Gaussian blur, speckle, JPEG compression, simulated folds** to bridge to real scanned documents [2505.24600].

## 3. Synthetic generation pipeline

The generation process is presented as a four-stage pipeline: **text sourcing and preparation**, **layout and formatting**, **image rendering**, and **ground-truth generation** [2505.24600].

Text sourcing draws on **over 133,000 public-domain Arabic articles across nine domains**: **Culture, Fatawa, Literature, Bibliography, Publications, Shariah, Social, Translations, News**. Preparation includes **normalize Unicode, remove unwanted control characters, standardize diacritics, segment into paragraphs**. The source selection is randomized to ensure **topic and vocabulary diversity** [2505.24600].

Layout and formatting are defined via **Python scripts (text2image) with LaTeX-like layout parameters**. Font size is **fixed per font (12 pt for most, 14 pt for Sakkal Majalla and Lateef)**. The **word-wrap and line-breaking algorithms respect Arabic linguistic units and avoid mid-ligature splits**, while **kerning and letter spacing** are controlled by the underlying font engine, namely **HarfBuzz through FreeType** [2505.24600]. This is significant for Arabic OCR because ligature continuity and RTL line formation are major determinants of recognition difficulty.

Image rendering uses **high-resolution rasterization (300 DPI) using Pillow/PIL binding to FreeType**, with **anti-aliasing and subpixel rendering to replicate professional printing appearance**. Output is **grayscale** [2505.24600]. Because the images are generated rather than scanned, rendering parameters can be held constant or varied in a fully auditable way.

Ground truth is stored at the page level. For each page image, **the exact source text is stored alongside layout metadata (font name, size, word sequence)**. This ensures **perfect supervision for both character- and word-level training** [2505.24600]. A plausible implication is that SARD is well suited not only to OCR transcription benchmarks but also to supervised pre-training regimes in which exact alignment between rendered page and reference text is essential.

## 4. Benchmarking protocol and empirical behavior

The benchmarking study evaluates both traditional and deep-learning OCR systems: **Tesseract 4**, **EasyOCR**, **AIN (Vision-Language Model, Heakl et al. 2025)**, **Mistral-OCR**, **Arabic-large-nougat**, **Qari-OCR v0.2**, and **Qari-OCR v0.3** [2505.24600].

The test set contains **2,000 images**, defined as **200 randomly selected pages per font**. The remaining **841,622 images** are described as implicitly available for training and validation, with **typical splits: 80 / 10 / 10**. All models were evaluated **zero-shot** on the SARD test set **except Qari-OCR which was fine-tuned on a held-out portion of SARD** [2505.24600].

Three evaluation metrics are used. **Character Error Rate (CER)** is defined by
$$
\mathrm{CER} = \frac{S + D + I}{N},
$$
where \(S\) is substitutions, \(D\) is deletions, \(I\) is insertions, and \(N\) is total characters in ground truth. **Word Error Rate (WER)** is defined by
$$
\mathrm{WER} = \frac{S + D + I}{M},
$$
where \(M\) is total words in ground truth. **BLEU Score** measures **n-gram overlap between predicted text block and reference** [2505.24600].

The reported averages show distinct behavior across metrics. For **WER**, **Qari v0.2** is best at **0.2194**, followed by **Mistral-OCR** at **0.2248**; **Tesseract** records **0.3492**; **Qari v0.3** **0.4258**; **Arabic-Nougat** **0.4693**; **EasyOCR** **0.7655**; and **AIN** **0.7462** [2505.24600]. For **CER**, **Mistral-OCR** is best at **0.0510**, followed by **Qari v0.2** at **0.1578** and **Tesseract** at **0.1620**; the remaining averages are **Arabic-Nougat 0.2461**, **Qari v0.3 0.3932**, **EasyOCR 0.5956**, and **AIN 0.7056** [2505.24600]. For **BLEU**, **Qari v0.2** is best at **0.7618**, followed by **Mistral-OCR 0.6700**, **Tesseract 0.5373**, **Arabic-Nougat 0.3669**, **Qari v0.3 0.3132**, **EasyOCR 0.2908**, and **AIN 0.1107** [2505.24600].

The paper’s observations emphasize that **advanced VLMs (Mistral-OCR, Qari v0.2) vastly outperform both traditional engines and general-purpose OCR libraries**. It also reports marked **font dependence**: for example, **Mistral CER on Amiri = 0.0110 vs. on Thabit = 0.0705**. In addition, **general deep-learning libraries without targeted fine-tuning (EasyOCR, AIN) fare poorly (< 30 % BLEU, > 50 % CER)** [2505.24600]. This suggests that typographic diversity in SARD is not incidental; it directly exposes model sensitivity to font-dependent glyph morphology and spacing.

## 5. Technical challenges, limitations, and the synthetic–scanned divide

The analysis section identifies several persistent OCR difficulties. **Diacritic recognition and correct placement remain difficult, especially in stylized fonts**. **Preserving RTL flow and ligature context under varied line breaks stresses standard OCR pipelines**. **Monospaced and highly condensed text (Thabit) increases insertion/deletion errors** [2505.24600]. These are not presented as artifacts of the benchmark protocol alone, but as structural challenges revealed by the dataset design.

SARD’s principal advantages are listed as **perfect ground truth, controlled variability, clean images**, and **massive scale without manual annotation cost** [2505.24600]. Those features make it particularly suitable for pre-training and controlled comparison across architectures. However, the paper also identifies explicit limitations: SARD **lacks real-world artifacts (skew, bleed, stains)** and uses a **simplified single-column layout, no figures, tables or marginalia** [2505.24600].

The contrast between synthetic and scanned data is therefore central. SARD is not intended to replicate the full statistics of deteriorated archival material. Rather, it isolates typographic and page-layout variation while excluding scanner and paper defects. This suggests a two-stage research strategy: first learn Arabic typography and page regularities under perfect supervision, then adapt to acquisition noise and heterogeneous document structure.

To bridge the domain gap, the paper proposes three routes: **introduce synthetic noise modules (paper texture, random skew, lighting variation)**; **fine-tune VLMs on small subsets of real scanned pages to adapt to scanning artifacts**; and **employ domain-adversarial training or cycleGAN-style augmentation to simulate scanner characteristics** [2505.24600].

## 6. Research use, recommendations, and projected extensions

The practical recommendations frame SARD as both a training corpus and an evaluation benchmark. The proposed usage pattern is to **start with a clean VLM pre-training on the full SARD corpus to learn Arabic typography robustly**, **reserve at least 5 %–10 % of SARD as a held-out validation/test split stratified by font**, **fine-tune downstream models on task-specific subsets**, and **evaluate CER, WER and BLEU jointly to capture character- and word-level performance and overall fluency** [2505.24600].

The recommended task-specific subsets include **narrow font sets for specialized publications**, indicating that the dataset can support both broad pre-training and narrower domain adaptation. This suggests that SARD is useful for experiments on transfer across typographic regimes, especially when the deployment target is a restricted publication style.

Planned extensions are explicitly enumerated: **expand font library: add calligraphic, historical and decorative fonts**; **simulate multi-column layouts, embedded tables, footnotes and bilingual pages**; **integrate a companion synthetic handwritten dataset**; and **develop a hybrid corpus: overlay real scanned page backgrounds with synthetic text layers** [2505.24600]. Each extension targets a concrete limitation of the current release.

The project also provides **data and code**. The dataset is hosted on **Hugging Face**, and the generation scripts are available through **GitHub** via the **text2image** repository [2505.24600]. In research terms, SARD functions as a reproducible substrate for Arabic OCR and document understanding experiments: a large-scale, font-diverse, book-style corpus with exact supervision, strong benchmarking baselines, and a clearly delineated path toward synthetic–real hybridization.

Source: https://www.emergentmind.com/topics/sard