A Python library for OCR
Project description
Dulu
Dulu is a small python library for doing OCR on image. Under the hood it uses florence model from microsoft, which is a state of the art vision model for many downstream tasks including OCR.
Installation
pip install dulu
Example Code
Here is a snippet of the code used in the notebook:
from dulu import OCR
from PIL import Image
# Load the image
image = Image.open("./sample_image.png")
image
# Initialize the OCR object
ocr = OCR()
# Recognize text without bounding boxes
text = ocr.recognize_text("./sample_image.png", bbox=False)
print(text)
# Recognize text with bounding boxes
text_with_bbox = ocr.recognize_text("./sample_image.png")
print(text_with_bbox)
Acknowledgments
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
dulu-0.1.1.tar.gz
(6.8 kB
view details)
Built Distribution
dulu-0.1.1-py3-none-any.whl
(5.7 kB
view details)
File details
Details for the file dulu-0.1.1.tar.gz
.
File metadata
- Download URL: dulu-0.1.1.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 894950f8e594fa1b0533930b7946fd6f14ffde3352c01d82669d856c465b7f73 |
|
MD5 | 6dd6d5e0bd6ed19931e121dcb24e6839 |
|
BLAKE2b-256 | d656dd7c8e7f9e0b21274bd76c81b405d9ce6c42d3b7374b629a05c8da00106e |
File details
Details for the file dulu-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: dulu-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7649e429154ec78418076d51d60564fde5c36a40138ccfc376e7b7547e515bf0 |
|
MD5 | 624543a970cb04bd2743e82d86be7b8e |
|
BLAKE2b-256 | e79d6ab52535e6326ffc5c00b1307fb2de63922ebd139bcaf245356ac705a027 |