Home

Awesome

<div align=center>

DocRes: A Generalist Model Toward Unifying Document Image Restoration Tasks

Open in Spaces

</div> <p align="center"> <img src="images/motivation.jpg" width="400"> </p>

This is the official implementation of our paper DocRes: A Generalist Model Toward Unifying Document Image Restoration Tasks.

News

🔥 A comprehensive Recommendation for Document Image Processing is available.

Inference

  1. Put MBD model weights mbd.pkl to ./data/MBD/checkpoint/
  2. Put DocRes model weights docres.pkl to ./checkpoints/
  3. Run the following script and the results will be saved in ./restorted/. We have provided some distorted examples in ./input/.
python inference.py --im_path ./input/for_dewarping.png --task dewarping --save_dtsprompt 1

Evaluation

  1. Dataset preparation, see dataset instruction
  2. Put MBD model weights mbd.pkl to data/MBD/checkpoint/
  3. Put DocRes model weights docres.pkl to ./checkpoints/
  4. Run the following script
python eval.py --dataset realdae

Training

  1. Dataset preparation, see dataset instruction
  2. Specify the datasets_setting within train.py based on your dataset path and experimental setting.
  3. Run the following script
bash start_train.sh

Citation:

@inproceedings{zhangdocres2024, 
Author = {Jiaxin Zhang, Dezhi Peng, Chongyu Liu , Peirong Zhang and Lianwen Jin}, 
Booktitle = {In Proceedings of the IEEE/CV Conference on Computer Vision and Pattern Recognition}, 
Title = {DocRes: A Generalist Model Toward Unifying Document Image Restoration Tasks}, 
Year = {2024}}   

⭐ Star Rising

Star Rising