pythonocr训练模型_生成用于训练深度学习OCR模型的文本图像

该博客介绍了如何使用pythonocr生成训练深度学习OCR模型所需的文本图像,支持拉丁和非拉丁文本。通过安装依赖、运行脚本和配置效果,可以自定义生成图像。对于非拉丁语言,还提供了严格模式来确保字体支持所有字符。此外,还提供了一个检查字体支持字符数的工具,并提到了使用GPU加速图像生成的方法。
摘要由CSDN通过智能技术生成

Text Renderer

Generate text images for training deep learning OCR model (e.g. CRNN). Support both latin and non-latin text.

Setup

Ubuntu 16.04

python 3.5+

Install dependencies:

pip3 install -r requirements.txt

Demo

By default, simply run python3 main.py will generate 20 text images and a labels.txt file in output/default/.

Use your own data to generate image

Please run python3 main.py --help to see all optional arguments and their meanings. And put your own data in corresponding folder.

Config text effects and fraction in configs/default.yaml file(or create a new config file and use it by --config_file option), here are some examples:

Effect name

Image

Origin(Font size 25)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值