Giter VIP home page Giter VIP logo

crnn_ctpn_unified's Introduction

Crnn_Ctpn_Unified

Unified text detection and recognition

First of all, thanks for the author of crnn and ctpn algorithm with opening their codes. Here is crnn original codes, here is ctpn original codes and a tensorflow version can be found here

In my repository, ctpn was built by tensorflow, meanwile crnn was built by pytorch

Environment

Ubuntu16.04(it's more appropriate to build warp-ctc than other)

python3

tensorflow-gpu(version>=1.6)

pytorch(version>=0.3)

warp-ctc click here to download, follow the author to build warp-ctc

cuda 9.0 and cudnn 7.0

Just using pip to establish your dev environment, eg. pip install tensorflow-gpu==1.6, pip install torchvesion(it will install pytorch meanwhile)

Run it

I share my models of crnn and ctpn, you can run it just for take a look of its effect.

Images and results are stored in detect_data file.

cd end2endDec_Rec

python3 ./ctpn_crnn_combined/end2endDet_Rec.py

Results

following is detect images example

results were save in detect_data/txt_results

Training data creating

Here I just share the method that was used to train a crnn model. In my training, ultimately it reached an accuracy of 97.8%. Before training, you should generate a lmdb dataset. Click here for downloading a 3.6 million chinese characters training sets. Or just download the lmdb datasets that were generated by me.

Here are some examples about chinese characters training data.

if you want to create it by yourself, you can reference dataset_preprocess directory.

Train crnn models

cd train_crnn

python3 crnn_main.py --trainroot lmdb_data_set/xxx --valroot lmdb_data_set/xxx (--cuda)

Here are some software version pictures

crnn_ctpn_unified's People

Contributors

sierkinhane avatar hanesier avatar

Watchers

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.