博客
关于我
tf识别非固定长度图片ocr(数字+字母 n位长度可变)- CNN+RNN+CTC
阅读量:740 次
发布时间:2019-03-22

本文共 716 字,大约阅读时间需要 2 分钟。

先安装必须的库

tensorflow_gpu==1.15.0numpyopencv_python

 

github: 

https://github.com/bai-shang/crnn_ctc_ocr_tf

  

下载数据集:

http://www.robots.ox.ac.uk/~vgg/data/text/mjsynth.tar.gz 要10G

然后解压缩,估计完整解压完需要1天

 

 

 

 

 

 

 

find ./mnt/ | xargs ls -d | grep jpg > image_list_all.txt# use some of data to train and evalcat image_list_all.txt | head -n 1000 > image_list.txt

  

 

 

 

 这个文件的图片txt将会作为输入,然后生成tfrecord

python create_synth90k_tfrecord.py --image_dir C:\Users\McKay\PycharmProjects\test8\tfdemo\data --anno_file ./image_list.txt --char_map_json_file ../char_map/char_map.json

  

 

 

 

然后就是训练了

 

 

参数:

--data_dir ../data/tfrecords/ --model_dir ./model/ --batch_size 32 --char_map_json_file ../char_map/char_map.json

  

 

 

没有GPU,训练了4个小时,也只是7%的正确率

 

果断中断,有缘再用GPU训练。

 

转载地址:http://mckwk.baihongyu.com/

你可能感兴趣的文章
mysql-group_concat
查看>>
MySQL-【4】基本操作
查看>>
Mysql-丢失更新
查看>>
Mysql-事务阻塞
查看>>
Mysql-存储引擎
查看>>
mysql-开启慢查询&所有操作记录日志
查看>>
MySQL-数据目录
查看>>
MySQL-数据页的结构
查看>>
MySQL-架构篇
查看>>
MySQL-索引的分类(聚簇索引、二级索引、联合索引)
查看>>
Mysql-触发器及创建触发器失败原因
查看>>
MySQL-连接
查看>>
mysql-递归查询(二)
查看>>
MySQL5.1安装
查看>>
mysql5.5和5.6版本间的坑
查看>>
mysql5.5最简安装教程
查看>>
mysql5.6 TIME,DATETIME,TIMESTAMP
查看>>
mysql5.6.21重置数据库的root密码
查看>>
Mysql5.6主从复制-基于binlog
查看>>
MySQL5.6忘记root密码(win平台)
查看>>