Towards Automated Chinese Ancient Character Restoration: A Diffusion-Based Method with a New Dataset

Haolong Li, Chenghao Du, Ziheng Jiang, Yifan Zhang, Jiawei Ma, Chen YeAAAI 2024

Abstract

Automated Chinese ancient character restoration (ACACR) remains a challenging task due to its historical significance and aesthetic complexity. Existing methods are constrained by non-professional masks and even overfitting when training on small-scale datasets, which hinder their interdisciplinary application to traditional fields. In this paper, we introduce the Chinese Ancient Rubbing and Manuscript Character Dataset (ARMCD), which consists of 15,553 real-world ancient single-character images with 42 rubbings and manuscripts, covering the works of over 200 calligraphy artists spanning from 200 to 1,800 AD. We also provide professional synthetic masks by extracting localized erosion from real eroded images. Moreover, we propose DiffACR (Diffusion model for automated Chinese Ancient Character Restoration), a diffusion-based method for the ACACR task. Specifically, we regard the synthesis of eroded images as a special form of cold diffusion on uneroded ones and extract the prior mask directly from the eroded images. Our experiments demonstrate that our method comprehensively outperforms most existing methods on the proposed ARMCD.

Introduction

The restoration of ancient Chinese characters, typically found on stone steles and historical manuscripts, is a vital but labor-intensive task for archaeologists and art historians. Over centuries, these artifacts suffer from "erosion"—damage caused by environmental factors like water, wind, and physical decay. While automated inpainting techniques have advanced, they often fail on historical texts because they are typically trained on modern fonts with simplistic, artificial damage masks (e.g., random boxes). Real historical erosion is far more complex, characterized by intricate ink smears and structural degradation.

To bridge this gap, we present a novel diffusion-based framework, DiffACR, and a comprehensive new dataset, ARMCD, designed to bring professional-grade restoration to the digital age.

The ARMCD Dataset

A primary hurdle in ACACR is the lack of high-quality, paired training data. We address this with the Chinese Ancient Rubbing and Manuscript Character Dataset (ARMCD).

  • Content: The dataset includes 15,553 real-world single-character images sourced from 42 authoritative historical rubbings and manuscripts. These samples represent the styles of over 200 calligraphy masters from 200 to 1,800 AD.
  • Synthetic Erosion: Since perfectly paired "before and after" images of ancient artifacts do not exist, we developed a professional mask synthesis strategy. By extracting localized erosion patterns from real historical artifacts and applying them to intact characters, we created realistic training pairs that mimic actual physical degradation.
An example of an uneroded character from the ARMCD dataset.

The DiffACR Model

Our proposed model, DiffACR, leverages the unique properties of historical rubbings to improve restoration accuracy.

Erosionfication via Cold Diffusion

Unlike standard diffusion models that rely on Gaussian noise, DiffACR uses the Cold Diffusion framework. We define a forward process called "erosionfication," which iteratively applies realistic erosion masks to an intact character. This approach treats historical wear-and-tear as a deterministic degradation process rather than random noise, allowing the model to better learn the underlying physics of artifact decay.

Prior Masking

A key innovation in DiffACR is the use of a "prior mask." In high-contrast ink rubbings, the background is consistently white and the character strokes are black. Consequently, any white pixel in an eroded image is guaranteed to be background. By extracting these pixels as a prior mask, we constrain the model to only predict missing strokes in unknown regions, significantly reducing the search space and improving structural fidelity.

An eroded character demonstrating the complex, non-Gaussian degradation patterns addressed by DiffACR.

Key Results

DiffACR was benchmarked against nine state-of-the-art inpainting methods, including CharFormer and SwinIR. Our method achieved superior performance across all major metrics, scoring an MAE of 0.0187, PSNR of 22.25, SSIM of 0.9988, and an FID of 12.87.

Furthermore, a "Two-Alternative Forced Choice" (2AFC) user study revealed that our synthetic erosion masks are highly realistic. When shown real vs. synthetic erosion, 63% of professional restoration experts were unable to distinguish between the two, confirming the effectiveness of our data synthesis strategy.

Conclusion

DiffACR and the ARMCD dataset provide a robust foundation for the automated restoration of ancient Chinese characters. By modeling erosion as a specialized diffusion process and utilizing domain-specific priors, we achieve state-of-the-art results that meet the standards of professional historians. Future work will explore extending this methodology to other ancient scripts and adapting the model for low-contrast or multi-colored artifacts.

Summary updated

BibTeX
@inproceedings{li2024towards,
  author = {Haolong Li and Chenghao Du and Ziheng Jiang and Yifan Zhang and Jiawei Ma and Chen Ye},
  title = {{Towards Automated Chinese Ancient Character Restoration: A Diffusion-Based Method with a New Dataset}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  url = {https://openreview.net/forum?id=9FD3lSqqLp},
}
Figure