You need to agree to share your Hugging Face information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

Urdu Shayari OCR Dataset (50k Pages)

Dataset Description

This is a large-scale, synthetically generated dataset designed for Urdu OCR (Optical Character Recognition), specifically focusing on the Nastaliq script. It contains 50,000 high-quality, full-page images of Urdu Shayari (Poetry) along with their exact ground-truth text transcriptions.

This dataset is intended to fine-tune Vision-Language Models (VLMs) like Qwen2-VL-2B, Qaari-Urdu, or TrOCR for extracting text from complex Urdu book pages.

Dataset Structure

Columns

  • image: A PIL Image object representing a full scanned book page.
  • text: A string containing the exact Urdu transcription of the page (including line breaks for couplets).

Features

  • Font: Jameel Noori Nastaleeq (a highly complex and elegant Nastaliq font).
  • Layout: Book-style pages with right-aligned text, proper margins, and distinct gaps between couplets (Ashaar).
  • Backgrounds (Mixed):
    • 33% Clean white paper (modern print).
    • 33% Light cream paper (classic book).
    • 34% Old/dusty yellowed paper (scanned vintage look).
  • Page Numbers: Randomly generated page numbers at the bottom center of most pages.
  • Augmentations: Slight rotation, dust specks, and realistic ink bleed to simulate real-world scans.

How to Use

You can easily load this dataset using the datasets library. Here is a quick example:

from datasets import load_dataset

dataset = load_dataset("YOUR_HF_USERNAME/YOUR_DATASET_NAME")
sample = dataset['train'][0]

# Display image and text
display(sample['image'])
print(sample['text'])
Downloads last month
157