Skip to main content

A package for recognizing and evaluating text in images

Project description

A Python package for recognizing and evaluating text in images.

Installation

pip install image-text-recognition

Usage

from image_text_recognition import ImageTextRecognizer, evaluate_model, generate_test_images

# Recognize text in an image
recognizer = ImageTextRecognizer()
image_path = "path/to/your/image.jpg"
results = recognizer.recognize_text(image_path)

for bbox, text, probability in results:
    print(f"Text: {text}, Probability: {probability}")

# Generate test images
test_texts = ["Hello World", "Python Code", "OpenCV"]
generate_test_images("test_images", test_texts)

# Evaluate the model
ground_truth = {
    "test1.jpg": "Hello World",
    "test2.jpg": "Python Code",
    "test3.jpg": "OpenCV"
}
evaluation_results = evaluate_model("test_images", ground_truth)
print(evaluation_results)

License

This project is licensed under the MIT License.

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

image-text-recognition-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

image_text_recognition-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file image-text-recognition-0.1.0.tar.gz.

File metadata

  • Download URL: image-text-recognition-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.0

File hashes

Hashes for image-text-recognition-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b66b61e77396736da39934d7d9d6a405c184724a70544661534a577914ccaaa9
MD5 9405c57c3dcb8c3846fa6692033f1199
BLAKE2b-256 fba6d0d0f58f2e26bd71d972fecb5109aeda5a3c9bed9842ddbb49678f8a2254

See more details on using hashes here.

File details

Details for the file image_text_recognition-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for image_text_recognition-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e7e3e64a91c23e7d82b472f1a0476dfe62c66ac4ae8cece11e256f0a16b1703
MD5 245bbfa771e43e0749ee89a676cba295
BLAKE2b-256 31a3812023ad75c58afc06064df3ba8d18cfc79945d83d807d0ce87bed5f4b91

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