Skip to main content

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
uv add pytextractor
text_detector

Usage lib

from pytextractor import pytextractor

extractor = pytextractor.PyTextractor()

Running tests

brew install tesseract
uv run pytest

Development setup

brew install tesseract
uv sync
uv run pytest

Project details


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.2.2.tar.gz (90.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytextractor-2.2.2-py3-none-any.whl (89.8 MB view details)

Uploaded Python 3

File details

Details for the file pytextractor-2.2.2.tar.gz.

File metadata

  • Download URL: pytextractor-2.2.2.tar.gz
  • Upload date:
  • Size: 90.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for pytextractor-2.2.2.tar.gz
Algorithm Hash digest
SHA256 88175f530aa1b272ae8f6f2c09f29c5663076760fd83a01fac3a50eaeaf9da99
MD5 0d6d64e513c3c472e613c4e87de19094
BLAKE2b-256 cf143fbf568a03670909a26a9de7ad81248f84d3faacba8a9f2a29e9f0c61b74

See more details on using hashes here.

File details

Details for the file pytextractor-2.2.2-py3-none-any.whl.

File metadata

  • Download URL: pytextractor-2.2.2-py3-none-any.whl
  • Upload date:
  • Size: 89.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for pytextractor-2.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f19e0d75d914ac5ed0ebfa5e3ef637d3c005d200d818931b3b8d7e12a3b7f534
MD5 df278128555c3a1148555e5bf02fbc45
BLAKE2b-256 e1b3d4ce0b54281135b7c820bd74427de28a1ea810e272073ca260ebfd2a8dfa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page