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.- Or a demo notebook to play around with the package
notebooks/demo.ipynb
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
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.18
git push origin main --tags
License
MIT - do whatever you want with it.
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
monocr-0.1.19.tar.gz
(106.2 kB
view details)
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
monocr-0.1.19-py3-none-any.whl
(13.1 kB
view details)
File details
Details for the file monocr-0.1.19.tar.gz.
File metadata
- Download URL: monocr-0.1.19.tar.gz
- Upload date:
- Size: 106.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f9c48dff9246ab3f94c8ce9eddacd4ae411fe2bc7777eb3b8d55572dad926b4
|
|
| MD5 |
c5f2cd271ed574d9567964a69ec19ea2
|
|
| BLAKE2b-256 |
a911ba97d395a0510f440f98f55d62c4546330cbc2d854b3c70ce67528553521
|
File details
Details for the file monocr-0.1.19-py3-none-any.whl.
File metadata
- Download URL: monocr-0.1.19-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
912d20466a72af941afc03227c8b6c243bbf1620faf1c7ac2bf4e337adb785ba
|
|
| MD5 |
2ab9b407d349ee3d700598febaf4e32a
|
|
| BLAKE2b-256 |
a334c9f1e5d3906ef596cbc27405652425ee9b5987f953e4dd2c7376d44308e0
|