Git Product home page Git Product logo

tps_pp's Introduction

TPS++: Attention-Enhanced Thin-Plate Spline for Scene Text Recognition

1682662695807

The official code of TPS_PP (IJCAI 2023) Paper Link

TPS++, an attention-enhanced TPS transformation that incorporates the attention mechanism to text rectification for the first time. TPS++ builds a more flexible content-aware rectifier, generating a natural text correction that is easier to read by the subsequent recognizer. This code is based on MMOCR 0.4.0 ( Documentation ) with PyTorch 1.6+.

Code List

  • NRTR + TPS_PP
  • CRNN + TPS_PP
  • ABINet-LV + TPS_PP

Installation

Please refer to Install Guide.

Get Started

Please see Getting Started for the basic usage of MMOCR 0.4.0.

Datasets

The specific configuration of the dataset for training and testing can be found here Dataset Document

testing 
├── mixture
│   ├── icdar_2013
│   ├── icdar_2015
│   ├── III5K
│   ├── ct80
│   ├── svt
│   ├── svtp

training
├── mixture
│   ├── Syn90k
│   ├── SynthText

Pretrained Models

Get the pretrained models from BaiduNetdisk(passwd:cd9r), GoogleDrive. checkpoint model in model/xxx/latest.pth, pre-train model in pre_train/xxx/latest.pth

Methods IIIT5K SVT IC13 IC15 SVTP CUTE AVG
NRTR + TPS_PP 96.3 94.6 96.6 85.7 89.0 92.4 92.4
NRTR + TPS_PP * 95.6 95.1 97.2 85.9 89.8 90.3 92.3

First, the model needs to be pre-trained using without TPS_PP (pre-train), and then trained end-to-end with a network that incorporates TPS_PP (checkpoint). * denotes the performance of the implemented code. checkpoint model in model/xxx/latest.pth, pre-train model in pre_train/xxx/latest.pth.

Train

Please refer to the training configuration Training Doc

NRTR+TPS++

Setp 1 : Download NRTR pre_train/nrtr/latest.pth in mmocr_ijcai/nrtr/latest.pth

#Step 2
PORT=1234 ./tools/dist_train.sh configs/textrecog/nrtr/nrtr_tps++.py ./ckpt/ijcai_nrtr_tps_pp 4 
          --seed=123456 --load-from=mmocr_ijcai/nrtr/nrtr_latest.pth

Testing

Please refer to the testing configuration Testing Doc

Acknowledgement

This code is based on MMOCR

Citation

If you find our method useful for your reserach, please cite

@article{zheng2023tps++,
  title={TPS++: Attention-Enhanced Thin-Plate Spline for Scene Text Recognition},
  author={Zheng, Tianlun and Chen, Zhineng and Bai, Jinfeng and Xie, Hongtao and Jiang, Yu-Gang},
  journal={IJCAI},
  year={2023}
}

License

This project is released under the Apache 2.0 license.

tps_pp's People

Contributors

simplify23 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

hilight123

tps_pp's Issues

缺少文件

mmocr.models.common.layers文件夹下transformer_layers.py中有一行
from mmcv.runner import BaseModule
但是TPS_PP项目里却没有mmcv这个文件夹,希望作者能够补上,感激不尽

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.