• Stars
    star
    147
  • Rank 249,858 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created over 3 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Document Dewarping with Control Points

Document-Dewarping-with-Control-Points

A simple yet effective approach to rectify distorted document image by estimating control points and reference points.

The control points and reference points are composed of the same number of vertices and describe the shape of the document in the image before and after rectifying, respectively. The control points are controllable to facilitate interaction or subsequent adjustment. You can flexibly select post-processing methods and the number of vertices according to different application scenarios.

See โ€œDocument Dewarping with Control Pointsโ€ for more information.

Quick Start

  • Test python test.py --data_path_test=./your/test/data/path/

  • Train python train.py --data_path_train=./your/train/data/path/ --data_path_validate=./your/validate/data/path/ --data_path_test=./your/test/data/path/ --batch_size 32 --schema train --parallel 01

Requirements

python >=3.7

pytorch

opencv-python

scipy

Visualization

image

Dataset

The training dataset can be synthesised using the scripts.