text extractor from images
Project description
pytextractor
python ocr using tesseract with EAST opencv text detector
Uses the EAST opencv detector with pytesseract to extract text(default) or numbers from images.
Usage main
usage: text_detector [-h] [--east EAST] [-c CONFIDENCE] [-w WIDTH] [-e HEIGHT] [-d] [-n] [-p PERCENTAGE]
[-b MIN_BOXES] [-i MAX_ITERATIONS]
images [images ...]
Text/Number extractor from image
positional arguments:
images path(s) to input image(s)
options:
-h, --help show this help message and exit
--east EAST path to input EAST text detector
-c CONFIDENCE, --confidence CONFIDENCE
minimum probability required to inspect a region
-w WIDTH, --width WIDTH
resized image width (should be multiple of 32)
-e HEIGHT, --height HEIGHT
resized image height (should be multiple of 32)
-d, --display Display bounding boxes
-n, --numbers Detect only numbers
-p PERCENTAGE, --percentage PERCENTAGE
Expand/shrink detected bound box
-b MIN_BOXES, --min-boxes MIN_BOXES
minimum number of detected boxes to return
-i MAX_ITERATIONS, --max-iterations MAX_ITERATIONS
Installation & usage
brew install tesseract
pipx install pytextractor
text_detector
Usage lib
from pytextractor import pytextractor
extractor = pytextractor.PyTextractor()
Running tests
brew install tesseract
python -mvenv .venv --prompt .
. ./.venv/bin/activate
pip install ".[dev]"
pytest -s tests
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
pytextractor-2.1.0.tar.gz
(764.3 kB
view details)
Built Distribution
File details
Details for the file pytextractor-2.1.0.tar.gz
.
File metadata
- Download URL: pytextractor-2.1.0.tar.gz
- Upload date:
- Size: 764.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20a2eccd5cb402fe3007a5eac02cb81a8c007f2a420bf312c7daeb45c8b1dd7a |
|
MD5 | 461b34fcb2cb4d8be1328662e6e0e035 |
|
BLAKE2b-256 | a26779b50d22f801263ed90e1c8e2539e95135e42cc699f6f6e36c1174def97b |
File details
Details for the file pytextractor-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: pytextractor-2.1.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07acccf639af812860f9febef45a255fcd549e5d1c67064664037b45f6bd80c0 |
|
MD5 | 6a50de55a881794c2e07f7184e18a521 |
|
BLAKE2b-256 | 1b91aa7b2b368290ef1943b9c02c6192fb2c401536300df8dbb7f9ebd0ba0cde |