Optical Character Recognition for Mon (mnw) text.
pip install monocr | uv add monocrfrom 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%}")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
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 downloaduv version --bump patch
uv build
git add .
git commit -m "bump version"
git tag v2.2.3
git push origin main --tagsMIT - do whatever you want with it.