TensorFlow implementation of PSENet text detector (Shape Robust Text Detection with Progressive Scale Expansion Networkt)
A reimplement of PSENet with tensorflow. Only trained on IC15,TD500,and CTW1500. The preformence is low compared to paper's result. Maybe because of partial data training (For each dataset I don't use extra data, but the paper use MLT data), or just maybe because of some bug in this code.
./PSE_C
Thanks for the author's (@whai362) great work!
pip install -r requriment.txt
Dataset | precision | recall | F-measure (%) |
---|---|---|---|
ICDAR15 | 84.5 | 77.3 | 80.7 |
TD500 | - | - | 80.2(?) |
CTW1500 | - | - | 76(?) |
-
this model had been removed in my server, so I forget exact f-measure, just for reference
dataset_factory.py
.
cd dataset
python write_tfrecord.py --data-folder 'your path here'
ImageNet
Pretrained model, download the model to Logs/model
from model
configuration.py
to adjust the patameter of trianing such as bactch size,learning rate.
mkdir Logs/train
python train_PSENet.py --run_name test --restore=True --use_pretrain=True --gpus '0' --ss=10 --se=10 --about=''
tensorboard --host localhost --samples_per_plugin images=500 --port 7000 --logdir Logs/train/test
python setup.py build_ext --inplace
configuration.py
such as threshold, image size, test_dir is the path of your test images.(such as /you/path/icdar2015/ch4_test_images
)
python eval_metric.py --ma=True --train_name test --gpus='2' --lg=False
lg
is True
, you can view detect result in folder Logs/test/<run_name>/model.ckpt-399999_0/image_log