Skip to main content

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.2.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

dulu-0.1.2-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file dulu-0.1.2.tar.gz.

File metadata

  • Download URL: dulu-0.1.2.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

Hashes for dulu-0.1.2.tar.gz
Algorithm Hash digest
SHA256 dddda8f9b2ab9f212c6d3dd02cedb976acbf29c9790713b67d7c0d2028b1a948
MD5 1a375a2ec292c49cd3772342aba3ec65
BLAKE2b-256 28dc38954dd7a99847d5a04b04f42890fcf894d7cd4012b6e73c9446d17d8475

See more details on using hashes here.

File details

Details for the file dulu-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: dulu-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for dulu-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f257a977ec0b8462bd32be4914fb2dfffc514a1a2678a6c178d6f3015e52b6b2
MD5 df91c1787b82f8e6d403de14d8bc2834
BLAKE2b-256 2b0337ea4d9e1be7a0e77a8b8d92d9240901094cf9efbe70151cdcfd1de45257

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page