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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytextractor-2.2.3.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.3.tar.gz
Algorithm Hash digest
SHA256 acc48ba54a0ffbfdfba0652cfb5a0ca484a865ee7d56cd515f02d05a4568290c
MD5 ea9ae8fd9c0c24bb55b7b44c43821b87
BLAKE2b-256 d356a8fe1d937575c40201ac2a352676713c5e57d6976e3163b52fa1aef9a619

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytextractor-2.2.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7ea4b45f0358aac71117cd79ee5db3607f038783fa393717d12b4020f0a59105
MD5 5663a387857099a53212255288967339
BLAKE2b-256 7b26fd06dedc914e8c2d1008ce8c98fa22ffad05a7399242c03b6d9e81d0ec14

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