[go: nahoru, domu]

Skip to content
/ DocRes Public
forked from ZZZHANG-jx/DocRes

[CVPR 2024] DocRes: A Generalist Model Toward Unifying Document Image Restoration Tasks

License

Notifications You must be signed in to change notification settings

AiLoveX/DocRes

 
 

Repository files navigation

Preface

Link to article DocRes: A Generalist Model Toward Unifying Document Image Restoration Tasks.

Link to original repository DocRes

Instructions

  1. Clone repository
  git clone https://github.com/AiLoveX/DocRes.git
  1. Put MBD model weights mbd.pkl to ./data/MBD/checkpoint/ !You will need to create folders!
  2. Put DocRes model weights docres.pkl to ./checkpoints/ !You will need to create folders!
  3. Launch Docker Desktop
  4. Run create_docker.bat and wait about 5-15 min
  5. Run run_docker.bat for default parameters
  6. Check the result in "docker_output" folder

For your images

If you want to use your own images

  1. Follow the first 5 steps of the Instructions
  2. Place your images in ./input/
  3. Run create_docker.bat and wait about 5-15 min
  4. At the command line, forward to your folder and enter
run_docker.bat ./input/your_image task false
  • first argument: the path of input document image
  • second argument:task that need to be executed, it must be one of dewarping, deshadowing, appearance, deblurring, binarization, or end2end
  • third argument: it is a choice whether to use pixel-by-pixel image comparison or not. The default is set to true, with the test for default parameters. If you don't need it, enter false.

If you want to compare your image with the received one, then enter

run_docker.bat ./input/your_image task true ./folder/your_image1 ./folder/your_image2
  • fourth argument: path to the first image we want to compare pixel by pixel
  • fifth argument: path to the second image we want to compare

In Docker, all output goes to the ./restorted/ folder. If you want to compare a picture with a picture that is displayed in it, then their names are usually formed as your_image_task and the format of the input image.

About

[CVPR 2024] DocRes: A Generalist Model Toward Unifying Document Image Restoration Tasks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.7%
  • Other 0.3%