Skip to main content

Expandable and scalable OCR pipeline

Project description

Overview

https://travis-ci.org/OpenPhilology/nidaba.svg

Nidaba is the central controller for the entire OGL OCR pipeline. It oversees and automates the process of converting raw images into citable collections of digitized texts.

It offers the following functionality:

  • Grayscale Conversion

  • Binarization utilizing Sauvola adaptive thresholding, Otsu, or ocropus’s nlbin algorithm

  • Deskewing

  • Dewarping

  • Integration of tesseract, kraken, and ocropus OCR engines

  • Page segmentation from the aforementioned OCR packages

  • Various postprocessing utilities like spell-checking, merging of multiple results, and ground truth comparison.

As it is designed to use a common storage medium on network attached storage and the celery distributed task queue it scales nicely to multi-machine clusters.

Build

To easiest way to install the latest stable(-ish) nidaba is from PyPi:

$ pip install nidaba

or run:

$ pip install .

in the git repository for the bleeding edge development version.

Some useful tasks have external dependencies. A good start is:

# apt-get install libtesseract3 tesseract-ocr-eng libleptonica-dev liblept

Tests

Per default no dictionaries and OCR models necessary to runs the tests are installed. To download the necessary files run:

$ python setup.py download
$ python setup.py nosetests

Tests for modules that call external programs, at the time only tesseract, ocropus, and kraken, will be skipped if these aren’t installed.

Running

First edit (the installed) nidaba.yaml and celery.yaml to fit your needs. Have a look at the docs if you haven’t set up a celery-based application before.

Then start up the celery daemon with something like:

$ celery -A nidaba worker

Next jobs can be added to the pipeline using the nidaba executable:

$ nidaba batch -b otsu -l tesseract -o tesseract:eng -- ./input.tiff
Preparing filestore             [✓]
Building batch                  [✓]
951c57e5-f8a0-432d-8d77-8a2e27fff53c

Using the return code the current state of the job can be retrieved:

$ nidaba status 25d79a54-9d4a-4939-acb6-8e168d6dbc7c
PENDING

When the job has been processed the status command will return a list of paths containing the final output:

$ nidaba status 951c57e5-f8a0-432d-8d77-8a2e27fff53c
SUCCESS
14.tif → .../input_img.rgb_to_gray_binarize.otsu_ocr.tesseract_grc.tif.hocr

Documentation

Want to learn more? Read the Docs

Project details


Download files

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

Source Distribution

nidaba-0.4.2.tar.gz (80.3 kB view details)

Uploaded Source

Built Distribution

nidaba-0.4.2-py2-none-any.whl (55.4 kB view details)

Uploaded Python 2

File details

Details for the file nidaba-0.4.2.tar.gz.

File metadata

  • Download URL: nidaba-0.4.2.tar.gz
  • Upload date:
  • Size: 80.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for nidaba-0.4.2.tar.gz
Algorithm Hash digest
SHA256 1a738d37a2eea0d0ac7a1e9be55ba2cd1fabccde8fa75bf1987efab940dab7f4
MD5 9fc650da58a14bcab277a61e13a7d358
BLAKE2b-256 3d8ac4aede140217e4580a7bb8fdb7362a9f12d58d68fa2ff378547277d9c329

See more details on using hashes here.

File details

Details for the file nidaba-0.4.2-py2-none-any.whl.

File metadata

File hashes

Hashes for nidaba-0.4.2-py2-none-any.whl
Algorithm Hash digest
SHA256 4ef8b4032618dc6d330e9e43042347e22cd965c18bf061feb513958987c30c36
MD5 80eab2fe2fb9f1ed8a25f2d0837b764b
BLAKE2b-256 dea98a5dfb2c4733ca57940dd69886ba4963d4b3387569b57a4be1ea15c1fcda

See more details on using hashes here.

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