This is the official implementation of our paper DocRes: A Generalist Model Toward Unifying Document Image Restoration Tasks.
🔥 A comprehensive Recommendation for Document Image Processing is available.
./data/MBD/checkpoint/
./checkpoints/
./restorted/
. We have provided some distorted examples in ./input/
.
python inference.py --im_path ./input/for_dewarping.png --task dewarping --save_dtsprompt 1
--im_path
: the path of input document image--task
: task that need to be executed, it must be one of dewarping, deshadowing, appearance, deblurring, binarization, or end2end--save_dtsprompt
: whether to save the DTSPromptdata/MBD/checkpoint/
./checkpoints/
python eval.py --dataset realdae
--dataset
: dataset that need to be evaluated, it can be set as dir300, kligler, jung, osr, docunet_docaligner, realdae, tdd, and dibco18.train.py
based on your dataset path and experimental setting.bash start_train.sh
@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}}