天天看点

场景文本检测,CTPN tensorflow版本text-detection-ctpnpreparetraindemosome results

text-detection-ctpn

Github地址

这是我开源在github上的一个场景文本检测的模型,主要基于CTPN,可以用来检测水平的文本,如身份证之类的。详见github

text detection mainly based on ctpn (connectionist text proposal network). It is implemented in tensorflow. I use id card detect as an example. the origin paper can be found here. Also, the origin repo can be found in here. This repo is mainly based on faster rcnn framework, so there remains tons of useless code. I’m still working on it.

prepare

First, download the pre-trained model of VGG net and put it in data/pretrain/VGG_imagenet.npy. you can download it from google drive.

Second, prepare the training data as referred in paper, or you can download the data I prepared in here. Modify the path and gt_path in prepare_training_data/split_label.py according to your dataset. And run

cd prepare_training_data
python split_label.py
           

it will generate the prepared data in current folder, and then run

to convert the prepared training data into voc format. It will generate a folder named TEXTVOC. move this folder to data/ and then run

cd ../data
ln -s TEXTVOC VOCdevkit2007
           

train

Simplely run

you can modify some hyper parameters in ctpn/text.yml, or just used the parameters I set.

demo

put your images in data/demo, the results will be saved in data/results, and run

some results

NOTICE:

all the photos used below are collected from the internet. If it affects you, please contact me to delete them.

场景文本检测,CTPN tensorflow版本text-detection-ctpnpreparetraindemosome results
场景文本检测,CTPN tensorflow版本text-detection-ctpnpreparetraindemosome results
场景文本检测,CTPN tensorflow版本text-detection-ctpnpreparetraindemosome results
场景文本检测,CTPN tensorflow版本text-detection-ctpnpreparetraindemosome results

继续阅读