Bina 0.2 Rizeh is the Medium member of the Bina 0.2 Persian OCR family. It uses the PP-OCRv6_medium_rec CTC recognition architecture and contains 35,578,883 parameters (35.579M). The model targets Persian handwriting and printed text; preserving unrelated-language quality was not a training goal.
This is a complete recognizer release, not a loose checkpoint: exported inference graph and weights, preprocessing/postprocessing configuration with the embedded Persian character dictionary, best training checkpoint, benchmark provenance, portable logical-order inference wrappers, and an offline full-page detector are included.
python bina_text_recognition.py line.jpg --device cpu
See QUICKSTART.md for CPU, NVIDIA, Python, image, and PDF examples in English and Persian.
What is self-contained?
inference/ is the exported Bina text recognizer.
detector/ is the pinned official PaddlePaddle/PP-OCRv6_medium_det release used for portable full-page OCR.
bina_text_recognition.py performs logical-order Persian line recognition.
bina_page_ocr.py detects, recognizes, orders, and emits full-page JSON without downloading model weights.
checkpoint/, benchmark/, MODEL_PROVENANCE.json, and SHA256SUMS make the release auditable and reusable for continued fine-tuning.
The frozen benchmark used a more specialized adaptive75 two-layer form/template pipeline. The portable full-page CLI is designed for general pages and is not claimed to reproduce that specialized layout isolation exactly.
Persian OCR Triple Threat
All models were evaluated on the same frozen 6,669 printed + 6,669 handwriting rows, with zero missing predictions. Lower is better. Triple Threat is 0.2 × WER + 0.2 × CER + 0.6 × S³; overall is the equal split macro-average.
The recognizer works best on horizontal, content-tight line crops. Its exported inference.yml is authoritative for resize/padding and the 161-symbol dictionary. The wrappers convert PaddleOCR visual-order Arabic output to logical Persian order while preserving Latin/numeric runs.
The full-page CLI emits JSON with assembled text plus every recognized line, box, confidence score, and raw visual-order output. For complex forms, grids, multi-column layouts, or exact benchmark reproduction, use the preserved specialized pipeline and layout stages rather than assuming generic detection has perfect reading order.
Limitations
Persian-focused; other languages were not preserved or benchmarked.
Handwriting remains harder than printed text, especially for the smaller siblings.
Generic page detection may need layout-specific reading-order logic for forms and multi-column documents.
Confidence scores are model scores, not calibrated probabilities.
The benchmark measures the bundled family pipeline and should not be interpreted as universal document accuracy.
فارسی
Bina 0.2 Rizeh عضو متوسط خانواده OCR فارسی Bina 0.2 است و 35.579 میلیون پارامتر دارد. این مخزن فقط یک checkpoint نیست: مدل inference، تنظیمات و واژهنامه کاراکتری، checkpoint آموزش، آشکارساز صفحه، اسکریپت خط و صفحه کامل، نتایج دقیق benchmark و checksumها همگی داخل مخزن هستند.
اجرای سریع CPU:
bash
1python -m pip install"paddlepaddle>=3.2,<4""paddleocr>=3.3,<4"2python bina_page_ocr.py page.jpg --device cpu --output result.json
برای GPU نسخه PaddlePaddle سازگار با CUDA را نصب کنید و --device gpu:0 بدهید. برای یک خط بریدهشده از bina_text_recognition.py استفاده کنید. خروجی فارسی به ترتیب منطقی خواندن برگردانده میشود. جزئیات بیشتر در QUICKSTART.md آمده است.
License
Apache-2.0. The bundled detector is the official Apache-2.0 PaddlePaddle/PP-OCRv6_medium_det artifact pinned in detector/SOURCE.json.