/DocTr

The official code for “DocTr: Document Image Transformer for Geometric Unwarping and Illumination Correction”, ACM MM, Oral Paper, 2021.

Primary LanguagePythonMIT LicenseMIT

Good news! Our new work exhibits state-of-the-art performances on DocUNet benchmark dataset: DocScanner

DocTr

image

DocTr: Document Image Transformer for Geometric Unwarping and Illumination Correction
ACM MM 2021 Oral

Any questions or discussions are welcomed!

Training

  • For geometric unwarping, we train the GeoTr network using the Doc3d dataset.
  • For illumination correction, we train the IllTr network based on the DRIC dataset.

Inference

  1. Download the pretrained models here and put them to $ROOT/model_pretrained/.
  2. Geometric unwarping:
    python inference.py
    
  3. Geometric unwarping and illumination rectification:
    python inference.py --ill_rec True
    

Evaluation

  • We use the same evaluation code as DocUNet benchmark dataset based on Matlab 2019a.
  • Please compare the scores according to your Matlab version.

Citation

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

@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}
}