OCR-D框架
ocrd的Python项目详细描述
Collection of OCR-related python tools and wrappers from the OCR-D team
安装
要引导该工具,您需要安装(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/'