博客
关于我
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/

你可能感兴趣的文章
mysqlbinlog报错unknown variable ‘default-character-set=utf8mb4‘
查看>>
mysqldump 参数--lock-tables浅析
查看>>
mysqldump 导出中文乱码
查看>>
mysqldump 导出数据库中每张表的前n条
查看>>
mysqldump: Got error: 1044: Access denied for user ‘xx’@’xx’ to database ‘xx’ when using LOCK TABLES
查看>>
Mysqldump参数大全(参数来源于mysql5.5.19源码)
查看>>
mysqldump备份时忽略某些表
查看>>
mysqldump实现数据备份及灾难恢复
查看>>
mysqldump数据库备份无法进行操作只能查询 --single-transaction
查看>>
mysqldump的一些用法
查看>>
mysqli
查看>>
MySQLIntegrityConstraintViolationException异常处理
查看>>
mysqlreport分析工具详解
查看>>
MySQLSyntaxErrorException: Unknown error 1146和SQLSyntaxErrorException: Unknown error 1146
查看>>
Mysql_Postgresql中_geometry数据操作_st_astext_GeomFromEWKT函数_在java中转换geometry的16进制数据---PostgreSQL工作笔记007
查看>>
mysql_real_connect 参数注意
查看>>
mysql_secure_installation初始化数据库报Access denied
查看>>
MySQL_西安11月销售昨日未上架的产品_20161212
查看>>
Mysql——深入浅出InnoDB底层原理
查看>>
MySQL“被动”性能优化汇总
查看>>