tr

Requirements
python2/python3
Ubuntu 16.04/Ubuntu 18.04
numpy
GPU版本安装说明
如果对速度有要求,推荐安装GPU版本
要使用GPU版本,复制tr_gpu文件夹里面的文件到tr文件夹
注意: 需要先安装CUDA 10.1以及cuDNN 7.6.5

docker pull mcr.microsoft.com/azureml/onnxruntime:v1.3.0-cuda10.1-cudnn7
sudo nvidia-docker run -v /path/to/tr:/path/to/tr --rm -it mcr.microsoft.com/azureml/onnxruntime:v1.3.0-cuda10.1-cudnn7
Install
安装方法一
git clone https://github.com/myhub/tr.git
cd ./tr
sudo python setup.py install

安装方法二
sudo pip install git+https://github.com/myhub/tr.git@master
Test
python2 demo.py # python2兼容测试
python3 test.py # 可视化测试
python3 test-multi-thread.py # 多线程测试

How To Use?
import tr

detect text lines, return list of (cx, cy, width, height, angle)

print(tr.detect(“imgs/web.png”, tr.FLAG_RECT))

detect text lines with angle, return list of (cx, cy, width, height, angle)

print(tr.detect(“imgs/id_card.jpeg”, tr.FLAG_ROTATED_RECT))

recognize text line, return (text, confidence)

print(tr.recognize(“imgs/line.png”))

detect and recognize text lines with angle, return list of ((cx, cy, width, height, angle), text, confidence)

print(tr.run(“imgs/id_card.jpeg”))

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值