CoolFace
Datasetpublic

vrinda2712/SARD

SARD: Synthetic Arabic Recognition Dataset Overview SARD (Synthetic Arabic Recognition Dataset) is a large-scale, synthetically generated dataset designed for training and evaluating Optical Character Recognition (OCR) models for Arabic text. This dataset addresses the critical need for comprehensive Arabic text recognition resources by providing controlled, diverse, and scalable training data that simulates real-world book layouts. Key Features… See the full description on the dataset page: https://huggingface.co/datasets/vrinda2712/SARD.

sourceHugging Faceapache-2.0updated 8mo agoView on Hugging Face
0likes442downloads
Dataset Card

SARD: Synthetic Arabic Recognition Dataset

![Hugging Face Datasets](https://huggingface.co/datasets/riotu-lab/SAND) ![GitHub](https://github.com/riotu-lab/text2image)

Overview

SARD (Synthetic Arabic Recognition Dataset) is a large-scale, synthetically generated dataset designed for training and evaluating Optical Character Recognition (OCR) models for Arabic text. This dataset addresses the critical need for comprehensive Arabic text recognition resources by providing controlled, diverse, and scalable training data that simulates real-world book layouts.

Key Features

  • —Massive Scale: 743,000 document images containing 662.15 million words
  • —Typographic Diversity: Five distinct Arabic fonts (Amiri, Sakkal Majalla, Arial, Calibri, and Scheherazade New)
  • —Structured Formatting: Designed to mimic real-world book layouts with consistent typography
  • —Clean Data: Synthetically generated with no scanning artifacts, blur, or distortions
  • —Content Diversity: Text spans multiple domains including culture, literature, Shariah, social topics, and more

Dataset Structure

The dataset is divided into five splits based on font name:

  • —Amiri: ~148,541 document images
  • —Sakkal Majalla: ~148,541 document images
  • —Arial: ~148,541 document images
  • —Calibri: ~148,541 document images
  • —Scheherazade New: ~148,541 document images

📋 Sample Images <div align="center"> <table> <tr> <td><img src="https://cdn-uploads.huggingface.co/production/uploads/64e8eb21233101ed99b204c8/gwF9jkkkpzRSzrP9GCEl.png" width="300" alt="Sample 1 - Amiri Font"/></td> <td><img src="https://cdn-uploads.huggingface.co/production/uploads/64e8eb21233101ed99b204c8/dsqWoCh5x31eGq-u-PqPS.png" width="300" alt="Sample 2 - Arial Font"/></td> </tr> <tr> <td><img src="https://cdn-uploads.huggingface.co/production/uploads/64e8eb21233101ed99b204c8/2XK9Ey6k6HSDXKXCxmVRG.png" width="300" alt="Sample 3 - Calibri Font"/></td> <td><img src="https://cdn-uploads.huggingface.co/production/uploads/64e8eb21233101ed99b204c8/CxKITKvc3EnDIuqnNybV.png" width="300" alt="Sample 4 - Scheherazade Font"/></td> </tr> </table> </div>

Each split contains data specific to a single font with the following attributes:

  • —image_name: Unique identifier for each image
  • —chunk: The text content associated with the image
  • —font_name: The font used in text rendering
  • —image_base64: Base64-encoded image representation

Content Distribution

CategoryNumber of Articles
Culture13,253
Fatawa & Counsels8,096
Literature & Language11,581
Bibliography26,393
Publications & Competitions1,123
Shariah46,665
Social8,827
Translations443
Muslim's News16,725
Total Articles133,105

Font Specifications

FontWords Per PageFont Size
Sakkal Majalla50–30014 pt
Arial50–50012 pt
Calibri50–50012 pt
Amiri50–30012 pt
Scheherazade50–25012 pt

Page Layout

SpecificationMeasurement
Left Margin0.9 inches
Right Margin0.9 inches
Top Margin1.0 inch
Bottom Margin1.0 inch
Gutter Margin0.2 inches
Page Width8.27 inches (A4)
Page Height11.69 inches (A4)

Usage Example

python
from datasets import load_dataset
import base64
from io import BytesIO
from PIL import Image
import matplotlib.pyplot as plt

# Load dataset with streaming enabled
ds = load_dataset("riotu-lab/SARD", streaming=True)
print(ds)

# Iterate over a specific font dataset (e.g., Amiri)
for sample in ds["Amiri"]:
    image_name = sample["image_name"]
    chunk = sample["chunk"]  # Arabic text transcription
    font_name = sample["font_name"]
    
    # Decode Base64 image
    image_data = base64.b64decode(sample["image_base64"])
    image = Image.open(BytesIO(image_data))

    # Display the image
    plt.figure(figsize=(10, 10))
    plt.imshow(image)
    plt.axis('off')
    plt.title(f"Font: {font_name}")
    plt.show()

    # Print the details
    print(f"Image Name: {image_name}")
    print(f"Font Name: {font_name}")
    print(f"Text Chunk: {chunk}")
    
    # Break after one sample for testing
    break

Applications

SAND is designed to support various Arabic text recognition tasks:

  • —Training and evaluating OCR models for Arabic text
  • —Developing vision-language models for document understanding
  • —Fine-tuning existing OCR models for better Arabic script recognition
  • —Benchmarking OCR performance across different fonts and layouts
  • —Research in Arabic natural language processing and computer vision

Acknowledgments

The authors thank Prince Sultan University for their support in developing this dataset.

Citation

If you use SARD in your work, please cite the following paper:

APA:

Nacar, O., Al-Habashi, Y., Sibaee, S., Ammar, A., & Boulila, W. (2025). SARD: A Large-Scale Synthetic Arabic OCR Dataset for Book-Style Text Recognition. arXiv preprint arXiv:2505.24600.
https://arxiv.org/abs/2505.24600

BibTeX:

@misc{nacar2025sard,
      title={SARD: A Large-Scale Synthetic Arabic OCR Dataset for Book-Style Text Recognition}, 
      author={Omer Nacar and Yasser Al-Habashi and Serry Sibaee and Adel Ammar and Wadii Boulila},
      year={2025},
      eprint={2505.24600},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2505.24600}, 
}