Dataset Viewer
Auto-converted to Parquet Duplicate
The dataset viewer is not available for this split.
Parquet error: Scan size limit exceeded: attempted to read 362447265 bytes, limit is 300000000 bytes Make sure that 1. the Parquet files contain a page index to enable random access without loading entire row groups2. otherwise use smaller row-group sizes when serializing the Parquet files
Error code:   TooBigContentError

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.

Hindi-English Line OCR Dataset

Printed Hindi, English, and mixed-script line images from scanned documents, rendered PDFs, and synthetic text. Images are embedded directly in Parquet format with exact Unicode transcriptions. This final release contains 98,195 verified line crops organized into standard training, validation, and test splits.

Splits and Script Distribution

Split Real Synthetic Total
train 8,833 83,000 91,833
validation 1,224 2,000 3,224
test 1,638 1,500 3,138
Total 11,695 86,500 98,195

Real Images

Split Hindi English Mixed Digits / Symbols / Blank Total
train 6,450 1,597 249 537 8,833
validation 864 171 155 34 1,224
test 1,109 194 255 80 1,638

Synthetic Images

Split Hindi English Mixed Digits / Symbols / Blank Total
train 34,521 12,267 35,695 517 83,000
validation 704 302 994 0 2,000
test 347 275 878 0 1,500

Script categories inspect the actual transcription characters. Hindi indicates Devanagari letters are present; English indicates ASCII Latin letters are present; mixed requires both scripts. Digits, punctuation, symbols, and blank crops are reported separately.

Provenance and Sources

The dataset balances authentic printed historical and modern publications with diverse synthetic rendering:

  • Real document collections:
    • Government and official publications: Central Hindi Directorate programmes and guidelines, ISRO space science glossary, Ministry of Earth Sciences administrative glossary, Rajbhasha Bharti, and NHAI application forms.
    • Educational textbooks: NCERT secondary science textbooks and Hindi literature collections (Kshitij).
    • Historical Hindi literature: Chandrakanta, Skandgupt, Mansarovar, Bhasha Itihas, Bhoo Vigyan, Bandi Jeevan, Bharat Vibhajan, Volga Se Ganga, Gunahon Ka Devta, Ramcharitmanas, and Chintamani.
    • Classical English literature: Pride and Prejudice, Great Expectations, and A Tale of Two Cities.
    • IndicVisionBench Devanagari line corpus.
  • Synthetic generation:
    • Text sourced from Hindi Wikipedia, literary prose, and bilingual term pairs.
    • Rendered across open-source Devanagari and Latin fonts with varied weights, sizes, background textures, blur, and aspect ratios.

Methodology and Quality Verification

  1. Rendering and line segmentation: Scanned books and PDFs were rendered at 300 DPI. Line bounding boxes were extracted using automated text detection.
  2. Transcription and agreement filtering: Real lines were transcribed with independent blind vision-language model reads. Transcriptions were retained only when reads agreed after NFC normalization.
  3. Visual review and audit: Visual inspection audited all real line crops across all splits. Label shift cascades caused by stray margin crops were realigned to printed page text. Leaked internal identifier placeholders were replaced with true text. Non-text ornamental dividers, noise specks, and sliced bounding boxes were assigned empty reference labels ("") with nonlinguistic category tags.
  4. Deduplication and leakage prevention: All images were audited using global SHA256 image hashes and grayscale pixel values. Exact duplicate images were removed from training. Document pages are strictly isolated between training and evaluation splits so that no evaluation page appears in training data.

Schema and Columns

Column Type Description
id string Unique record identifier
image struct Image data dictionary containing bytes (PNG/JPEG) and path (null)
reference string Normalized text transcription
data_source string Origin of sample: "real" or "synthetic"
category string Script classification: "hindi", "english", "mixed_hindi_english", or "nonlinguistic"
document string Source book or document group identifier
dataset_version string Dataset release status: "final"
width int32 Crop width in pixels
height int32 Crop height in pixels

Usage

from datasets import Image, load_dataset

# Load validation split
val = load_dataset("hari31416/hindi-english-line-ocr", split="validation")
val = val.cast_column("image", Image())
print(val[0]["reference"])

# Load test split
test = load_dataset("hari31416/hindi-english-line-ocr", split="test")

# Load train split
train = load_dataset("hari31416/hindi-english-line-ocr", split="train")

Metadata Files

The repository provides sidecar metadata in the metadata/ directory:

Downloads last month
78