Reza2kn/Bina-0.4-Microscopy
A compact Persian OCR model
2 min read
A compact optical character recognition (OCR) system for the Persian language with an architecture of only 9.55 million parameters. The model is capable of processing entire pages, individual fragments, handwritten text, forms, screenshots, newspapers, and mathematical formulas, accepting images or PDF files as input. The main feature of the development is that it works efficiently locally on a regular CPU laptop, delivering results in less than a second per page and outperforming many larger open-source alternatives in quality.
Key features
- Ultra-compact: Only 9.55M parameters, allowing the model to run without a graphics card.
- High speed: Processing a single page takes about 0.78 seconds on a standard processor.
- Wide coverage: Recognition of printed text, handwritten notes, forms, screenshots, and tables.
- Excellent metrics: Surpasses most open-source models on a specialized benchmark of 193 samples.
What you can do
- Document digitization: Batch process scans of books, letters, and forms in Persian directly on a local computer.
- Utility integration: Embed the model into lightweight scripts or bots for instant text extraction from screenshots.
- PDF conversion: Automatically convert multi-page PDF documents into text files and JSON with line layout.
Example
Running document recognition from the command line:
pip install -r requirements.txt
python microscopy.py examples/demo.png --out results
python microscopy.py scan1.jpg letter.pdf --out resultsRead more
DetailsBenchmarks: Overall CER error on 193 crops is 19.08%
Hardware: The detector runs on CPU via ONNX Runtime, and the recognizer supports GPU
Architecture: A two-stage system consisting of lightweight detectors and a 19-block CTC reader
Limitations: Struggles with complex tables and some service symbols (+, <, >)










Comments