Giter Club home page Giter Club logo

decoupled-attention-network's Introduction

Decoupled attention network for text recognition

This is a pytorch-based implementation for paper Decoupled attention network for text recognition (AAAI-2020).

Requirements

We recommend you to use Anaconda to manage your libraries.

Or use pip to install the libraries. (Maybe the torch is different from the anaconda version. Please check carefully and fix the warnings in training stage if necessary.)

    pip install -r requirements.txt

Besides, a data augmentation toolkit is used for handwritten text recognition.

Updates

Dec 30, 2019

Trained models:

Google Drive

Baidu Netdisk password: sds8

The handwritten models are well trained (IAM-CER 6.4, IAM-WER 19.6). The scene models are single-directional and nearly well trained (IIIT5K 93.3).

Data Preparation

Offline handwritten text

Here we provide the codes for IAM dataset. For RIMES, please prepare it by yourself.

IAM database can be downloaded from here.

For convenience, we provide the processed annotations (in data/IAM/) and the dataloader (dataset_hw.py). You only need to download data/lines and data/words then put the unzipped files into the folder data/IAM/.

Note that all data is loaded into memory at once. Make sure there is enough memory (about 5 GB).

Scene text

Please convert your own dataset to LMDB format by using the tool (run in Python 2.7) provided by @Baoguang Shi.

You can also download the training (NIPS 2014, CVPR 2016) and testing datasets prepared by us.

The raw pictures of testing datasets can be found here.

Training and Testing

Modify the path in configuration files (cfgs_scene.py for scene, cfgs_hw.py for handwritten). Make sure the import is correct in line 12, main.py. Then:

	python main.py

Citation

@InProceedings{DAN_aaai20,
  author = {Tianwei Wang and Yuanzhi Zhu and Lianwen Jin and Canjie Luo and Xiaoxue Chen and Yaqiang Wu and Qianying Wang and Mingxiang Cai}, 
  title = {Decoupled attention network for text recognition}, 
  booktitle ={AAAI Conference on Artificial Intelligence}, 
  year = {2020}
}

Attention

The project is only free for academic research purposes.

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.