Manuscript Offprint

arXiv:2610.09439

InscriptionOCR: A Dataset and Method for Understanding Inscriptions

Jaidev Sanjay Khalane, Akbar Ali, V. N. Prabhakar, Shanmuganathan Raman

ABSTRACT

Ancient script image restoration is a fundamental problem in computer vision, as it directly affects the reliable analysis and interpretation of historical documents and inscriptions. Ashokan Brahmi is an ancient script extensively used during the reign of Emperor Ashoka in the 3rd century BC, primarily for inscriptions in Prakrit. These inscriptions, including major and minor rock and pillar edicts, constitute a valuable yet largely unexplored source of data for computational analysis. The degraded nature of inscription imagery and the lack of standardized digital resources pose significant challenges for automated processing. We present an end-to-end AI-based framework for understanding ancient inscriptions that encompasses image enhancement, optical character recognition (OCR), transliteration, and neural machine translation (NMT). The proposed pipeline processes low-quality images captured directly from stone inscriptions, performs image restoration and Brahmi script character recognition, maps the recognized characters to the Roman script, and finally translates the resulting Prakrit text into English. We also introduce two new datasets: (i) InscriptionOCR Dataset: the largest publicly usable digital OCR dataset for Brahmi script to date, consisting of over 200,000 character images across about 600 classes, and (ii) a bilingual Prakrit-English parallel corpus comprising over 2,000 sentence pairs for NMT. We believe that the proposed framework and datasets will facilitate future research in ancient script analysis, low-resource OCR, and digital epigraphy.

Index Terms— Ancient Script OCR, Inscription Image Processing, Ancient Language Translation

1. INTRODUCTION

Ancient inscriptions and documents [1] constitute a vital source of historical, linguistic, and cultural knowledge. Among these, the Ashokan inscriptions dating back to the 3rd century BC represent one of the earliest and most extensive uses of writing in the Indian subcontinent [2]. These inscriptions, engraved on rocks and pillars across a vast geographical region, were primarily written in the Brahmi script and served as official proclamations of the Mauryan empire. Despite their historical significance, large-scale digitization and computational analysis of these inscriptions remain lim-

Figure

Fig. 1: Representative dataset characters.

ited.

From a computer vision perspective [3], Ashokan inscriptions present several challenges. The available images are often captured under uncontrolled environmental conditions and are prone to erosion, surface damage, uneven illumination, shadows, biological growth, and background noise. Moreover, the Brahmi [4] script exhibits significant variability in character shapes due to regional, temporal, and stylistic differences. The absence of standardized glyphs, combined with the scarcity of inscription-specific data, makes the direct application of existing optical character recognition [5] (OCR) systems ineffective.

Recent advances in digital image processing and deep learning [6] have led to substantial progress in document analysis and OCR for modern scripts. However, ancient scripts such as Brahmi remain underexplored due to the lack of publicly available datasets that support reproducible research and fair benchmarking. Most existing studies focus on isolated components, such as preprocessing or character recognition, and do not provide end-to-end datasets that span from raw inscription images to machine-readable text representations.

In this work, we present a comprehensive dataset and processing pipeline for Ashokan Brahmi inscriptions. Starting from low-quality inscription images, we apply a series of classical image processing techniques, including grayscale conversion, denoising, thresholding, contour detection, and morphological operations, to enhance and restore the visual quality of the text. The restored images are then used for character-level segmentation and OCR, employing convolutional neural network-based character recognition models.

Finally, the recognized Brahmi characters are mapped to their corresponding Roman transliterations, enabling standardized digital representation and facilitating downstream linguistic analysis [2].

The primary contribution of this paper is as follows

  • A dataset-centric study bridging ancient epigraphical material with modern computer vision techniques.

  • A comprehensive dataset named InscriptionOCR, specifically designed for facilitating OCR across inscription images, is also the largest Brahmi Characters dataset for OCR, both in terms of the number of classes and the number of images.

  • One of the largest publicly usable datasets for the translation of text from the Prakrit language to the English language.

  • An end-to-end framework to process inscription images in ancient script and language in order to return the overall content in a known language and script (English) for supporting future research in historical document analysis, and digital epigraphy.

AuthorTranslationDataset SizeOCR ClassesTranslation Dataset
Gautam [7]×7,011170×
Gunasekara [4]×250-300××
Mubarakkaa [5]××××
Dhivya [8]×190,000209×
Chaudhari [9]✓××1474
Our Work✓253,8005642224

Table 1: Comparison of OCR and translation capabilities for Brahmi-based datasets.

OCR Dataset
Total Images253800
Training Images228,420
Testing Images25,380
OCR Class-wise Distribution
Numeric Characters30
Vowel Characters17
Punctuation Characters7
Composite Characters (Plain + Voweled Consonants)510
NMT (Translation) Dataset
Total Parallel Sentence Pairs2,224
Mean Words per Sentence (Prakrit)~10.6
Mean Words per Sentence (English)~20.8

Table 2: Specification of our proposed dataset.

References (21)

  • An ocr for classical indic documents containing arbitrarily long words
  • Llmco4mr: Llms-aided neural combinatorial optimization for ancient manuscript restoration from fragments with case studies on dun-huang
  • Deep residual learning for image recognition
  • Deep learning-powered mobile app for early brahmi script decipherment in sri lanka
  • Ocr based transliteration of brahmi to tamil using cnn
  • Gradient-based learning applied to document recognition
  • The dataset for printed brahmi word recognition
  • Tamizhi: historical tamil-brahmi script recognition using cnn and mobilenet
  • Bridging the past: Neural machine translation of maharashtra prakrit to english
  • Cured: Deep learning optical character recognition for cuneiform text editions and legacy materials
  • An ai based automatic translator for ancient hieroglyphic language—from scanned images to english text
  • Vol. 1: Inscriptions of Aśoka, Archaeological Survey of India, 1991
  • Very Deep Convolutional Networks for Large-Scale Image Recognition
  • Efficientnet: Rethinking model scaling for convolutional neural networks
  • Beyond english-centric multilingual machine translation
  • Exploring the limits of transfer learning with a unified text-to-text transformer
  • Democratizing neural machine translation with OPUS-MT
  • Bleu: a method for automatic evaluation of machine translation
  • Meteor: An automatic metric for mt evaluation with improved correlation with human judgments
  • Buddha Sakyamuni on the Rummindei pillar of Ashoka
  • Devanampriyasa Asoka Text on Maski Edict