Giter Site home page Giter Site logo

rfn's Introduction

Text Detection for Industrial Scene with Refined Feature-attentive Network

Environments

  • Ubuntu 16.04
  • Cuda 10
  • python >=3.5
  • pytorch 1.0
  • Other packages like cv2, Polygon3, tensorboardX, Scipy.

Highlights

  • 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:

Installation

Check INSTALL.md for installation instructions.

Configuring your dataset

  • 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.]

Training

# 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.

Test and eval

  • 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

Pretrained Weights for Training and Testing

  • 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)

More Results

  • 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

Training logs and results for comparative experimental

  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

Visualizations of MPSC dataset

examples1

Visualizations of MSRA-TD500, USTB-SV1K, ICDAR2013, ICDAR2017-MLT dataset

examples2

Citation

@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}
}

rfn's People

Contributors

tongkunguan avatar

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.