Giter Club home page Giter Club logo

scenetext_detection's Introduction

text-detection-ctpn

text detection mainly based on ctpn (connectionist text proposal network). It is implemented in tensorflow. I use it to detect id card includes Chinese and European,I also use it to dectect printed transfer orders, but it should be noticing that this model can be used in almost every horizontal scene text detection task. The origin paper can be found here. Also, the origin repo in caffe can be found in here. For more detail about the paper and code, see this blog


setup

  • requirements: tensorflow1.3, opencv-python
  • if you have a gpu device, build the library by
cd lib/utils
chmod +x make.sh
./make.sh

demo

  • put your images in data/demo, the results will be saved in data/results, and run demo in the root
python ./ctpn/demo.py

training

prepare data

  • First, download the pre-trained model of VGG net and put it in data/pretrain/VGG_imagenet.npy.
  • Second, prepare the training data as referred in paper, or you can download the data I prepared from previous link.You can use my label tool to label datas.P.S:This tool can label different types object at the same time.I add 2k id cards and printed transfer orders in the train data.Especialy,for printed transfer records,I use my Java programmer to generate standard form orders at high speed.
cd prepare_training_data
python bbox_label_tool.py
  • Modify the path and gt_path in prepare_training_data/split_label.py according to your dataset. And run
python split_label.py
  • it will generate the prepared data in current folder, and then run
python ToVoc.py
  • 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

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

here are some results

scenetext_detection's People

Contributors

pancakeawesome avatar

Watchers

rough avatar James Cloos 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.