Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 1.46 KB

README.md

File metadata and controls

33 lines (26 loc) · 1.46 KB

Gaussian Constrained Attention Network for Scene Text Recognition

Introduction

Implementation of the paper "Gaussian Constrained Attention Network for Scene Text Recognition" (Under Review)

How to use

Install

pip3 install -r requirements.txt

Train

  • Data prepare
    LMDB format is suggested. refer here to generate data in LMDB format.

  • Run

     python3 train.py --checkpoints /path/to/save/checkpoints --train_data_dir /path/to/your/train/LMDB/data/dir --test_data_dir /path/to/your/validation/LMDB/data/dir -g "0" --train_batch_size 128 --val_batch_size 128 --aug True --att_loss_type "l1" --att_loss_weight 10.0
    

    More hyper-parameters please refer to config.py

Test

  • Download the pretrained model from BaiduYun (key:w14k)
  • Download the benchmark datasets from BaiduYun (key: nphk) shared by clovaai in this repo
python3 test.py --checkpoints /path/to/the/pretrained/model --test_data_dir /path/to/the/evaluation/benchmark/lmdb/dir -g "0"

Experiments on benchmarks

IIIT5K IC13 IC15 SVT SVTP CUTE
94.4 93.3 77.1 90.1 81.2 85.6