OCR-D框架

ocrd的Python项目详细描述


Collection of OCR-related python tools and wrappers from the OCR-D team
https://img.shields.io/pypi/v/ocrd.svghttps://travis-ci.org/OCR-D/core.svg?branch=masterhttps://circleci.com/gh/OCR-D/core.svg?style=svghttps://scrutinizer-ci.com/g/OCR-D/core/badges/build.png?b=masterDocker Automated buildhttps://codecov.io/gh/OCR-D/core/branch/master/graph/badge.svghttps://scrutinizer-ci.com/g/OCR-D/core/badges/quality-score.png?b=masterhttps://img.shields.io/lgtm/alerts/g/OCR-D/core.svg?logo=lgtm&logoWidth=18

安装

要引导该工具,您需要安装(ubuntu包):

  • Python(python
  • pip(python-pip

要在系统范围内安装:

make deps-ubuntu deps install

要进行开发,请安装到virtualenv

pip install virtualenv
virtualenv --no-site-packages venv
source venv/bin/activate
make deps install

用法

pyocrd安装可用于调用处理器的二进制ocrd。 直接(ocrd process)或启动(开发)webservices(ocrd server

todo:在此处更新文档。

示例:

# List available processors
ocrd process

# Region-segment with tesserocr all files in METS INPUT fileGrp
ocrd process -m /path/to/mets.xml segment-region/tesserocr

# Chain multiple processors
ocrd process -m /path/to/mets.xml characterize/exif segment-line/tesserocr recognize/tesserocr

# Start a processor web service at port 6543
ocrd server process -p 6543
http PUT localhost:6543/characterize url==http://server/path/to/mets.xml

测试

下载资产(make assets

使用本地文件进行测试:make test

使用本地资产服务器进行测试:
  • 启动资产服务器:make asset-server
  • make test OCRD_BASEURL='http://localhost:5001/'
使用远程资源进行测试:
  • make test OCRD_BASEURL='https://github.com/OCR-D/assets/raw/master/data/'

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Spring框架服务单元测试   在Java中遍历hashmaps的hashmap以检索字符串值   如何使用CodeQL检查Java注释是否具有特定属性?   java为什么在Spring Boot中访问此资源而不是登录弹出窗口需要始终获得完全身份验证   处理将多集计数转换为列表的过程   java另一个线性布局,没有出现按钮   eclipse Java映像加载未显示在jar中   java Junit类无法加载基本测试类ApplicationContext   java如何在main中使用my getvalues()方法打印列表   java Sonar,S128:切换案例应该以无条件的“中断”语句结束,而不是继续   java从socket读取字符串错误连接重置错误   java使用新数据刷新任意图表饼图   java通过异步运行lambda访问方法参数   java错误的结果一旦我处理try and catch