1 Star 0 Fork 1

kento-yang / CRNN-Keras

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

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 : 100x30 -> 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).


license plate recognition using CRNN

I used CRNN to recognize license plates in Korea.

Type of license plate

I learned the following kinds of Korean license plates.

I updated the Korean License Plate Synthetic image generator for those who lacked license plate pictures.

Result

Result

CRNN works well for license plate recognition as follows.

How to Training

First, you need a lot of cropped license plate images.
And in my case I expressed the number of the license plate with the image file name.
(The license plate number 1234 is indicated as "1234.jpg").
(You can also define labeling with txt or csv files if you want. [(ex)0001.jpg "1234" \n 0002.jpg "0000" ...)

Since I used Korean license plates, I expressed the Korean language on the license plate in English.

Example
(example) A18sk6897
A : 서울
sk : 나

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 : GeForce GTX 1080 (8GB)

Python : 3.5.2

Tensorflow : 1.5.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
MIT License Copyright (c) 2019 BeomBeomyoung Kim Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

CRNN (CNN+RNN) for OCR using Keras / License Plate Recognition 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/kento-yang/CRNN-Keras.git
git@gitee.com:kento-yang/CRNN-Keras.git
kento-yang
CRNN-Keras
CRNN-Keras
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891