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.1.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.1-py3-none-any.whl (89.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytextractor-2.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 fb82e73d730355da7d08240ca01383e66ca9dc342276e5e96d7429d06682d8ac
MD5 084f06400aa59d31772ced8eb1d2121f
BLAKE2b-256 f8020843bc721144237200ffe7939b98a6fca750b102b6d9a2a70d40cc88817d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytextractor-2.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2409db0458c4a14b28f187e0345af7ec9b1f6935eb4534d557025343ddcbdabe
MD5 a6cfdb3e02bae4fbcdfde29390e227e2
BLAKE2b-256 7dbb34dcd1d946ef17eac75991fabd95fa15d41a546d7043a614f27fc06cad0c

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