# OCRopus

OCRopus is a free document analysis and optical character recognition (OCR) system released under the Apache License v2.0 with a very modular design using command-line interfaces.
OCRopus is developed under the lead of Thomas Breuel from the German Research Centre for Artificial Intelligence in Kaiserslautern, Germany and was sponsored by Google.

## Description

OCRopus was especially designed for use in high-volume digitization projects of books, such as Google Books, Internet Archive, or libraries. A large number of languages and fonts are to be supported. However, it can also be used for desktop and office applications or for application for visually impaired people.
OCRopus has main components which perform:
* Document layout analysis
* Optical character recognition
* Application of statistical language models
Single or multiple scripts are available for these components. The modular programming approach allows individual workflows to be used and individual steps to be exchanged.
By default, OCRopus comes with a model for English texts and a model for text in Fraktur. These models refer to the script and are largely independent of the actual language. New characters or language variants can be trained either from the start, or addeded later.
Recent text recognition is based on recurrent neural networks (LSTM) and does not require a language model. This makes it possible to train language-independent models for which good recognition results in English, German and French have been shown at the same time. In addition to the Latin script, there are results for other scripts such as Sanskrit, Urdu, Devanagari, and Greek.
Very good detection rates can be achieved through an appropriate training. This extra effort is particularly worthwhile for difficult documents or scripts that are no longer common today, which are not in the focus of other OCR software.

## History

On 9 April 2007, OCRopus was announced as a Google-sponsored project to develop advanced OCR technologies. Funding was granted for a period of three years and covered in particular PhD and postdoctoral positions at DFKI and the University of Kaiserslautern. In return, OCRopus was also used for automatic text recognition in Google Book Search. Licensing under an open source license was made right from the start to facilitate collaboration between industrial and academic research. OCRopus has received further funding from the Andrew W. Mellon Foundation and the BMBF.
The first alpha version 0.1 was released on 22 October 2007 and several pre-releases followed between December 2007 and May 2009 reaching a stable version 0.4.4 in March 2010. Originally, the software was developed in C++, Python and Lua with Jam as a build system. A complete refactoring of the source code in Python modules was done and released in version 0.5 (June 2012).
Initially, Tesseract was used as the only text recognition module. Since 2009 (version 0.4) Tesseract was only supported as a plugin. Instead, a self-developed text recognizer (also segment-based) was used. This recognizer was then used together with OpenFST for language modeling after the recognition step. From 2013 onwards, an additional recognition with recurrent neural networks (LSTM) was offered, which with the release of version 1.0 in November 2014 is the only recognizer.
The source code is managed over GitHub and is maintained and developed by a developer community. The current version of OCRopus is 1.3.3 (December 2017).
The OCR software kraken which is used by the transcription platform eScriptorium is a fork of OCRopus. It added support for right-to-left scripts. Another fork which is based on kraken is Calamari.
Thomas Breuel also developed a successor OCRopus 2 and is actively working on OCRopus 4.

## Usage

OCRopus can be used from the command line. Once installed, it can be invoked by specifying the input images. It will output the recognized text to standard output directly or write it as hOCR (HTML-based) code into files, from which it then can be transformed to a searchable PDF. If more precise control is needed, options can be specified on the command line to perform specific operations (e.g. recognizing a single line).
Example for the OCRopus calls to recognize the text in an image:
Other tools concentrate on the training part of OCRopus. There are OCRopus models to extract text from Latin, Greek, Cyrillic and Indic scripts.