Table of Contents
Fetching ...

synthocr-gen: A synthetic ocr dataset generator for low-resource languages- breaking the data barrier

Haq Nawaz Malik, Kh Mohmad Shafi, Tanveer Ahmad Reshi

TL;DR

SynthOCR-Gen tackles the data scarcity barrier in OCR for low-resource languages by generating large, labeled OCR datasets from Unicode text corpora entirely on the client side. It combines flexible text segmentation, Unicode validation, RTL-aware rendering with multiple fonts, and 25+ augmentation techniques to produce document-style images with ground-truth labels compatible with major OCR frameworks. The authors demonstrate the approach by producing a 600k Kashmiri word-segmented dataset, publicly releasing it, and providing a replicable methodology and tooling that can be adapted to other scripts. This work lowers the cost and increases the reproducibility of OCR development for underserved languages, enabling rapid experimentation and deployment in vision-language systems. The open-source nature and browser-based implementation further democratize access to OCR data generation for diverse writing systems.

Abstract

Optical Character Recognition (OCR) for low-resource languages remains a significant challenge due to the scarcity of large-scale annotated training datasets. Languages such as Kashmiri, with approximately 7 million speakers and a complex Perso-Arabic script featuring unique diacritical marks, currently lack support in major OCR systems including Tesseract, TrOCR, and PaddleOCR. Manual dataset creation for such languages is prohibitively expensive, time-consuming, and error-prone, often requiring word by word transcription of printed or handwritten text. We present SynthOCR-Gen, an open-source synthetic OCR dataset generator specifically designed for low-resource languages. Our tool addresses the fundamental bottleneck in OCR development by transforming digital Unicode text corpora into ready-to-use training datasets. The system implements a comprehensive pipeline encompassing text segmentation (character, word, n-gram, sentence, and line levels), Unicode normalization with script purity enforcement, multi-font rendering with configurable distribution, and 25+ data augmentation techniques simulating real-world document degradations including rotation, blur, noise, and scanner artifacts. We demonstrate the efficacy of our approach by generating a 600,000-sample word-segmented Kashmiri OCR dataset, which we release publicly on HuggingFace. This work provides a practical pathway for bringing low-resource languages into the era of vision-language AI models, and the tool is openly available for researchers and practitioners working with underserved writing systems worldwide.

synthocr-gen: A synthetic ocr dataset generator for low-resource languages- breaking the data barrier

TL;DR

SynthOCR-Gen tackles the data scarcity barrier in OCR for low-resource languages by generating large, labeled OCR datasets from Unicode text corpora entirely on the client side. It combines flexible text segmentation, Unicode validation, RTL-aware rendering with multiple fonts, and 25+ augmentation techniques to produce document-style images with ground-truth labels compatible with major OCR frameworks. The authors demonstrate the approach by producing a 600k Kashmiri word-segmented dataset, publicly releasing it, and providing a replicable methodology and tooling that can be adapted to other scripts. This work lowers the cost and increases the reproducibility of OCR development for underserved languages, enabling rapid experimentation and deployment in vision-language systems. The open-source nature and browser-based implementation further democratize access to OCR data generation for diverse writing systems.

Abstract

Optical Character Recognition (OCR) for low-resource languages remains a significant challenge due to the scarcity of large-scale annotated training datasets. Languages such as Kashmiri, with approximately 7 million speakers and a complex Perso-Arabic script featuring unique diacritical marks, currently lack support in major OCR systems including Tesseract, TrOCR, and PaddleOCR. Manual dataset creation for such languages is prohibitively expensive, time-consuming, and error-prone, often requiring word by word transcription of printed or handwritten text. We present SynthOCR-Gen, an open-source synthetic OCR dataset generator specifically designed for low-resource languages. Our tool addresses the fundamental bottleneck in OCR development by transforming digital Unicode text corpora into ready-to-use training datasets. The system implements a comprehensive pipeline encompassing text segmentation (character, word, n-gram, sentence, and line levels), Unicode normalization with script purity enforcement, multi-font rendering with configurable distribution, and 25+ data augmentation techniques simulating real-world document degradations including rotation, blur, noise, and scanner artifacts. We demonstrate the efficacy of our approach by generating a 600,000-sample word-segmented Kashmiri OCR dataset, which we release publicly on HuggingFace. This work provides a practical pathway for bringing low-resource languages into the era of vision-language AI models, and the tool is openly available for researchers and practitioners working with underserved writing systems worldwide.
Paper Structure (123 sections, 1 theorem, 37 equations, 10 figures, 15 tables, 1 algorithm)

This paper contains 123 sections, 1 theorem, 37 equations, 10 figures, 15 tables, 1 algorithm.

Key Result

Theorem 3.1

Given identical inputs $(\mathcal{C}, \mathcal{F}, \Theta, X_0)$, the generation function $\mathcal{G}$ produces byte-identical output $\mathcal{D}$.

Figures (10)

  • Figure 1: Note: its an hypothetical visual (not real Kashmiri text) image text describing case study of Kashmiri language analysis for better understanding for international research readers.
  • Figure 2: Complete SynthOCR-Gen workflow diagram. The system accepts three types of inputs (source text, fonts, optional background images), processes them through configuration stages (text, font, background, augmentation settings), provides real-time preview, executes the five-stage processing pipeline ($\sigma \to \psi \to \rho \to \phi \to \pi$), and produces a downloadable ZIP archive containing PNG images, label files, metadata, and train/validation splits.
  • Figure 3: Pipeline architecture with mathematical operators. Each stage transforms data according to the formalization shown below the stage boxes. Notation: $s_j$ = text segment, $\tilde{s}_j$ = validated segment, $I_j^{(0)}$ = raw image, $I_j$ = augmented image.
  • Figure 4: Augmentation configuration interface in SynthOCR-Gen. Users can enable individual transforms, set intensity ranges, and control the probability of augmentation application. This granular control enables dataset customization for specific training requirements.
  • Figure 5: System Architecture with Color-Coded Layers
  • ...and 5 more figures

Theorems & Definitions (2)

  • Theorem 3.1: Reproducibility
  • proof