keras-ocr
A packaged and flexible version of the CRAFT text detector and Keras CRNN recognition model.
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-ocruv
uv add keras-ocrpoetry
poetry add keras-ocrInstalling 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
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
easyocrEasyOCR performs optical character recognition…
permissive · top 5,000 on PyPI
python-doctrpython-doctr extracts and localizes text from…
permissive · top 15,000 on PyPI
tesserocrtesserocr wraps Tesseract's C++ OCR engine via…
permissive · top 15,000 on PyPI
unstructured.pytesseractPython wrapper for Google's Tesseract OCR…
permissive · top 15,000 on PyPI
pytesseractPytesseract wraps Google's Tesseract-OCR engine…
permissive · top 1,000 on PyPI
pyocrPyOCR wraps multiple OCR engines (Tesseract,…
copyleft · top 15,000 on PyPI
surya-ocrSurya is an OCR and document intelligence model…
permissive · top 5,000 on PyPI
onnxtrOnnxTR extracts and recognizes text from…
permissive · top 15,000 on PyPI
keras-nlpKeras-NLP provides pretrained models and…
permissive · top 15,000 on PyPI
ocrmacExtracts text from images on macOS using…
permissive · top 15,000 on PyPI