sirfz/tesserocr

A Python wrapper for the tesseract-ocr API

What it solves

tesserocr provides a simple, Python-friendly way to use the Tesseract OCR engine. It bridges the gap between Python and Tesseract's C++ API, allowing developers to perform Optical Character Recognition (OCR) on images without writing complex C++ code.

How it works

The project uses Cython to wrap the Tesseract C++ API. By releasing the Python Global Interpreter Lock (GIL) during image processing, it enables true concurrent execution when using Python's threading module. It is designed to work seamlessly with the Pillow image library, though it can also process image files directly.

Who it’s for

It is for Python developers (version 3.10+) who need to extract text from images and want a straightforward, high-performance interface to the industry-standard Tesseract engine.

Highlights

  • Direct integration with Tesseract's C++ API for high performance.
  • Native support for Pillow (PIL) images.
  • Thread-safe design that allows concurrent image processing.
  • Access to advanced Tesseract features like orientation detection, script analysis, and layout component extraction.
  • Pre-built wheels for major platforms (Linux, macOS, Windows) that include necessary dependencies.

Related

  • Project
  • Project
  • Project
  • Project
  • Project