metadata
license: mit
language:
- ar
tags:
- OCR
- VLM
- HTR
- Arabic
pretty_name: Muharaf-public
size_categories:
- 1K<n<10K
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
dataset_info:
features:
- name: id
dtype: string
- name: image
dtype: image
- name: text
dtype: string
splits:
- name: train
num_bytes: 3435611946
num_examples: 1216
download_size: 3063317838
dataset_size: 3435611946
Muharaf-public images
This dataset contains 1,218 full page images of Arabic handwriting and the corresponding text. The images are Manuscripts from the 19th to 21st century. See the official code, paper, and zenodo archive below. Their work has been accepted to NeurIPS 2024.
How to use
from datasets import load_dataset
import matplotlib.pyplot as plt
# Load your dataset in streaming mode to be loaded faster
# https://huggingface.co/docs/datasets/v1.10.1/dataset_streaming.html
ds = load_dataset("Omarkhaledok/muharaf-public-pages", streaming=True)
# Take one sample from the training set
sample = next(iter(ds['train']))
# Number of samples to visualize
SAMPLE_SIZE=1
# Display the image using matplotlib
plt.imshow(sample['image'])
plt.axis('off') # Hide axes for better visualization
plt.show()
# Print the corresponding text
print("Corresponding text:")
print(sample['text'])
# # Example: iterate through 5 samples and visualize them
# # Uncode the following lines to visualize `SAMPLE_SIZE` of images and the corresponding text
# for i, sample in enumerate(ds['train']):
# if i >= SAMPLE_SIZE:
# break
# plt.imshow(sample['image'])
# plt.axis('off')
# plt.title(f"Sample {i+1}")
# plt.show()
# print("Text:", sample['text'])
# print("-"*50)
Citation
If you are using this dataset in your work, please cite the official paper below.
@inproceedings{
saeed2024muharaf,
title={Muharaf: Manuscripts of Handwritten Arabic Dataset for Cursive Text Recognition},
author={Mehreen Saeed and Adrian Chan and Anupam Mijar and Joseph Moukarzel and Gerges Habchi and Carlos Younes and Amin Elias and Chau-Wai Wong and Akram Khater},
booktitle={The Thirty-eight Conference on Neural Information Processing Systems Datasets and Benchmarks Track},
year={2024},
url={https://openreview.net/forum?id=1s8l1tnTXW}
}