Skip to content

Kraken

kraken is a turn-key OCR system forked from ocropus. It is intended to rectify a number of issues while preserving (mostly) functional equivalence.

Example

$ kraken -i /Users/your/Downloads/21.png image.txt binarize segment ocr -m en_best.mlmodel
/Users/your/.pyenv/versions/3.7.7/envs/opy-your-3.7.7/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])

...

Loading RNN default     /Users/your/.pyenv/versions/3.7.7/envs/opy-your-3.7.7/lib/python3.7/site-packages/coremltools/models/model.py:112: RuntimeWarning: You will not be able to run predict() on this Core ML model. Underlying exception message was: Error compiling model: "Error reading protobuf spec. validator error: Input MLMultiArray to neural networks must have dimension 1 (vector) or 3 (image-like arrays).".
  RuntimeWarning)
Binarizing      Segmenting      Writing recognition results for /var/folders/6v/598t63jj15lbcn_nq9nm12ww0000gn/T/tmp5vpbtedk    

See also

Favorite site

Guide

Article