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:
# 1. Login to HF
hf auth login
# 2. Upload from your local model folder
hf upload janakhpon/monocr path/to/model_dir --repo-type model
Release Workflow
uv version --bump patch
git add .
git commit -m "bump version"
git tag v0.1.16
git push origin main --tags
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.16.tar.gz
(107.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.16-py3-none-any.whl
(14.4 kB
view details)
File details
Details for the file monocr-0.1.16.tar.gz.
File metadata
- Download URL: monocr-0.1.16.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3c6e460605db245f145a203bd15514d12679462a217d5df22a896bba83906e6
|
|
| MD5 |
4c660ad7bc8ad0539fda17f84001bdde
|
|
| BLAKE2b-256 |
984e48d3078c6f77d10fa36dcf17439f16fc95bafd99266a7814ba8c133d3b97
|
File details
Details for the file monocr-0.1.16-py3-none-any.whl.
File metadata
- Download URL: monocr-0.1.16-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
590b91284c9e83221c134963acf1465818a5d66f39dfa6ae8d55824c936f81e1
|
|
| MD5 |
a968a51580dede662e140c8a0402859f
|
|
| BLAKE2b-256 |
143a22f4a19249b27d207f4553f234c60c0d4eb189567a0548e8f81c77dd0145
|