by songdejia

songdejia / EAST

This is a pytorch re-implementation of EAST: An Efficient and Accurate Scene Text Detector.

460 Stars 128 Forks Last release: Not found MIT License 63 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

EAST: An Efficient and Accurate Scene Text Detector


This version will be updated soon, please pay attention to this work. The motivation of this version is to build a easy-training model. This version can automatically update best_model by comparing current hmean and the former. At the same time, we can see evaluation info about every sample easily.

  • 1.train
  • 2.predict
  • 3.compress
  • 4.compute Hmean(if Hmean is higher than before, update best_weight.pkl)
  • 5.visualization(blue, green, red)
  • 6.multi-scale test (update soon) multi-scale vis. (vis with score, scales)


The version is ported from argman/EAST, from Tensorflow to Pytorch

Check On Website

If you have no confidence of the result of our program, you could use submit.zip to submit on website,then you can see result of every image.


  • right -- green || wrong -- red || miss -- blue visualization visualization

  • recall/precision/hmean for every test image hmean


This is a pytorch re-implementation of EAST: An Efficient and Accurate Scene Text Detector. The features are summarized blow:

  • Only RBOX part is implemented.
  • A fast Locality-Aware NMS in C++ provided by the paper's author.(g++/gcc version 6.0 + will be ok)
  • Evalution see here for the detailed results.
  • Differences from original paper
    • Use ResNet-50 rather than PVANET
    • Use dice loss (optimize IoU of segmentation) rather than balanced cross entropy
    • Use linear learning rate decay rather than staged learning rate decay

Thanks for the author's (@zxytim) help! Please cite his paper if you find this useful.


  1. Installation
  2. Download
  3. Prepare dataset/pretrain
  4. Test
  5. Train
  6. Examples


  1. Any version of pytorch version > 0.4.0 should be ok.


  1. Pretrained model is not provided temporarily. Web site is updating now, please continue to pay attention

Prepare dataset/pretrain weight

[1]. dataset(you need to prepare for dataset for train and test) suggestions: you could do a soft-link to roottothisprogram/dataset/train/img/*.jpg + -- train ./dataset/train/img/img###.jpg ./dataset/train/gt/img###.txt (you need to change name) + -- test ./data/test/img###.jpg (img only) + -- gt.zip ./result/gt.zip(ICDAR15 gt.zip is avaliable on website

** Note: you can download dataset here + -- ICDAR15 + -- ICDAR13

[2]. pretrained
+ In config.py set resume True and set checkpoint path/to/weight/file + I will provide pretrianed weight soon

[3]. check GPUs and CPUs you can use following to check aviliable gpu, this is for train

watch -n 0.1 nvidia-smi
then, you will see 2,3 is avaliable, modify config.py gpuids = [0,1], gpu = 2, and modify run.sh - CUDAVISIBLE_DEVICES=2,3


If you want to train the model, you should provide the dataset path in config.py and run

sh run.py

** Note: you should modify run.sh to specify your gpu id

If you have more than one gpu, you can pass gpu ids to gpulist(like gpulist=0,1,2,3) in config.py

** Note: you should change the gt text file of icdar2015's filename to img*.txt instead of gtimg*.txt(or you can change the code in icdar.py), and some extra characters should be removed from the file. See the examples in trainingsamples/**


By default, we set train-eval process into integer. If you want to use eval independently, you can do it by yourself. Any question can contact me.


Here are some test examples on icdar2015, enjoy the beautiful text boxes! image_1 image_2 image_3 image_4 image_5

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.