Coder Social home page Coder Social logo

crnn.mxnet's Introduction

crnn.mxnet

crnn in mxnet.can train with chinese characters

This project is the base module of the universal credentials' OCR with extra third party module. I'll add ANDROID SUPPORT in soon.

ANDROID HAD BEEN SUPPORTED YET

REQUIREMENTS:

  • MxNET:0.11.0 or above,lower would occur some errors.
  • PIL:To generate the scene text for train
  • Fonts:I collected some FREE Chinese fonts,you can download and uncompress fonts.7z into ./generate_data/fonts/
  • Backgrounds:you can collect by yourself.

HOW TO TRAIN

I got some taobao captchas recently,there is the train script to train taobao captcha.

unzip captcha.zip ./
# if you don't have NVIDIA-GPU in this machine,please remove the '--gpu' parameter
# parameter interpretation:
# name: the generated mode name,just the name.
# charset: the characters in all dataset.
# train_lst: the data URI and the label of data
# batch_size: the number of data to compute the loss every time
# seq_len: BiLSTM length(Advanced),relate with image width
# num_label: the maximum length of label
# imgH: image will resize to this height
# imgW: image will resize to this width
# learning_rate: lower for accurate,higher for speed.
python train.py --name taobao_captcha --charset digit.txt --train_lst taobao_captcha.csv --batch_size 32 --seq_len 12 --num_label 6 --imgH 30 --imgW 100 --gpu --learning_rate 0.001

HOW TO RUN

python predictor.py

I just implement CRNN with mxnet and there are some difference. If you can't run this project fluently,please refer me in ISSUES,i'll check it out as soon as i can.

The interface to use this model via mxnet of cpp is uploaded.And i'll update the handbook in some days.

DOCKER

There are some guys need a portable environment,so i create a docker file. you can predict via docker,only cpu version.If you need to train with gpu via docker,you'd need to modify the config.mk. rebuild docker image by yourself,and use it via nvidia-docker.

# build
# docker build . -t novioleo/crnn-mxnet:0.11.0 
docker run -it -rm -v /path/to/your/project:/run novioleo/crnn-mxnet:0.11.0 python

Note

微信求打赏 微信求打赏。 IF YOU WANT A COMFORTABLE COMMUNICATION IN CHINESE,YOU CAN JOIN THE QQ GROUP:129075101

crnn.mxnet's People

Contributors

novioleo 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.