Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chinese #8

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# CRNN_Attention_OCR
CRNN with attention to do OCR,this is just a toy code to show how use seq2seq with attention in OCR
## network model
CRNN is base CNN,and BiLSTM with 256 hidden_units is encode network ,GRU with 256 hidden_units is decode network

## how to use
put your image in 'train' dir,and image name should be like "xx_label_xx.jpg",Parameters are set in config.py,<br>and then just run the train.py

## Dependency Library
# 用CRNN+seq2seq+attention识别中文
中文类别为5990类,类别可以在char_std_5990找到,中文样本的合成参考的是caffe_ocr项目,
## 网络结构
CNN用的是CRNN中的结构,一层双向lstm做编码器,一层GRU做解码器
## 如何训练
训练需要2个txt文件(train.txt,test.txt)保存图片的名字以及label,<br>
可以在这里下载样本[(caffe_ocr)百度网盘](https://pan.baidu.com/s/1dFda6R3#list/path=%2F)<br>
在config.py里修改路径,运行train.py
## 依赖
TensorFlow >=1.2<br>
opencv
opencv<br>
## 引用
[caffe_ocr](https://github.com/senlinuc/caffe_ocr)<br>
[attention-ocr-toy-example](https://github.com/ray075hl/attention-ocr-toy-example)
Loading