Implementation of the paper "Gaussian Constrained Attention Network for Scene Text Recognition" (Under Review)
pip3 install -r requirements.txt
-
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
- 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"
IIIT5K | IC13 | IC15 | SVT | SVTP | CUTE |
---|---|---|---|---|---|
94.4 | 93.3 | 77.1 | 90.1 | 81.2 | 85.6 |