LvTianlei 7bf88d0e25
Add TPS (#117)
* Add TPS

* Update tps_preprocessor.py

* Add licence, change variable name and format

* renamed some parameters and add tests of ocr preprocessor

* renamed params

* Update tps_preprocessor.py

* add config file and readme for TPS
2021-04-28 07:39:13 +00:00
..
2021-04-28 07:39:13 +00:00
2021-04-28 07:39:13 +00:00

Thin-Plate-Spline (TPS) transformation

Introduction

[ALGORITHM]

@article{shi2016robust,
  title={Robust Scene Text Recognition with Automatic Rectification},
  author={Shi, Baoguang and Wang, Xinggang and Lyu, Pengyuan and Yao,
  Cong and Bai, Xiang},
  year={2016}
}

About using TPS in other models

  • Simply change cfg.model.preprocessor from None to
dict(
  type='TPSPreprocessor',
  num_fiducial=20,
  img_size=(32, 100),
  rectified_img_size=(32, 100),
  num_img_channel=1
)