Giter Club home page Giter Club logo

cnn_lstm_ctc_ocr_for_icpr's Introduction

Forked from weinman/cnn_lstm_ctc_ocr for the ICPR MTWI 2018 challenge 1

Introduction

This is a repository forked from weinman/cnn_lstm_ctc_ocr for the ICPR MTWI 2018 challenge1.
Origin Repository: weinman/cnn_lstm_ctc_ocr - A tensorflow implementation of end to end text recognition
Origin Author: weinman

Author: Feng zhang
Email: [email protected]

Contents

  1. Transform
  2. Models
  3. Demo
  4. Train
  5. Test
  6. Results

Transform

You should cut the data by yourself.Use the target_cut.py, you only need to change the data path to your own origin data.I use the dataset like ICPR MTWI 2018. Note,I use Affine changes the change the Oblique picture to rectangle.So I need the clockwise direction of target label. Use the getTxt.py to change the label's direction.

Next, use mjsynth-tfrecord.py to change your data into tfrecord.You can Find the way in [weinman/cnn_lstm_ctc_ocr/Makefile] You only need to change some paths.

Models

I use the new word_dictionary which consists of English, Chinese and number.I only upload a old pretrain model,it works badly. If you train it for one day with your data,it will work well.And,I add some data augmentation for the model. You also can change the model to denseNet,it will work better.Do as follows in the train.py :

Import denseNet 
%features,sequence_length = model.convnet_layers( image, width, mode)
features,sequence_length = zf_mod_denseNet2.Dense_net( image, width, mode)

I only share the origin Model which is trained on ICPR MTWI 2018 (train): [model_download].The password is 2h1z. Some English data can find in [weinman]

Demo

Download models and copy it to data/model. Then,Run:

python validate.py  your picture's path
eg.python validate.py E:/1.jpg

Train

I already upload MTWI 2018 data£¬You can download and copy to data/model/.After that ,train the model for a day,you can get your own model.[ICPR MTWI 2018 data+extra Eng-data+Eng-data].The password is diyj. When we make your data to tfrecord,You can train. I suggest you had better use your own data.

cd src
python train.py

Test

use also can test the tfrecord's accuracy.[usage] put your data in src/data/val and do as follows:

cd src;
python test.py

Results

Here are some results on ICPR MTWI 2018:
image

Enjoy yourself

cnn_lstm_ctc_ocr_for_icpr's People

Contributors

zfxxfeng avatar

Watchers

 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.