Giter Club home page Giter Club logo

crnn-keras's Introduction

CRNN (CNN+RNN)

OCR(Optical Character Recognition) consists of text localization + text recognition. (text localization finds where the characters are, and text recognition reads the letters.)

You can use this text localizaion model I have studied.

After performing localization, each text area is cropped and used as input for text recognition. An example of text recognition is typically the CRNN

Combining the text detector with a CRNN makes it possible to create an OCR engine that operates end-to-end.

CRNN

CRNN is a network that combines CNN and RNN to process images containing sequence information such as letters.

It is mainly used for OCR technology and has the following advantages.

  1. End-to-end learning is possible.
  2. Sequence data of arbitrary length can be processed because of LSTM which is free in size of input and output sequence.
  3. There is no need for a detector or cropping technique to find each character one by one.

You can use CRNN for OCR, license plate recognition, text recognition, and so on. It depends on what data you are training.

I used a slightly modified version of the original CRNN model. (Input size : 70x30 -> 128x64 & more CNN Layer)

Network

CRNN Network

Convolutional Layer

Extracts features through CNN Layer (VGGNet, ResNet ...).

Recurrent Layer

Splits the features into a certain size and inserts them into the input of the Bidirectional LSTM or GRU.

Transcription Layer

Conversion of Feature-specific predictions to Label using CTC (Connectionist Temporal Classification).


catpcha recognition using CRNN

I used CRNN to recognize catpcha.

catpcha example catpcha example

I updated the captcha generator for those who lacked captcha pictures.

Result

Result

CRNN works well for license plate recognition as follows.

How to Training

First, you need a lot of cropped captcha images.
(The captcha 1234 is indicated as "1234.jpg").

After creating training data in this way, put it in 'DB/train' directory and run training.py.

File Description

os : Ubuntu 16.04.4 LTS

GPU : Telas V100 (16GB)

Python : 3.6.5

Tensorflow : 1.9.0

Keras : 2.1.3

CUDA, CUDNN : 9.0, 7.0

File Description
Model .py Network using CNN (VGG) + Bidirectional LSTM
Model_GRU. py Network using CNN (VGG) + Bidirectional GRU
Image_Generator. py Image batch generator for training
parameter. py Parameters used in CRNN
training. py CRNN training
Prediction. py CRNN prediction

crnn-keras's People

Contributors

1158677160 avatar linyeli60 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

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