phybrain / tr

Free Offline OCR 离线的文本识别SDK

Home Page:https://github.com/myhub/tr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tr - Offline OCR

Tested under Ubuntu 16.04 and Ubuntu 18.04

一款针对扫描文档的离线文本识别SDK,核心代码全部采用C++开发,并提供Python接口

Install

git clone https://github.com/myhub/tr.git
cd ./tr
sudo python setup.py install

or pip install git+https://github.com/myhub/tr.git@master

How To Use?

import tr

# detect text lines, return list of (x, y, w, h)
print(tr.detect("imgs/web.png"))

# recognize text line, return (text, confidence)
print(tr.recognize("imgs/line.png"))

# detect and recognize, return list of ((x, y, w, h), text, confidence)
print(tr.run("imgs/name_card.jpg"))

Test

https://github.com/myhub/tr/blob/master/test.ipynb

About

Free Offline OCR 离线的文本识别SDK

https://github.com/myhub/tr


Languages

Language:Python 100.0%