A privacy-focused, in-browser OCR tool for the Mon language (mnw), built with Rust and WebAssembly.
MonOCR Web brings optical character recognition for the Mon script directly to the browser. By leveraging ONNX Runtime Web and a custom Wasm backend, it performs all processing locally on the user's device. This ensures zero data latency and complete privacy—no images are ever sent to a server.
- Local Processing: Runs entirely in the browser using WebAssembly.
- Privacy First: No data collection or server-side processing.
- High Performance: Optimized CRNN models via ONNX Runtime.
- Mon Language Support: Specialized for recognizing Mon script.
- Hugging Face Models (CKPT, ONNX, TFLite, RTen)
pnpm installTo run locally, we need to copy the pre-built ONNX Runtime WASM files from node_modules to static/wasm/.
pnpm run copy-wasmpnpm dev
# Note: This automatically runs copy-wasm before startingTo create a production build (static site):
pnpm buildNote: The build script automatically removes the large monocr.onnx model from the output to comply with Cloudflare's 25MB asset limit. In production, the model is fetched directly from Hugging Face.
This project is optimized for Cloudflare Pages.
- Build Command:
pnpm build - Output Directory:
build - WASM Assets: Included automatically via
static/wasm/(ensure these are committed to git). - Model: Served from Hugging Face (configured in
src/lib/config.ts).
If you have wrangler installed/configured:
npx wrangler deploy(This uses the wrangler.json configuration to deploy the build folder).
MIT