Home

Awesome

🚀 Exciting update! We have created a demo for our paper on Hugging Face Spaces, showcasing the capabilities of our DocTr. Check it out here!

🔥 Good news! Our new work DocTr++: Deep Unrestricted Document Image Rectification comes out, capable of rectifying various distorted document images in the wild.

🔥 Good news! Our new work exhibits state-of-the-art performances on the DocUNet Benchmark dataset: DocScanner: Robust Document Image Rectification with Progressive Learning with Repo.

🔥 Good news! A comprehensive list of Awesome Document Image Rectification methods is available.

DocGeoNet

<p> <a href='https://arxiv.org/pdf/2210.08161.pdf' target="_blank"><img src='https://img.shields.io/badge/Paper-Arxiv-red'></a> <a href='https://huggingface.co/spaces/HaoFeng2019/DocGeoNet' target="_blank"><img src='https://img.shields.io/badge/Online-Demo-green'></a> </p>

Geometric Representation Learning for Document Image Rectification
ECCV 2022

Any questions or discussions are welcomed!

🚀 Demo (Link)

  1. Upload the distorted document image to be rectified in the left box.
  2. Click the "Submit" button.
  3. The rectified image will be displayed in the right box.
  4. Our demo environment is based on a CPU infrastructure, and due to image transmission over the network, some display latency may be experienced.

image

Training

Inference

  1. Download the pretrained models from Google Drive, and put them to $ROOT/model_pretrained/.
  2. Unwarp the distorted images in $ROOT/distorted/ and output the rectified images in $ROOT/rec/:
    python inference.py
    

DIR300 Test Set

  1. We release the DIR300 test set for evaluation the rectification algorithms.

Evaluation

Benchmark DatasetMethodMS-SSIMLDED (Setting 1)CERED (Setting 2)CER
DocUNetDocGeoNet0.50407.71379.000.1509713.940.1821
Benchmark DatasetMethodMS-SSIMLDEDCER
DIR300DocGeoNet0.63806.40664.960.2189

Citation

If you find this code useful for your research, please use the following BibTeX entry.

@inproceedings{feng2022docgeonet,
  title={Geometric Representation Learning for Document Image Rectification},
  author={Feng, Hao and Zhou, Wengang and Deng, Jiajun and Wang, Yuechen and Li, Houqiang},
  booktitle={Proceedings of the European Conference on Computer Vision},
  year={2022}
}
@inproceedings{feng2021doctr,
  title={DocTr: Document Image Transformer for Geometric Unwarping and Illumination Correction},
  author={Feng, Hao and Wang, Yuechen and Zhou, Wengang and Deng, Jiajun and Li, Houqiang},
  booktitle={Proceedings of the 29th ACM International Conference on Multimedia},
  pages={273--281},
  year={2021}
}
@article{feng2021docscanner,
  title={DocScanner: Robust Document Image Rectification with Progressive Learning},
  author={Feng, Hao and Zhou, Wengang and Deng, Jiajun and Tian, Qi and Li, Houqiang},
  journal={arXiv preprint arXiv:2110.14968},
  year={2021}
}

Acknowledgement

The codes are largely based on DocUNet and DewarpNet. Thanks for their wonderful works.

Contact

For commercial usage, please contact the email (haof@mail.ustc.edu.cn).