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.0.tar.gz (90.7 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.0-py3-none-any.whl (89.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytextractor-2.2.0.tar.gz
  • Upload date:
  • Size: 90.7 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.0.tar.gz
Algorithm Hash digest
SHA256 c1617600d4cb436a4782e3c5206d4c779e4e44d4b349519c4223f8ae4281efad
MD5 78d18d570e813633b1003e516a06afc2
BLAKE2b-256 33be5e9bfb25f43a8b2db558d10016346b1bb357e7e7815394ffdad24965aaf8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytextractor-2.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 565babea8e8e1d1bf1630ffed72255fdcbd6a12fb250481ce561a0977d5c30eb
MD5 d0fe51b1185efb2198b10c943578f172
BLAKE2b-256 b3c1d9261ec37b58ba6de60336a8dafa33aaeae8936d04e7361754c58bf2d67f

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