This is a PyTorch Re-Implementation of EAST: An Efficient and Accurate Scene Text Detector.
Model | Loss | Recall | Precision | F-score |
---|---|---|---|---|
Original | CE | 72.75 | 80.46 | 76.41 |
Re-Implement | Dice | 81.27 | 84.36 | 82.79 |
Only tested on
When running the script, if some module is not installed you will see a notification and installation instructions. if you failed to install lanms, please update gcc and binutils. The update under conda environment is:
conda install -c omgarcia gcc-6
conda install -c conda-forge binutils
The original lanms code has a bug in normalize_poly
that the ref vertices are not fixed when looping the p's ordering to calculate the minimum distance. We fixed this bug in LANMS so that anyone could compile the correct lanms. However, this repo still uses the original lanms.
git clone https://github.com/SakuraRiven/EAST.git
cd EAST
Download Train and Test Data: ICDAR 2015 Challenge 4. Cut the data into four parts: train_img, train_gt, test_img, test_gt.
Download pre-trained VGG16 from PyTorch: VGG16 and our trained EAST model: EAST. Make a new folder pths
and put the download pths into pths
mkdir pths
mv east_vgg16.pth vgg16_bn-6c64b313.pth pths/
Here is an example:
.
├── EAST
│ ├── evaluate
│ └── pths
└── ICDAR_2015
├── test_gt
├── test_img
├── train_gt
└── train_img
Modify the parameters in train.py
and run:
CUDA_VISIBLE_DEVICES=0,1 python train.py
Modify the parameters in detect.py
and run:
CUDA_VISIBLE_DEVICES=0 python detect.py
evaluate/gt.zip
if you test on other datasets.eval.py
and run:
CUDA_VISIBLE_DEVICES=0 python eval.py