--- license: apache-2.0 language: - fa pipeline_tag: image-to-text library_name: paddleocr tags: - ocr - persian - handwriting - paddleocr - pp-ocrv6 - ctc datasets: - Reza2kn/persian-handwriting-pages-3.69m - Reza2kn/persian-printed-ocr-3.5m --- # Bina 0.2 Rizeh Bina 0.2 Rizeh is a compact Persian printed and handwriting recognizer fine-tuned from the `PP-OCRv6_medium_rec` architecture. It uses PaddleOCR's CTC recognition head and ships both the exported inference model and the resumable training checkpoint from the Stage-8 release. ## Important model boundary The neural checkpoint recognizes **text-line or text-region crops**. It is not, by itself, a standalone full-page detector. The full-page benchmark below used the included adaptive75 **two-layer pipeline**: page-region detection and template isolation, CTC recognition of the remaining regions, then reading-order assembly. The scripts used for that exact run are preserved under `pipeline/` and the benchmark records are under `benchmark/`. ## Persian OCR Triple Threat results All 13,338 frozen benchmark rows were scored, with zero missing predictions. Lower is better. Triple Threat is `20% WER + 20% CER + 60% S3`; Overall is a 50/50 macro-average of the printed and handwriting splits. | Split | Pages | WER | CER | S3 | Essential error | Triple Threat | |---|---:|---:|---:|---:|---:|---:| | Handwriting | 6,669 | 19.0833 | 13.6399 | 13.7015 | 14.7567 | 14.7656 | | Printed | 6,669 | 8.9257 | 2.3535 | 9.8512 | 12.0774 | 8.1666 | | Equal-split overall | 13,338 | 14.0045 | 7.9967 | 11.7764 | 13.4171 | **11.4661** | Leaderboard: [Persian OCR Triple Threat](https://huggingface.co/spaces/Reza2kn/PersianOCR-TripleThreat) The release did **not** reach the single-digit handwriting gate. Printed Triple Threat is already single digit; handwriting remains the principal limitation. ## Training snapshot - Stage-8 training mix: 2,198,483 recognition crops. - Mix composition: 1,000,000 clean handwriting, 1,000,000 printed, and 198,483 native/form crops. - Best handwriting validation normalized edit distance: 0.9671727. - Best printed validation normalized edit distance: 0.9071054. - Optimizer state was preserved from Stage 4. - The planned Stage-8 schedule completed without an overfitting stop signal. The source pages came from [`Reza2kn/persian-handwriting-pages-3.69m`](https://huggingface.co/datasets/Reza2kn/persian-handwriting-pages-3.69m) and [`Reza2kn/persian-printed-ocr-3.5m`](https://huggingface.co/datasets/Reza2kn/persian-printed-ocr-3.5m), with line/region preparation and native form replay described by `data/MIX_MANIFEST.json`. ## Inference artifacts The exported Paddle model is available both at repository root and under `inference/`: - `inference.json` - `inference.pdiparams` - `inference.yml` With PaddleOCR 3.x, a recognition crop can be run with the custom model directory: ```python from paddleocr import TextRecognition recognizer = TextRecognition(model_dir="./inference") for result in recognizer.predict(input="persian-line.png", batch_size=1): result.print() ``` For page OCR, use a detector/layout stage first and pass its ordered text crops to this recognizer. The bundled `pipeline/` scripts record the exact full-page benchmark workflow; their original absolute cluster paths must be adapted to a new machine. ## Repository layout - `inference/`: exported Paddle inference graph, parameters, and configuration. - `checkpoint/`: resumable best checkpoint, optimizer state, configs, and eval-gate state. - `pipeline/`: detection, recognition, assembly, benchmark, and launch scripts. - `benchmark/`: exact split metrics, logs, and run summaries. - `data/MIX_MANIFEST.json`: exact Stage-8 train/eval composition. - `RELEASE.json`: immutable release identity and headline metrics. - `SHA256SUMS`: checksums for the verified packaged release. ## Release identity This public model name is **Bina 0.2 Rizeh**. The immutable packaging metadata retains the internal release name `Bina-0.2-RizehPizeh` and release ID `stage8-gate42-20260726` so it remains traceable to the exact trained artifact.