Research
DohaScript: A Large-Scale Multi-Writer Dataset for Continuous Handwritten Hindi Text
Overview Research area: Computer vision and document analysis — specifically handwritten text datasets, handwriting quality assessment, and document layout/line segmentation for the Devanagari script.

- arXiv
- 2602.18089
- Published
- 2026-02-20
- Authors
- Kunwar Arpit Singh, Ankush Prakash, Haroon R Lone
AI summary
Overview
Research area: Computer vision and document analysis — specifically handwritten text datasets, handwriting quality assessment, and document layout/line segmentation for the Devanagari script.
Technical level: Intermediate. The paper combines dataset construction and demographic/collection methodology with convolutional neural network (CNN) based quality classification and classical heuristic image segmentation, so some familiarity with CNNs and document image processing helps.
Scope: The paper introduces DohaScript, a 531-writer dataset of the same six handwritten Hindi dohas, together with demographic metadata, CNN-based quality curation, and page-level line-segmentation difficulty labels.
What This Paper Is About
Handwritten Devanagari text — used by Hindi and several other Indic languages with hundreds of millions of speakers — has very few large, public, page-level datasets. Most existing resources contain isolated characters or short words, cover few writers, and lack demographic or quality annotations, which makes it hard to study continuous handwriting, writer style, or generative models. The authors build and release DohaScript: a parallel corpus in which 531 writers each copied the same fixed set of six Hindi dohas, so that writing style can be studied separately from linguistic content, and they add automated quality labels plus segmentation-difficulty labels to make benchmarking stratified and reproducible.
Key Contributions
-
A large multi-writer parallel corpus of continuous handwritten Hindi. 531 contributors each transcribed the same six traditional dohas (89 words, 361 characters excluding spaces, 55 distinct characters), producing 531 page-level samples and 47,259 total word instances. The fixed text isolates writer-specific style from linguistic content.
-
Non-identifiable demographic metadata and documented ethical protocol. Each sample carries age, gender, and regional state (participants span states across India; 135 female and 396 male). The study was approved by the Institutional Ethics Committee of the authors' host institution, and no names, signatures, or free-form personal text were collected.
-
A CNN-based quality curation pipeline. The authors compute a Laplacian-variance blur score for every page and train two CNN classifiers (binary and four-class) on quality labels to filter samples, then release a high-quality core subset alongside the naturally degraded remainder.
-
Page-level line-segmentation difficulty annotations. Each of the 531 pages is assigned a composite score in [0, 100] and labeled Easy, Medium, or Complex based on how well a hybrid heuristic pipeline detects the expected 12 text lines, enabling stratified benchmarking.
Main Findings
-
Data scale and format: 531 unique writers, one A4 page each, all containing the same six dohas. Pages were resized to 2480 × 3508 pixels at 300 DPI. Each page holds 89 words, giving 47,259 word instances overall.
-
Script coverage: The fixed text contains 38 consonants spanning all five articulation categories (velar, palatal, retroflex, dental, labial) plus semivowels and sibilants, all primary vowel classes, 13 vowel diacritics (mātrās), the halant for consonant clusters, nasalization marks, and common conjuncts.
-
Wide quality variation: Blur scores across the 531 samples ranged from 9.7 to 13,865 (mean = 3268, median = 4110, standard deviation = 2438), attributed to differences in acquisition method (mobile camera vs. scanner), lighting, ink quality, and paper texture.
-
Binary quality classifier performance: 96.26% test accuracy and 98.82% validation accuracy. Per-class precision, recall, and F1 were balanced: Low-to-Medium (blur < 3000) at 0.94 precision, 0.99 recall, 0.96 F1; High (≥ 3000) at 0.99 precision, 0.93 recall, 0.96 F1.
-
Four-class quality classifier performance: 85.98% test accuracy and 80.00% validation accuracy, with precision 0.75–0.96 and recall 0.81–0.90. The Medium class (1000–2999) was weakest (precision 0.75, recall 0.83, F1 0.79) because it overlaps with the adjacent Good class; the extremes were stronger (Low F1 = 0.93, Excellent F1 = 0.83).
-
Class means validate the four-level stratification: Low mean blur 294, Medium 1432, Good 4269, Excellent 6129, with the class counts 145 (27.3%), 87 (16.4%), 159 (29.9%), and 140 (26.4%) respectively. Class counts for the binary split at threshold 3000 (43rd percentile) were 232 (43.7%) and 299 (56.3%).
-
Quality-filtered core subset: Applying the binary classifier to all 531 images at a confidence threshold of 0.7 retained 288 images (54.2%), of which 157 were Good (54.5%) and 131 Excellent (45.5%), with a mean blur score above 5000 — a 53% increase over the original dataset mean of 3268. Notably, the CNN retained 288 images even though 299 exceeded the blur threshold of 3000, which the authors read as evidence the model captures cues beyond edge sharpness (ink consistency, illumination stability, background interference).
-
A retained degraded subset: The remaining 243 samples (45.8%) have mean blur scores below 1500 and are kept deliberately as a challenging subset reflecting defocus blur, poor lighting, low ink density, and background noise.
-
Line segmentation is genuinely hard: On all 531 raw pages (each with 12 expected lines), only 157 pages (29.57%) were segmented perfectly. Mean segmentation score was 43.46 ± 22.55 (95% CI [41.54, 45.39], median 42.91), and on average 11.22 ± 2.92 lines were detected per page.
-
Difficulty skews toward complex pages: Only 110 pages (20.7%) were labeled Easy (scores 65.1–91.8), 141 (26.6%) Medium (45.9–66.4), and 280 (52.7%) Complex (7.6–46.7). The authors stress this difficulty stems from intrinsic handwriting traits — dense inter-line spacing, overlapping strokes, baseline drift, and shirorekha-induced continuity — not only acquisition noise.
-
Error tail: Line-count errors were 0 lines for 157 pages (29.6%), 1 line for 138 (26.0%), 2 for 69 (13.0%), 3 for 64 (12.1%), 4 and 5 lines for 28 pages each (5.3% each), 6 for 10 (1.9%), 7 for 18 (3.4%), 8 for 9 (1.7%), 9 for 7 (1.3%), 10 for 2 (0.4%), and 11 for 1 (0.2%).
-
Dataset comparison: In the paper's own comparison table, DohaScript has 531 pages, 531 writers, continuous couplets, and demographics, versus IIIT-HW-Words (word-only, 135 writers, no demographics), IIIT-HW-Dev (word-only, 12 writers, limited demographics), the Numerals/Vowels Dataset (character-only, approximately 3800 subjects, with demographics), CHIPS/PLATTER (25,290 pages, no writer count reported, continuous, no demographics), Parimal Hindi (500 pages, 10 writers, continuous paragraphs, with demographics), and AnciDev (500 pages, continuous lines, no demographics).
-
What is not reported: The provided content does not give handwritten text recognition (HTR) or OCR accuracy numbers, nor writer-identification accuracy figures. The abstract states that baseline experiments show "clear quality separation and strong generalization to unseen writers," but the only baseline results with numbers in the content are the quality classifiers and the segmentation difficulty profiling.
Methodology in Plain English
Corpus design. The authors picked six well-known Hindi dohas (rhyming couplets) by Kabir Das, Rahim Das, and Tulsidas. These are taught widely in Indian schools, culturally familiar, and free of copyright issues. The text was checked to cover the Devanagari character inventory broadly.
Collection. Volunteers — recruited through the authors' host institution plus five educational institutions across India (one national-level institute in Madhya Pradesh, two state colleges in Bihar, two elementary schools in Uttar Pradesh) — each hand-wrote the same dohas on one A4 sheet and submitted it via Google Form as a scan or phone photo; a few physical sheets were digitized with a scanner. Both raw and standardized (A4-sized, 300 DPI) versions were kept. Participation was voluntary and only non-identifiable demographics were recorded.
Quality labeling. Each page's sharpness was measured with the Laplacian variance (the variance of the second-derivative Laplacian operator applied to the grayscale image). High values mean crisp edges; low values mean blur. The authors chose thresholds by inspecting the score distribution plus manual review of 100 samples in the 2500–3500 range: 3000 for the binary split, and 1000/3000/5000 for four quality levels. They then trained lightweight CNNs — a three-block convolutional backbone with global average pooling and fully connected layers, implemented in PyTorch 2.0 on CUDA GPUs with the Adam optimizer and cross-entropy loss — to classify quality directly from pixels, using the blur-based labels as supervision. Data were split by stratified sampling into 339 training (63.8%), 85 validation (16.0%), and 107 test (20.2%) pages.
Difficulty annotation. For layout difficulty, three classical heuristics are run independently on each binarized page: (1) horizontal projection profiles with Gaussian smoothing (σ = 2) to find valleys between text lines; (2) contour extraction after 50 × 1 horizontal morphological dilation followed by bounding-box merging; and (3) morphology-driven suppression of shirorekha-like horizontal strokes with connected-component grouping. For each page, the result whose detected line count is closest to the expected 12 is kept. A composite score S = S_count + S_height + S_spacing + S_coverage + S_straight in [0, 100] combines line-count accuracy with height uniformity, spacing consistency, coverage ratio, and boundary regularity. Using that score and the line-count error, pages with ≤ 1 line error and score ≥ 65 become Easy, pages with ≤ 3 line errors and score above 45 become Medium, and the rest become Complex.
Why This Matters
Impact on research. Devanagari handwriting research has been fragmented because most groups worked with private or institution-specific collections, making results hard to compare. DohaScript offers a fixed-text, many-writer, page-level benchmark with quality and difficulty labels, so that performance differences across methods can be attributed to method rather than data, and so that results can be stratified by writing difficulty or image quality. Its parallel design — identical text from every writer — is what generative and style-transfer models typically need but Indic resources only partially satisfy.
Real-world applications:
- Handwritten text recognition and OCR for Hindi/Devanagari documents in administration, education, and record-keeping, evaluated at the page and line level rather than on isolated characters.
- Writer identification and handwriting-based biometrics, enabled by each document having a distinct writer with identical content.
- Handwriting synthesis and data augmentation, using repeated lexical content plus stylistic diversity for style-conditioned generation.
- Document layout analysis and line segmentation benchmarking, supported by the Easy/Medium/Complex annotations and the observation that over half the pages are structurally complex.
Industry relevance. Organizations that digitize Indic-language records (government archives, banks, insurance, education, postal and legal services) depend on recognition systems that work on real, uneven handwriting and imperfect phone photos. The retained degraded subset of 243 pages specifically models those real capture conditions, while the 288-page high-quality core gives a cleaner reference set — a split that matters for teams deciding whether their failure modes come from the model or from the scan.
Future Directions
-
Structure-aware segmentation models. Since 52.7% of pages are labeled Complex even after quality filtering, and only 29.57% segment perfectly, the authors argue for adaptive segmentation approaches that handle dense spacing, drifting baselines, overlapping strokes, and shirorekha continuity between lines.
-
Full recognition and writer-identification baselines. The content reports quality-classification and segmentation baselines but no HTR/OCR accuracy or writer-identification accuracy figures; establishing those numbers on the high-quality core and the degraded subset is a natural next step for a standardized benchmark.
-
Restoration and deblurring for the degraded subset. The 243 low-quality pages (mean blur score below 1500) are framed as a resource for developing restoration or deblurring methods and for testing model resilience to poor acquisition.
-
Exploiting the controlled parallel design. Because all writers copy identical text and each sample carries age, gender, and state metadata, the dataset is positioned for population-level style analysis, demographic-stratified evaluation, and style-conditioned handwriting synthesis — directions the paper identifies but does not quantify.
Target Audience
Researchers and practitioners in handwriting recognition, document image analysis, and Indic-script NLP who need a benchmark for continuous Devanagari text; computer vision engineers building OCR or segmentation pipelines for Hindi documents; and researchers in handwriting biometrics, style analysis, and generative handwriting modeling who need the same lexical content written by many different people, along with demographic and quality metadata. The paper is also useful to dataset builders looking for a worked example of quality curation, ethical collection, and difficulty annotation for a low-resource script.
Authors’ abstract
Despite having hundreds of millions of speakers, handwritten Devanagari text remains severely underrepresented in publicly available benchmark datasets. Existing resources are limited in scale, focus primarily on isolated characters or short words, and lack controlled lexical content and writer level diversity, which restricts their utility for modern data driven handwriting analysis. As a result, they fail to capture the continuous, fused, and structurally complex nature of Devanagari handwriting, where characters are connected through a shared shirorekha (horizontal headline) and exhibit rich ligature formations. We introduce DohaScript, a large scale, multi writer dataset of handwritten Hindi text collected from 531 unique contributors. The dataset is designed as a parallel stylistic corpus, in which all writers transcribe the same fixed set of six traditional Hindi dohas (couplets). This controlled design enables systematic analysis of writer specific variation independent of linguistic content, and supports tasks such as handwriting recognition, writer identification, style analysis, and generative modeling. The dataset is accompanied by non identifiable demographic metadata, rigorous quality curation based on objective sharpness and resolution criteria, and page level layout difficulty annotations that facilitate stratified benchmarking. Baseline experiments demonstrate clear quality separation and strong generalization to unseen writers, highlighting the dataset's reliability and practical value. DohaScript is intended to serve as a standardized and reproducible benchmark for advancing research on continuous handwritten Devanagari text in low resource script settings.