Skip to main content

Optical Character Recognition for Mon text

Project description

Mon OCR

Optical Character Recognition for Mon (mnw) text.

Installation

pip install monocr | uv add monocr

Quick Start

Python Usage

from monocr import MonOCR

# Initialize
model = MonOCR()

# 1. Read an Image
text = model.read_text("image.png")
print(text)

# 2. Read with Confidence
result = model.predict_with_confidence("image.png")
print(f"Text: {result['text']}")
print(f"Confidence: {result['confidence']:.2%}")

Examples

See the examples/ folder to learn more.

  • examples/run_ocr.py: A complete script that can process a folder of images or read a full PDF book.

CLI Usage

You can also use the command line interface:

# Process a single image
monocr read image.png

# Process a folder of images
monocr batch folder/path

# Manually download the model
monocr download

Related Tools

License

MIT - do whatever you want with it.

Dev Setup

git clone git@github.com:janakhpon/monocr.git
cd monocr
uv sync --dev

Update Model in Hugging Face

To update the model weights:

hf auth login
hf upload janakhpon/monocr path/to/model_dir --repo-type model

Release Workflow

uv version --bump patch
uv build
git add .
git commit -m "bump version"
git tag v0.1.17
git push origin main --tags

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

monocr-0.1.17.tar.gz (107.2 kB view details)

Uploaded Source

Built Distribution

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

monocr-0.1.17-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file monocr-0.1.17.tar.gz.

File metadata

  • Download URL: monocr-0.1.17.tar.gz
  • Upload date:
  • Size: 107.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for monocr-0.1.17.tar.gz
Algorithm Hash digest
SHA256 58176486f499b4dadc2ab06351c298449f6d6ff669882a8f0375584cdaf5f62a
MD5 ecf752373e10ca0318a37fee866cbb4a
BLAKE2b-256 5014ba57b0c1647917d587663d0089cc00a859b9b0193965dd59b0ca69e0cf09

See more details on using hashes here.

File details

Details for the file monocr-0.1.17-py3-none-any.whl.

File metadata

  • Download URL: monocr-0.1.17-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for monocr-0.1.17-py3-none-any.whl
Algorithm Hash digest
SHA256 449c1be8b74b63f5210abccfa295405798e18f8584997f3601737bbb3f811e10
MD5 52dcebf25bc6c2e15ee7f8da08972d90
BLAKE2b-256 936341f5c66ea0454f4ffcfc42b55792d36061f29765fa910c24cb310559bea2

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