--- license: mit language: - mnw library_name: generic pipeline_tag: image-to-text tags: - ocr - mon - resnet - crnn - tflite - onnx metrics: - cer --- # MonOCR (mnw) - Optical Character Recognition for Mon Language **MonOCR** is an efficient and robust OCR model designed specifically for the Mon language (mnw). It utilizes a ResNet-18 backbone combined with BiLSTM layers and CTC loss for character recognition. This repository serves as the official hub for MonOCR model weights, providing multiple deployment formats including PyTorch, ONNX, and TFLite. ## Model Formats | Format | Path | Size | Recommended Use Case | | :--------------------- | :---------------------- | :----- | :--------------------------- | | **PyTorch** | `pytorch/monocr.ckpt` | 166 MB | Research, Fine-tuning | | **ONNX** | `onnx/monocr.onnx` | 56 MB | Server/Desktop Inference | | **TFLite (Quantized)** | `tflite/monocr.tflite` | 14 MB | **Mobile & Edge Deployment** | | **TFLite (float16)** | `tflite/float16.tflite` | 28 MB | High-efficiency mobile | | **TFLite (float32)** | `tflite/float32.tflite` | 56 MB | High-precision mobile | ## Quick Start ### Python (Inference) The easiest way to use the model is with our [universal Python bindings](https://github.com/janakh/monocr-onnx): ```bash pip install monocr-onnx monocr-download --dest model ``` ```python from monocr_onnx import MonOCR ocr = MonOCR("model/onnx/monocr.onnx", "model/charset.txt") text = ocr.predict("image.jpg") print(text) ``` ## Training Details - **Architecture**: ResNet-18 + BiLSTM (2 layers, 256 hidden units) + Linear Head. - **Input Size**: Grayscale, Height 64, Variable Width. - **Dataset**: 1,000,000 synthetic samples generated from Mon news corpora. - **Final Metrics**: - Validation Loss: 0.05 - Validation CER: ~0.02 (2% Character Error Rate) ## Repository Structure ``` . ├── charset.txt # Character mapping (224 characters) ├── monocr.json # Model metadata & configuration ├── pytorch/ # PyTorch Lightning Checkpoints ├── onnx/ # ONNX exports (Dynamic width) └── tflite/ # TFLite variants (Quantized & Float) ``` ## Usage & Integration For native bindings in **Go, JavaScript, and Rust**, please visit the [monocr-onnx](https://github.com/janakh/monocr-onnx) repository. ## Citation & License If you use this model in your project, please cite: ```bibtex @software{monocr2026, author = {Janakh}, title = {MonOCR: Production-Ready OCR for Mon Language}, version = {1.0.0}, year = {2026} } ``` This model is released under the **MIT License**.