Simplest steps to train tesseract
参考
http://groups.google.com/group/tesseract-ocr/browse_thread/thread/983317066a5acbd1/58ccdd7c1da5884e?lnk=gst&q=train#58ccdd7c1da5884e
1.收集验证码,把所有验证码图片二值化,去噪点后,用PS合并在一张图片上如图,把图片转换成tif格式。如scan.tif
2.生成box文件
运行"tesseract scan.tif scan batch.nochop makebox"; 会生成scan.txt文本文件,修正错误的字符。把scan.txt改名为scan.box(这一步可以用bbtesseract代替。bbtesseract下载地址http://code.google.com/p/bbtesseract/downloads/list)
3.开始训练tesseract
运行"tesseract scan.tif junk nobatch box.train"; 生成文件scan.tr
4.Clustering
运行"mftraining scan.tr"; 生成文件"inttemp", "pffmtable" and "Microfeat"(Not used)
运行"cnTraining scan.tr";生成文件"normproto";
5.Compute the Character Set
运行"unicharset_extractor scan.box"; 生成文件"unicharset"
6.Dictionary Data
这一步操作可以不用,直接复制其他的。
Create two UTF-8 text file, "frequent_words_list" and "words_list",
the words in the files should not be duplicated;
Run "wordlist2dawg frequent_words_list freq-dawg"
Run "wordlist2dawg words_list word-dawg";
This will generate two files, "freq-dawg" and "word-dawg";
7. Putting it all together
All you need to do now is collect together all 8 files and rename
them with a lang. prefix;
File "eng.DangAmbigs" and "eng.user-words" could be empty;
If create "eng.DangAmbigs" file, the characters must be exist in the
"scan.box";
8. Try it
Run "tesseract scan.tif output -l eng"
The file "output.txt" is the result;
快速步骤
1.收集验证码,把所有验证码图片二值化,去噪点后,用PS合并在一张图片上如图,把图片转换成tif格式。如scan.tif
2.生成box文件
运行"tesseract scan.tif scan batch.nochop makebox"; 会生成scan.txt文本文件,修正错误的字符。把scan.txt改名为scan.box(这一步可以用bbtesseract代替。bbtesseract下载地址http://code.google.com/p/bbtesseract/downloads/list)
3.把tesseract中training中的所有文件复制到tesseract.exe所在目录中,在tesseract.exe所在目录新建batch
tesseract scan.tif junk nobatch box.train
mftraining scan.tr
cnTraining scan.tr
unicharset_extractor scan.box
运行后,生成的inttemp,normproto,pffmtable,unicharset有用。
- 大小: 5.7 KB
分享到:
相关推荐
2020-Rethinking Pre-training and Self-training.pdf
matlab实现co-training算法,数据集mutiple+Features
要完成一个评分卡,通过预测某人在未来两年内将会经历财务危机的可能性来提高信用评分的效果,帮助贷款人做出最好的决策。
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding论文翻译
提出辅助学习策略,结合富信息策略设计辅助学习器,并将辅助学习器应用在Tri-training训练以及说话声识别中。实验结果表明,辅助学习器在Tri-training训练的基础上不仅降低每次迭代可能产生的误标记样例数,而且能够...
申请评分卡训练测试数据
计算机专业-中文摘要-翻译为-英文摘要-技巧与案例训练-Skill-Training-of-abstract最新版本.ppt
tangjiadong-Training-master-master.zip
PN544官方开发工具,PN544 Training FRI.exe,目前官网无法下载。
基于Matlab直方图Histogram的人脸识别程序-Processed histogram based Face Recognition.part3.rar 基于Matlab 直方图Histogram的人脸识别程序 因为数据库图片太大,所以分成几个压缩文件。 Face ...
advanced-spark-training.pdf
sgx-web-training-Lab-Manual-v1.0,教你如何一步步使用intel sgx ,项目从系统配置到项目建立,使用过程。配合b站的视频的实训文档。
2019-何凯明-预训练-Rethinking ImageNet Pre-training1
Spring Shiro 学习系统 Spring-Shiro-training,适合初学者。
基于Matlab直方图Histogram的人脸识别程序-Processed histogram based Face Recognition.part2.rar 基于Matlab 直方图Histogram的人脸识别程序 因为数据库图片太大,所以分成几个压缩文件。 Face ...
android-training-course-in-chinese v0.9.2
进行更改过的tri-training的一个版本
DAP Detection-Aware Pre-Training With Weak Supervision
书籍ansible-training-answer-keys-master的随带例子代码,需要详细学习ansible playbook的朋友,可以学习下载练习