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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file image-text-recognition-0.1.1.tar.gz.
File metadata
- Download URL: image-text-recognition-0.1.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c6a5e3482e6c4997fa26c7eaa51b5ad5e2a219c3f26d04b12df1a556e34ae9c
|
|
| MD5 |
f2b94429a974610a2600fe2c550b3092
|
|
| BLAKE2b-256 |
b82754c6ce79296b2f64cc1c58f13bdc070069340964bd64a23a343a1e3302e5
|
File details
Details for the file image_text_recognition-0.1.1-py3-none-any.whl.
File metadata
- Download URL: image_text_recognition-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e85bbec8f5b9ede741d014ec02a8fad6ccde1b81508156937d579fd173372714
|
|
| MD5 |
a965b91bb5d9cddc0b9a3c76423639ae
|
|
| BLAKE2b-256 |
811f51287e870c8d0b2e75a34005e1a872f8127b8896c812550ff9a90192e5b5
|