ocrmac (Apple Vision) OCR engine for OCR Bridge
Project description
OCR Bridge - ocrmac Engine
ocrmac (Apple Vision Framework) OCR engine for OCR Bridge.
Overview
This package provides an ocrmac engine that integrates with the OCR Bridge architecture. ocrmac uses Apple's Vision framework for OCR, providing excellent performance and accuracy on macOS systems.
Features
- Native macOS: Uses Apple's Vision framework (macOS 10.15+)
- LiveText Support: macOS Sonoma 14.0+ for enhanced accuracy
- Multiple Formats: JPEG, PNG, TIFF, PDF
- Fast Performance: ~131-207ms per image depending on mode
- HOCR Output: Structured XML with bounding boxes
Platform Requirements
- macOS 10.15+ for Vision framework (fast/balanced/accurate modes)
- macOS Sonoma 14.0+ for LiveText framework
Installation
pip install ocrbridge-ocrmac
Note: macOS only! This package will not work on Windows or Linux.
Usage
The engine is automatically discovered by OCR Bridge via entry points.
Parameters
languages(list[str] | None): IETF BCP 47 codes (e.g., ["en-US"], ["zh-Hans"]) (default: None = auto-detect)recognition_level(RecognitionLevel): fast/balanced/accurate/livetext (default: balanced)
Example
from pathlib import Path
from ocrbridge.engines.ocrmac import OcrmacEngine, OcrmacParams, RecognitionLevel
engine = OcrmacEngine()
# Process with defaults
hocr = engine.process(Path("document.pdf"))
# Process with custom parameters
params = OcrmacParams(
languages=["en-US", "fr-FR"],
recognition_level=RecognitionLevel.ACCURATE
)
hocr = engine.process(Path("document.pdf"), params)
# Use LiveText (macOS Sonoma 14.0+ only)
params_livetext = OcrmacParams(
languages=["en-US"],
recognition_level=RecognitionLevel.LIVETEXT
)
hocr = engine.process(Path("document.pdf"), params_livetext)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ocrbridge_ocrmac-2.0.0.tar.gz.
File metadata
- Download URL: ocrbridge_ocrmac-2.0.0.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dc8f5f82a7c247e42a71be90465906cb8e0ad570747eebcbb196da086b8eb00
|
|
| MD5 |
13169586c61a1ca77885d1035123c745
|
|
| BLAKE2b-256 |
26fccbee9bb1d51c04deb10221e84adcfbbbff97445989d6a2e84d546dde0685
|
Provenance
The following attestation bundles were made for ocrbridge_ocrmac-2.0.0.tar.gz:
Publisher:
release.yml on OCRBridge/ocrbridge-ocrmac
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ocrbridge_ocrmac-2.0.0.tar.gz -
Subject digest:
5dc8f5f82a7c247e42a71be90465906cb8e0ad570747eebcbb196da086b8eb00 - Sigstore transparency entry: 731920959
- Sigstore integration time:
-
Permalink:
OCRBridge/ocrbridge-ocrmac@10a47cfee20041d6e52325115001f8ef2ae5db91 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/OCRBridge
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@10a47cfee20041d6e52325115001f8ef2ae5db91 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ocrbridge_ocrmac-2.0.0-py3-none-any.whl.
File metadata
- Download URL: ocrbridge_ocrmac-2.0.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1473dad8fda54ccf1fca58f91a2327dce3648f4d35af2cd437a10b601b0685c2
|
|
| MD5 |
a7731f7c3af627afdecfcbf0b9d27139
|
|
| BLAKE2b-256 |
1a4c502d1681375cd043bd56782380d88e154c57c058bc64a3251978b1e20175
|
Provenance
The following attestation bundles were made for ocrbridge_ocrmac-2.0.0-py3-none-any.whl:
Publisher:
release.yml on OCRBridge/ocrbridge-ocrmac
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ocrbridge_ocrmac-2.0.0-py3-none-any.whl -
Subject digest:
1473dad8fda54ccf1fca58f91a2327dce3648f4d35af2cd437a10b601b0685c2 - Sigstore transparency entry: 731920962
- Sigstore integration time:
-
Permalink:
OCRBridge/ocrbridge-ocrmac@10a47cfee20041d6e52325115001f8ef2ae5db91 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/OCRBridge
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@10a47cfee20041d6e52325115001f8ef2ae5db91 -
Trigger Event:
push
-
Statement type: