Skip to main content

OCR-D framework

Project description

Collection of OCR-related python tools and wrappers from the OCR-D team

https://img.shields.io/pypi/v/ocrd.svg https://travis-ci.org/OCR-D/core.svg?branch=master https://circleci.com/gh/OCR-D/core.svg?style=svg https://scrutinizer-ci.com/g/OCR-D/core/badges/build.png?b=master Docker Automated build https://codecov.io/gh/OCR-D/core/branch/master/graph/badge.svg https://scrutinizer-ci.com/g/OCR-D/core/badges/quality-score.png?b=master https://img.shields.io/lgtm/alerts/g/OCR-D/core.svg?logo=lgtm&logoWidth=18

Installation

To bootstrap the tool, you’ll need installed (Ubuntu packages):

  • Python (python)

  • pip (python-pip)

To install system-wide:

make deps-ubuntu deps install

To develop, install to a virtualenv

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

Usage

pyocrd installs a binary ocrd that can be used to invoke the processors directly (ocrd process) or start (development) webservices (ocrd server)

TODO: Update docs here.

Examples:

# 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

Testing

Download assets (make assets)

Test with local files: make test

Test with local asset server:
  • Start asset-server: make asset-server

  • make test OCRD_BASEURL='http://localhost:5001/'

Test with remote assets:
  • make test OCRD_BASEURL='https://github.com/OCR-D/assets/raw/master/data/'

See Also

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ocrd-0.13.1.tar.gz (69.2 kB view hashes)

Uploaded Source

Built Distributions

ocrd-0.13.1-py3-none-any.whl (133.7 kB view hashes)

Uploaded Python 3

ocrd-0.13.1-py2-none-any.whl (133.7 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page