Mac Tesseract 4.1.1 样本训练超详细教程

安装

Mac直接安装tesseract的话无法附带安装training tools

如果已经安装了没有training tools的tesseract,请先卸载

brew uninstall tesseract

先安装一些依赖的包

# Packages which are always needed.
brew install automake autoconf libtool
brew install pkgconfig
brew install icu4c
brew install leptonica
# Packages required for training tools.
brew install pango
# Optional packages for extra features.
brew install libarchive
# Optional package for builds using g++.
brew install gcc

从下列链接下载tesseract-4.1.1.tar.gz并解压

https://github.com/tesseract-ocr/tesseract/releases

编译并安装

cd tesseract-4.1.1
./autogen.sh
mkdir build
cd build
# Optionally add CXX=g++-8 to the configure command if you really want to use a different compiler.
../configure PKG_CONFIG_PATH=/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libarchive/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig
make -j
# Optionally install Tesseract.
sudo make install
# Optionally build and install training tools.
make training
sudo make training-install

下载完不会附带着一起下载数据集,通过下列链接自行下载需要的语言

https://github.com/tesseract-ocr/tessdata

训练

首先,收集数据样本(若干张需要训练的图片)

图片格式需要转换为tif

下载并打开jTessBoxEditor (注意,该软件需要java8环境,请自行配

  • 4
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 6
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值