skillfed

keras-ocr

A packaged and flexible version of the CRAFT text detector and Keras CRNN recognition model.

keras-ocr v0.9.3 108.0K downloads/30d#12,584 on PyPI1,474
Permissive license MIT AGING released

What it is and what it does

keras-ocr is a packaged implementation of two published deep learning models: the CRAFT text detector (from Clova AI) and the CRNN recognition model. It wraps these into a single pipeline that takes images as input and returns detected text regions with recognized words. The package ships with pre-trained weights and downloads them automatically, so you can start extracting text from images with minimal setup.

The library is designed for scene text (text that appears naturally in photographs) rather than scanned documents. It exposes a straightforward API—create a pipeline, pass images to it, and receive (word, bounding-box) tuples. The fact sheet shows it performs comparably to cloud OCR services on the COCO-Text benchmark, though it ignores punctuation and case by design. It depends on TensorFlow, image processing libraries (imgaug, shapely, fonttools), and utility packages (editdistance, validators, tqdm).

Use it for:

  • Extract text from photographs of signs, labels, or documents for indexing or data entry automation.
  • Build a local OCR pipeline that doesn't require cloud API calls or internet connectivity.
  • Train a custom text detection or recognition model using the provided framework and your own labeled data.
  • Batch-process images to extract and validate text content as part of a data pipeline.
  • Integrate text detection into computer vision applications that need to locate and read text regions.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

keras-ocr detects and recognizes text in images using pre-trained deep learning models (CRAFT for detection, CRNN for recognition), providing a high-level API for text extraction from photos and documents.

Yes, with conditions. The package is stable, has no known vulnerabilities, and low install friction. It's suitable for projects that need local OCR without cloud dependencies. However, the aging maintenance status (last release 1012 days ago) means it may not track the latest TensorFlow or dependency versions—verify compatibility with your environment before committing to production use. Best for new projects where you can pin dependencies, or for prototyping where you can tolerate potential future compatibility issues.

Install

keras-ocr on PyPI

pip

pip install keras-ocr

uv

uv add keras-ocr

poetry

poetry add keras-ocr

Installing keras-ocr

Before you install

Low install friction with a pure-Python wheel. Maintenance status is aging—last release was 1012 days ago (November 2023) and the last commit was September 2025, suggesting the project is maintained but not actively developed. The 9 runtime dependencies are standard ML/image processing libraries.

License in practice

MIT license is permissive, allowing commercial and private use with minimal restrictions. You may use, modify, and distribute the package freely as long as you include the original license notice.

Quickstart

pip install keras-ocr

import keras_ocr
pipeline = keras_ocr.pipeline.Pipeline()
images = [keras_ocr.tools.read(url) for url in ['https://example.com/image.jpg']]
predictions = pipeline.recognize(images)

Requires TensorFlow >= 2.0.0 and Python >= 3.7.5. Pre-trained model weights are downloaded automatically on first use. GPU memory management can be configured via MEMORY_GROWTH and MEMORY_ALLOCATED environment variables.

Verify before relying

  • Whether the package works reliably with TensorFlow 2.x versions released after November 2023.
  • Current performance on modern OCR benchmarks or whether the published metrics remain representative.
  • Compatibility with recent versions of imgaug and other dependencies given the aging maintenance status.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.7.5)
Install friction low — pure-Python wheel
Runtime dependencies 9 — editdistance, efficientnet, essential_generators, fonttools, imgaug, pyclipper, shapely, tqdm, validators
Maintenance aging — 1,012 days since the last release
Last repo commit
First released
Downloads 108,017/month — #12,584 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: keras_ocr-0.9.3-py3-none-any.whl

License :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxOperating System :: UnixProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

text detection and recognitionOCR with deep learningextract text from imagesscene text detectionCRAFT CRNN pipelineimage text extractionneural network OCR
ocrtext-detectiondeep-learning

More Artificial Intelligence packages