Table of Contents
Fetching ...

Unveiling Text in Challenging Stone Inscriptions: A Character-Context-Aware Patching Strategy for Binarization

Pratyush Jena, Amal Joseph, Arnav Sharma, Ravi Kiran Sarvadevabhatla

TL;DR

The paper tackles binarization of severely degraded stone inscriptions, where poor contrast and irregular layouts hinder traditional methods. It introduces a Character-Context-Aware patching framework to train an Attention U-Net, combined with a two-stage self-refining inference pipeline, and validates on a new dataset of 203 annotated inscriptions. Key contributions include a three-step patching strategy that centers on robust mean character height $\overline{h}_{cc}$, foreground/background dilation scaled by $\overline{h}_{cc}$, and multi-scale patch sampling, all enabling strong zero-shot generalization to unseen scripts. The approach yields significant performance gains over classical and deep-learning baselines, and provides a robust preprocessing foundation for downstream tasks in digital epigraphy and historical text analysis.

Abstract

Binarization is a popular first step towards text extraction in historical artifacts. Stone inscription images pose severe challenges for binarization due to poor contrast between etched characters and the stone background, non-uniform surface degradation, distracting artifacts, and highly variable text density and layouts. These conditions frequently cause existing binarization techniques to fail and struggle to isolate coherent character regions. Many approaches sub-divide the image into patches to improve text fragment resolution and improve binarization performance. With this in mind, we present a robust and adaptive patching strategy to binarize challenging Indic inscriptions. The patches from our approach are used to train an Attention U-Net for binarization. The attention mechanism allows the model to focus on subtle structural cues, while our dynamic sampling and patch selection method ensures that the model learns to overcome surface noise and layout irregularities. We also introduce a carefully annotated, pixel-precise dataset of Indic stone inscriptions at the character-fragment level. We demonstrate that our novel patching mechanism significantly boosts binarization performance across classical and deep learning baselines. Despite training only on single script Indic dataset, our model exhibits strong zero-shot generalization to other Indic and non-indic scripts, highlighting its robustness and script-agnostic generalization capabilities. By producing clean, structured representations of inscription content, our method lays the foundation for downstream tasks such as script identification, OCR, and historical text analysis. Project page: https://ihdia.iiit.ac.in/shilalekhya-binarization/

Unveiling Text in Challenging Stone Inscriptions: A Character-Context-Aware Patching Strategy for Binarization

TL;DR

The paper tackles binarization of severely degraded stone inscriptions, where poor contrast and irregular layouts hinder traditional methods. It introduces a Character-Context-Aware patching framework to train an Attention U-Net, combined with a two-stage self-refining inference pipeline, and validates on a new dataset of 203 annotated inscriptions. Key contributions include a three-step patching strategy that centers on robust mean character height , foreground/background dilation scaled by , and multi-scale patch sampling, all enabling strong zero-shot generalization to unseen scripts. The approach yields significant performance gains over classical and deep-learning baselines, and provides a robust preprocessing foundation for downstream tasks in digital epigraphy and historical text analysis.

Abstract

Binarization is a popular first step towards text extraction in historical artifacts. Stone inscription images pose severe challenges for binarization due to poor contrast between etched characters and the stone background, non-uniform surface degradation, distracting artifacts, and highly variable text density and layouts. These conditions frequently cause existing binarization techniques to fail and struggle to isolate coherent character regions. Many approaches sub-divide the image into patches to improve text fragment resolution and improve binarization performance. With this in mind, we present a robust and adaptive patching strategy to binarize challenging Indic inscriptions. The patches from our approach are used to train an Attention U-Net for binarization. The attention mechanism allows the model to focus on subtle structural cues, while our dynamic sampling and patch selection method ensures that the model learns to overcome surface noise and layout irregularities. We also introduce a carefully annotated, pixel-precise dataset of Indic stone inscriptions at the character-fragment level. We demonstrate that our novel patching mechanism significantly boosts binarization performance across classical and deep learning baselines. Despite training only on single script Indic dataset, our model exhibits strong zero-shot generalization to other Indic and non-indic scripts, highlighting its robustness and script-agnostic generalization capabilities. By producing clean, structured representations of inscription content, our method lays the foundation for downstream tasks such as script identification, OCR, and historical text analysis. Project page: https://ihdia.iiit.ac.in/shilalekhya-binarization/
Paper Structure (19 sections, 8 figures, 5 tables, 1 algorithm)

This paper contains 19 sections, 8 figures, 5 tables, 1 algorithm.

Figures (8)

  • Figure 1: Sample images and their corresponding binarization ground truth from the annotated stone inscription dataset. Notice the difficulty distinguishing the shallow handwritten text etching from the background stone texture with naked eye.
  • Figure 2: Overview of our Character-Context-Aware Patch Selection Strategy. First, we compute the mean character height $(\overline{h}_{cc})$ using connected components. (Sec. \ref{['sec:proposed_approach_step_1']})Next, dilate (with a kernel adaptive to $(\overline{h}_{cc})$) to identify foreground (text) and background (non-text) regions. (Sec. \ref{['sec:proposed_approach_step_2']})Finally, uniformly sample anchor points from these regions to extract multi-scale patches. (Sec. \ref{['sec:proposed_approach_step_3']}) This strategy ensures that each patch contains consistently-scaled context, enabling the model to effectively learn the distinction between character strokes and background noise.
  • Figure 3: Our Character-Context-Aware Patching produce patches of good context, where the amount of textual information is consistent across the patches. Notice the character height is similar across the patches relative to the patch dimensions with our patching method.
  • Figure 4: Architecture of the Attention U-Net used for patch-wise binarization. Attention gates modulate encoder features before concatenation at each decoder stage. Model architecture reproduced from Oktay2018 under CC BY 4.0 license.
  • Figure 5: Overview of our Self-Refining Inference Pipeline.First, we perform inference with patch sizes 256, 384, 512, 768 and fuse their predictions to get a preliminary binary map. (Sec. \ref{['sec:inference_pipeline_step_1']})Using this map as a pseudo-ground truth, we then determine the optimal patch size and perform a final inference pass to get the refined prediction. (Sec. \ref{['sec:inference_pipeline_step_2']})
  • ...and 3 more figures