cnn图像识别python代码_用于图像文字识别的cnn + lstm / gru + ctc(CRNN)

OCR-CRNN-CTC

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

example results

test results after training 300 steps:

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

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

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值