The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: JobManagerCrashedError
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
image_name
string | chunk
string | font_name
string | image_base64
string |
---|---|---|---|
dataset_Alukah_Arabic_font_Amiri_article_1_part_1.png | "ุงูุบูู ูู ูุธุฑูุฉ ุงูู
ุคุงู
ุฑุฉ ุงูุญู
ุฏ ููู ุฎุงููู ุงูุณู
ุงูุงุช ูุงูุฃ(...TRUNCATED) | Amiri | "iVBORw0KGgoAAAANSUhEUgAACbEAAA20CAIAAABOHAVkAAEAAElEQVR4nOzddWBT1//4/5O0tBQrLsOGDIa7O8MZNhyGDjrcJ8i(...TRUNCATED) |
dataset_Alukah_Arabic_font_Amiri_article_1_part_2.png | "ููููุฉ ุชุนุงู
ู ุงููุงุณ ู
ุน ุงูุฃุฒู
ุงุชุ ู
ู ุงูู
ุญุชู
ู ุฃู ูููู ููุฃุฒู
(...TRUNCATED) | Amiri | "iVBORw0KGgoAAAANSUhEUgAACbEAAA20CAIAAABOHAVkAAEAAElEQVR4nOzddXxTV9z48ZO0tKWF4g7DvbjDYNgoLsPdGe4bDGc(...TRUNCATED) |
dataset_Alukah_Arabic_font_Amiri_article_1_part_3.png | "ุฃู
ุฑูุงุ ููู ู
ุง ูุญุฏุซ ู
ู ุดุฑูู ููู ุชุญุช ุชุฏุจูุฑูุงุ! ุฅู ู
ู
ุง ุชูู(...TRUNCATED) | Amiri | "iVBORw0KGgoAAAANSUhEUgAACbEAAA20CAIAAABOHAVkAAEAAElEQVR4nOzddWBT1//4/5PUaItT3N3dhssYUtwZMnQ4wxk2ZAw(...TRUNCATED) |
dataset_Alukah_Arabic_font_Amiri_article_1_part_4.png | "ุชุฏุจูุฑูุ ุฃู ูุชู
ููููุง ุณูุงูุ ููู
ุฃุนูู
ุจู ูุฃุนุฑู ุจุฃุณู
ุงุฆู ูุต(...TRUNCATED) | Amiri | "iVBORw0KGgoAAAANSUhEUgAACbEAAA20CAIAAABOHAVkAAEAAElEQVR4nOzdZWAbR7io4ZE5dthhZmZmZoY2zAxN03Cbpk3Shpk(...TRUNCATED) |
dataset_Alukah_Arabic_font_Amiri_article_2_part_1.png | "ุงูุงุฎุชูุงู: ู
ูููู
ู ูู ุงููุบุฉ ูุงูุงุตุทูุงุญ ููู ุงููุฑุขู ุงููุฑูู
(...TRUNCATED) | Amiri | "iVBORw0KGgoAAAANSUhEUgAACbEAAA20CAIAAABOHAVkAAEAAElEQVR4nOzddXwUx//48bkkxHAI7iVoIEUKNLgXp1AcWtydDxQ(...TRUNCATED) |
dataset_Alukah_Arabic_font_Amiri_article_2_part_2.png | "ุฅูุง ููู
ุง ูุง ุฏููู ุนููู\" [12] . ููุฐุง ุงูุชูุฑูู ุณุจูู ุฅููู ุฃุจู ุง(...TRUNCATED) | Amiri | "iVBORw0KGgoAAAANSUhEUgAACbEAAA20CAIAAABOHAVkAAEAAElEQVR4nOzdZWAU1/uw4bMbI4Hg7sEdAgWKB5dQ3KW4W7FSpGh(...TRUNCATED) |
dataset_Alukah_Arabic_font_Amiri_article_2_part_3.png | "ุงููุธุฑ... ูููุฐุง ูุง ุชุฌุฏ ูุฑููุง ุจูููู
ุง ูู ุงุณุชุนู
ุงู ุงููููุงุก\" [(...TRUNCATED) | Amiri | "iVBORw0KGgoAAAANSUhEUgAACbEAAA20CAIAAABOHAVkAAEAAElEQVR4nOzdZ1wU1/v4/bOAINixd1HsWLBh712TWLHHhjX2aIz(...TRUNCATED) |
dataset_Alukah_Arabic_font_Amiri_article_2_part_4.png | "ุงูุชูููุฑุ ูุชูููุน ุงูุชุตุฑู ูู ูุถุน ุงููุบุงุชุ ูุชุจุฏู ููููุงุชูุง (...TRUNCATED) | Amiri | "iVBORw0KGgoAAAANSUhEUgAACbEAAA20CAIAAABOHAVkAAEAAElEQVR4nOzdd2BTVdzw8ZPuwWjZe29K2SBUQBFBhgiWvUFkKnu(...TRUNCATED) |
dataset_Alukah_Arabic_font_Amiri_article_2_part_5.png | "ุนุจุฏุงูุฑุคูู ุจู ุชุงุฌ ุงูุนุงุฑููู ุงุจู ุนูู ุจู ุฒูู ุงูุนุงุจุฏูู ุงูุญุฏ(...TRUNCATED) | Amiri | "iVBORw0KGgoAAAANSUhEUgAACbEAAA20CAIAAABOHAVkAAEAAElEQVR4nOzdZXwUV/vw8RMnwaFYcEhxglPkxt1di7e4U7R4cYc(...TRUNCATED) |
dataset_Alukah_Arabic_font_Amiri_article_3_part_1.png | "[21] ุงูู
ุญุฑุฑ ุงููุฌูุฒ ูู ุชูุณูุฑ ุงููุชุงุจ ุงูุนุฒูุฒุ ุงุจู ุนุทูุฉ ุงูุฃู(...TRUNCATED) | Amiri | "iVBORw0KGgoAAAANSUhEUgAACbEAAA20CAIAAABOHAVkAAEAAElEQVR4nOzdZYATV/v4/ZOsw+LutrguFHco7kWLuzsUWqRAabF(...TRUNCATED) |
SAND: A Large-Scale Synthetic Arabic OCR Dataset
Overview
SAND (Synthetic Arabic OCR 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: 843,622 document images containing approximately 690 million words
- Extensive Typographic Diversity: Ten distinct Arabic fonts covering a wide range of styles
- 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 ten splits based on font name:
- Amiri: Classical Naskh typeface inspired by early 20th century typography
- Sakkal Majalla: Widely used font in contemporary Arabic publishing
- Arial: Modern sans-serif font common in digital publications
- Calibri: Microsoft's default font representing contemporary digital typography
- Scheherazade New: Traditional-style font based on classical manuscript styles
- Jozoor Font: Decorative Arabic font with more stylized character forms
- Lateef: Extended Arabic script font designed for readability at small sizes
- Noto Naskh Arabic UI: Part of Google's Noto family, designed for user interfaces
- Thabit: Monospaced Arabic font for technical documentation
- Al Jazeera Arabic Regular: Based on the typography used by Al Jazeera media
๐ Sample Images
![]() |
![]() |
![]() |
![]() |
Each split contains data specific to a single font with the following attributes:
image_name
: Unique identifier for each imagechunk
: The text content associated with the imagefont_name
: The font used in text renderingimage_base64
: Base64-encoded image representation
Content Distribution
Category | Number of Articles |
---|---|
Culture | 13,253 |
Fatawa & Counsels | 8,096 |
Literature & Language | 11,581 |
Bibliography | 26,393 |
Publications & Competitions | 1,123 |
Shariah | 46,665 |
Social | 8,827 |
Translations | 443 |
Muslim's News | 16,725 |
Total Articles | 133,105 |
Font Specifications
Font | Words Per Page | Font Size | Characteristics |
---|---|---|---|
Sakkal Majalla | 50โ300 | 14 pt | Contemporary publishing style |
Arial | 50โ500 | 12 pt | Modern sans-serif |
Calibri | 50โ500 | 12 pt | Contemporary digital document |
Amiri | 50โ300 | 12 pt | Classical Naskh typeface |
Scheherazade New | 50โ250 | 12 pt | Traditional manuscript style |
Noto Naskh Arabic UI | 50โ400 | 12 pt | Clear UI rendering |
Lateef | 50โ350 | 14 pt | Optimized for small sizes |
Al-Jazeera-Arabic | 50โ250 | 12 pt | Media/journalistic style |
Thabit | 50โ240 | 12 pt | Monospaced technical font |
Jozoor Font | 50โ200 | 12 pt | Decorative with stylization |
Page Layout
Specification | Measurement |
---|---|
Page Size | A4 (8.27 ร 11.69 in) |
Left Margin | 0.9 in |
Right Margin | 0.9 in |
Top Margin | 1.0 in |
Bottom Margin | 1.0 in |
Gutter Margin | 0.2 in |
Resolution | 300 DPI |
Color Mode | Grayscale |
Page Direction | Right-to-Left |
Text Alignment | Right |
Line Spacing | 1.15 |
Usage Example
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/SAND-Extended", 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
Working with Multiple Fonts
To train or evaluate models across different font styles:
from datasets import load_dataset
import random
# Load the dataset
ds = load_dataset("riotu-lab/SAND")
# Select a balanced sample from multiple fonts
fonts_to_use = ["Amiri", "Arial", "Scheherazade_New", "Thabit", "Noto_Naskh_Arabic_UI"]
samples_per_font = 1000
combined_samples = []
for font in fonts_to_use:
# Get random samples from this font
font_samples = ds[font].shuffle(seed=42).select(range(samples_per_font))
combined_samples.extend([(sample, font) for sample in font_samples])
# Shuffle the combined samples
random.shuffle(combined_samples)
# Now you can use these samples for training or evaluation
for sample, font in combined_samples[:5]: # Just show first 5 as example
print(f"Font: {font}, Image: {sample['image_name']}")
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
- Developing font-adaptive OCR systems that generalize across typographic styles
Citation
If you use SAND in your research, please cite:
@misc{sand2025,
title={SAND: A Large-Scale Synthetic Arabic OCR Dataset for Vision-Language Models},
author={RIOTU Lab},
year={2025},
howpublished={\url{https://huggingface.co/datasets/riotu-lab/SAND}}
}
Acknowledgments
The authors thank Prince Sultan University for their support in developing this dataset.
- Downloads last month
- 12