tesseract 训练数据基本步骤

unbunt 18.04 安装tesseract
jar 包:jTessBoxEditor 下载

1. 生成tif
jTessBoxEditor -> tools -> merge tif

2. 生成box 文件
tesseract chi_sfz.normal.exp0.tif chi_sfz.normal.exp0 -l chi_sim batch.nochop makebox

3. 使用jTessBoxEditor 矫正box

4. 训练:产生字符特征文件
tesseract chi_sfz.normal.exp0.tif chi_sfz.normal.exp0 -l chi_sim nobatch box.train

5. 计算字符集
unicharset_extractor chi_sfz.normal.exp0.box

6. 定义字体特征文件
font_properties
里面内容写入 normal 0 0 0 0 0 表示默认普通字体

7. 聚集字符特征
shapeclustering -F font_properties -U unicharset chi_sfz.normal.exp0.tr
mftraining -F font_properties -U unicharset -O chi_sfz.unicharset chi_sfz.normal.exp0.tr
cntraining chi_sfz.normal.exp0.tr

8.把目录下的unicharset、inttemp、pffmtable、shapetable、normproto这五个文件前面都加上normal
cp unicharset normal.unicharset
cp inttemp normal.inttemp
cp pffmtable normal.pffmtable
cp shapetable normal.shapetable
cp normproto normal.normproto

9. 合并数据
combine_tessdata normal.

10. 测试
tesseract c3.jpg r -l normal

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值