Home

Awesome

Document_Image_Dewarping

The code for "Foreground and Text-lines Aware Document Image Rectification", ICCV, 2023.

Training Dataset

We use the Doc3D dataset for training. You can download the dataset on DewarpNet or doc3D-dataset.

Evaluation Dataset

We evaluate on two datasets DocUNet Benchmark and DIR300.

Inference

Please download the pre-trained model from Google Drive or Baidu Cloud. Then execute:

python predict.py --model_path /MODEL/PATH --img_path /BENCHMARK/DIR --save_path /SAVE/PATH

Evaluation

We follow the evaluation environment and code in DocUNet and DocGeoNet.

For CER and ED metrics evaluation:

Tesseract==5.0.1.20220118 (Windows)
pytesseract==0.3.8

The dewarped images can be downloaded from Google Drive or Baidu Cloud.

Acknowledgement

Our methods and codes are inspired by many existing works, to which we would like to express special thanks to:

DocUNet: Document Image Unwarping via A Stacked U-Net

DewarpNet: Single-Image Document Unwarping With Stacked 3D and 2D Regression Networks

DocTr: Document Image Transformer for Geometric Unwarping and Illumination Correction

Revisiting Document Image Dewarping by Grid Regularization

Geometric Representation Learning for Document Image Rectification

Citation

If our methods and code are helpful to you, please refer to the following BibTeX format for citation:

@inproceedings{li2023foreground,
  title={Foreground and Text-lines Aware Document Image Rectification},
  author={Li, Heng and Wu, Xiangping and Chen, Qingcai and Xiang, Qianjin},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
  pages={19574--19583},
  year={2023}
}