Giter VIP home page Giter VIP logo

docres's Introduction

DocRes: A Generalist Model Toward Unifying Document Image Restoration Tasks

Open in Spaces

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
  • --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 DTSPrompt

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
  • --dataset: dataset that need to be evaluated, it can be set as dir300, kligler, jung, osr, docunet_docaligner, realdae, tdd, and dibco18.

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

docres's People

Contributors

zzzhang-jx avatar qubvel avatar

Watchers

ferry avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.