Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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