BeyondYourself / OCR-CRNN-CTC

ocr, cnn+lstm+ctc, crnn, recognition model, tensorflow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OCR-CRNN-CTC

cnn + lstm/gru + ctc (CRNN) for image text recognition

example results

test results after training 300 steps:

recog_test_results

decription

To run this repo:

1, python data_detect_generator.py 0       # to generate validation images for detection

2, python data_detect_generator.py 1       # to generate training images for detection

3, python data_rects_extractor.py 0       # to generate validation data-rects for recognition

4, python data_rects_extractor.py 1       # to generate training data-rects for recognition

5, python script_recog.py       # to train and validate


By 1 and 2, images with texts will be generated with images in images_base as background. The images will be saved in the newly-maked folders: ./data_train and ./data_valid.

By 3 and 4, text-rects will be extracted from images generated by 1 and 2. The rect images and texts will be saved in the newly-maked folders: ./data_rects_train and ./data_rects_valid.

By 5, the model will be trained and validated. The ckpt files will be stored in the newly-maked directory, ./model_recog.

reference

The model is mainly based on the method described in the article:

An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition

Baoguang Shi, Xiang Bai, Cong Yao

https://arxiv.org/abs/1507.05717


We thank Jerod Weinman for making his code available: https://github.com/weinman/cnn_lstm_ctc_ocr

About

ocr, cnn+lstm+ctc, crnn, recognition model, tensorflow

License:GNU General Public License v3.0


Languages

Language:Python 100.0%