The original data of the dataset is sourced from public channels such as the Internet, and its copyright shall remain with the original providers. The collated and annotated dataset presented in this case is for non-commercial use only and is currently licensed to universities and research institutions. To apply for the use of this dataset, please fill in the corresponding application form in accordance with the requirements specified on the dataset’s official website. The applicant must be a full-time employee of a university or research institute and is required to sign the application form. For the convenience of review, it is recommended to affix an official seal (a seal of a secondary-level department is acceptable).
-
We propose UniHIR, a pioneering Unified MLLM for end-to-end Historical Inscription Restoration (HIR), offering a new perspective on HIR.
-
UniHIR incorporates two novel designs, Draft-Guided Localization and Hierarchical Self-Refinement, to support iterative reasoning and self-correction for HIR.
-
We propose UHIRFactory and construct HIRBench to enable step-wise, memory efficient training of UniHIR.
-
Extensive experiments demonstrate that our method achieves superior restored-text accuracy and generation quality.
- 2026.07.05: 🎉🎉 Our paper is accepted by ACL Main.
- Release inference code
- Release UniHIR model
- Release HIRBench
Clone this repo:
git clone https://github.com/ZZXF11/UniHIR
cd UniHIRStep 0: Download and install Miniconda from the official website.
Step 1: Create a conda environment and activate it.
conda create -n unihir python=3.10 -y
conda activate unihirStep 2: Install the required packages.
pip install -r requirements.txtStep 1: Download the pretrained model from ModelScope or Hugging Face.
Step 2: Run inference:
CUDA_VISIBLE_DEVICES=<gpu_id> python infer.py \
--img_path examples/FS_12_159_2.jpg \
--ref_count 6 \
--save_path ./results \
--model_path ./UniHIRNote: We recommend using a GPU with 80GB VRAM (e.g., NVIDIA A100) for inference.
| Argument | Type | Default | Description |
|---|---|---|---|
--img_path |
str | examples/FS_12_159_2.jpg |
Path to input damaged historical document image |
--ref_count |
int | 6 |
Number of refinement iterations |
--save_path |
str | ./results |
Directory to save inference results |
--model_path |
str | ./UniHIR |
Path to the pretrained UniHIR model directory |
| Dataset | Description | Link | Status |
|---|---|---|---|
| HIRBench-DGL | Draft-Guided Localization | Download | 🚧 Coming soon |
| HIRBench-HSR | Hierarchical Self-Refinement | Download | 🚧 Coming soon |
| HIRBench-AR | Appearance Restoration | Download | 🚧 Coming soon |
Note:
- The HIRBench can only be used for non-commercial research purposes. Scholars or organizations who wish to use the HIRBench can apply through our online platform: 👉 Apply Here
- We will give you the decompression password after your application has been received and approved.
- All users must follow all use conditions; otherwise, the authorization will be revoked.
The code and dataset should be used and distributed under (CC BY-NC-ND 4.0) for non-commercial research purposes.
- This repository can only be used for non-commercial research purposes.
- For commercial use, please contact Prof. Lianwen Jin (eelwjin@scut.edu.cn).
- Copyright 2026, Deep Learning and Vision Computing Lab (DLVC-Lab), South China University of Technology.
If you find UniHIR helpful, please consider giving this repo a ⭐ and citing:
@article{zhang2026unihir,
title={Draft, Verify, Restore: Self-Refining Historical Inscription Restoration with a Unified MLLM},
author={Yuyi Zhang, Junle Liu, Peirong Zhang, Jianliang Liu, Zhenhua Yang, Lianwen Jin},
journal={Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics},
year={2026},
}Thanks for your support!



