Skip to content

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

License

Notifications You must be signed in to change notification settings

roughsoft/OCR-CRNN-CTC

 
 

Repository files navigation

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 make his code available: https://github.com/weinman/cnn_lstm_ctc_ocr

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%