ocrmac
A python wrapper to extract text from images on a mac system. Uses the vision framework from Apple.
What it is and what it does
ocrmac wraps Apple's native Vision framework to perform optical character recognition directly on macOS, eliminating the need for external OCR engines like Tesseract or EasyOCR. You pass an image file path or PIL image object and receive a list of recognized text snippets, each with a confidence score and bounding box coordinates. The package supports two backends—Vision (available on macOS 10.15+) and LiveText (macOS Sonoma+)—and lets you tune recognition speed versus accuracy or specify language preferences for post-processing.
The main dependencies are Click (for CLI), pillow (for image handling), and pyobjc-framework-Vision (the bridge to Apple's native framework). It's designed for developers on macOS who want fast, built-in OCR without downloading large model files or managing GPU acceleration, though it only works on macOS systems.
Use it for:
- Extract text from screenshots or documents on macOS without external OCR dependencies
- Batch process images to build searchable text indexes with confidence filtering
- Create annotated images showing recognized text regions via PIL or matplotlib output
- Implement language-specific OCR workflows by setting language preferences like 'en-US' or 'zh-Hans'
- Integrate native macOS OCR into Python workflows where speed and native integration matter more than cross-platform support
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Extracts text from images on macOS using Apple's Vision framework, returning recognized text with confidence scores and bounding boxes.
Yes, if you are on macOS and need straightforward OCR without external dependencies. The package is permissively licensed, has low install friction, and leverages native macOS capabilities. The aging maintenance status (218 days since release) is not a blocker—the last commit was recent and the repository is active—but verify that your macOS version meets the 10.15+ requirement and that LiveText features require Sonoma if you need them.
Install
ocrmac on PyPI
pip
pip install ocrmacuv
uv add ocrmacpoetry
poetry add ocrmacInstalling ocrmac
Before you install
Low install friction with a pure-Python wheel and minimal dependencies. The package is aging (218 days since last release) but the repository remains active with recent maintenance work on build configuration and test infrastructure.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal legal constraints.
Quickstart
pip install ocrmac
from ocrmac import ocrmac
annotations = ocrmac.OCR('test.png').recognize()
print(annotations) # Returns list of (text, confidence, bounding_box) tuples
Requires macOS 10.15 or later; pyobjc-framework-Vision is a compiled dependency that only installs on macOS.
Verify before relying
- Whether LiveText framework support requires macOS Sonoma or later specifically
- Performance characteristics on Apple Silicon vs Intel Macs beyond the M3 Max benchmark
- Accuracy comparison with the Vision framework's fast vs accurate recognition levels on real-world documents
Package facts
| License | MIT license (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — Click, pyobjc-framework-Vision, pillow |
| Maintenance | aging — 218 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 84,987/month — #13,962 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ocrmac-1.0.1-py3-none-any.whl
Keywords: ocrmac
Tags
More Text Processing packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyparsingpyparsing provides a library for building text…
permissive · top 1,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
RapidFuzzRapidFuzz provides fast fuzzy string matching…
permissive · top 1,000 on PyPI
tinycss2tinycss2 parses CSS strings into token and…
permissive · top 1,000 on PyPI
llama-parseLlamaParse parses complex documents (PDFs,…
permissive · top 1,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
easyocrEasyOCR performs optical character recognition…
permissive · top 5,000 on PyPI
pyobjc-framework-VisionProvides Python bindings to macOS's Vision…
permissive · top 5,000 on PyPI
pyocrPyOCR wraps multiple OCR engines (Tesseract,…
copyleft · top 15,000 on PyPI
tesserocrtesserocr wraps Tesseract's C++ OCR engine via…
permissive · top 15,000 on PyPI
keras-ocrkeras-ocr detects and recognizes text in images…
permissive · top 15,000 on PyPI
python-doctrpython-doctr extracts and localizes text from…
permissive · top 15,000 on PyPI
img2tableIdentifies and extracts tables from images and…
permissive · top 15,000 on PyPI
cnstdDetects text and mathematical formulas in…
permissive · top 15,000 on PyPI