- Ubuntu 16.04
- Cuda 10
- python >=3.5
- pytorch 1.0
- Other packages like cv2, Polygon3, tensorboardX, Scipy.
- Training and evaluation checked: Testing in MPSC test set with training data in {SynthMPSC, MPSC}. Other scene text datasets are test with pre-training data in SynthText.
- Dataset link:
- MPSC&SynthMPSC (Ours) dataset will be released here soon.
- Synthtext
- MSRA-TD500
- ICDAR2013
- ICDAR2017-MLT
- USTB-SV1K
Check INSTALL.md for installation instructions.
- Update datset root path in
$RFN_ROOT/train.py
. - Process dataset can be set in
$RFN_ROOT/tools/datagen.py
. - Modify test path in
$RFN_ROOT/multi_image_test_ocr.py
. - Modify some settings in
$RFN_ROOT/tools/encoder.py
, including anchor_areas, aspect_ratios.
# refer to /data_process/Compute aspect_ratios and area_ratios.py
self.anchor_areas = [16*16., 32*32., 64*64., 128*128., 256*256, 512*512.]
self.aspect_ratios = [1., 2., 3., 5., 1./2., 1./3., 1./5.,7.]
# create your data cache directory
cd RFN_ROOT
# Download pretrained ResNet50 model(https://data.lip6.fr/cadene/pretrainedmodels/se_resnet50-ce0d4300.pth)
# Init RFN with pretrained ResNet50 model
python ./tools/get_state_dict.py
python train.py --config_file=./configs/R_50_C4_1x_train.yaml
- The training size is set to a multiple of 128.
- Multi-GPU phase is not testing yet, be careful to use GPU more than 1.
- Our provide script:
$RFN_ROOT/multi_image_test_ocr.py
and$RFN_ROOT/test/
- Modify path settings and choose the dataset you want to evaluate on.
- option parameters: save_img, show_mask
### test each image
python test.py --dataset=MPSC --config_file=./configs/R_50_C4_1x_train.yaml --test --save_img
### eval result
python test.py --dataset=MPSC --eval
- Here we provide some pretained weights for testing in baidu drive:
Pretrain SynthMPSC : https://pan.baidu.com/s/1BI2T4ncowKu908dcd9tT7g (0ke0)
Pretrain SynthText : https://pan.baidu.com/s/16q7jB2vLvW49fcs9nfXxRA (waki)
- Model | Dataset | Precision | Recall | F-Measure | MODEL link | Extraction code
- RFN | MPSC | 89.30 | 83.33 | 86.21 | model | 6u6y
- RFN* | MPSC | 89.82 | 84.45 | 87.05 | model | xrni
train_log_url : https://pan.baidu.com/s/1364azjk0hdy8Aeekk_tRQg
Extraction code : bd9z
- Model | Dataset | Precision | Recall | F-Measure
- MASKRCNN | MPSC | 85.28 | 79.25 | 82.15
- DB | MPSC | 87.77 | 78.73 | 83.00
- PAN | MPSC | 87.07 | 81.60 | 84.24
- PSENET | MPSC | 85.42 | 78.40 | 81.76
- ContourNet | MPSC | 87.79 | 81.02 | 84.27
- RRPN++ | MPSC | 86.73 | 83.90 | 85.30
- FCENET | MPSC | 87.13 | 81.63 | 84.29
@article{guan2021industrial,
title={Industrial Scene Text Detection with Refined Feature-attentive Network},
author={Guan, Tongkun and Gu, Chaochen and Lu, Changsheng and Tu, Jingzheng and Feng, Qi and Wu, Kaijie and Guan, Xinping},
journal={arXiv preprint arXiv:2110.12663},
year={2021}
}