Bina-Desktop / README.md
rezkhos's picture
Bina 0.4.2
3fcfad8 verified
|
Raw History Blame Contribute Delete
15.9 kB
---
license: other
license_name: bina-desktop-mit-and-openmdw-1.1
language:
- fa
tags:
- ocr
- persian
- farsi
- handwriting
- windows
- offline
- desktop-app
pipeline_tag: image-text-to-text
base_model: Reza2kn/Bina-0.4-Koochik-ONNX-INT4
---
# بینا ۰٫۴ — خواندن متن فارسی از تصویر، بی‌اینترنت
**[فارسی](#فارسی) · [English](#english)**
![بینا: صفحهٔ اصلی کنار متنی که از آن خوانده شده / Bina: the page next to the text read from it](https://huggingface.co/rezkhos/Bina-Desktop/resolve/main/images/bina-reading.png)
<div dir="rtl">
## فارسی
**بینا** عکس، اسکن و PDF فارسی را، چه چاپی چه دست‌نویس، روی کامپیوتر خودتان به متن قابل ویرایش تبدیل می‌کند. نه اینترنت لازم است، نه حساب کاربری، و هیچ فایلی از کامپیوترتان بیرون نمی‌رود.
صفحه را در برنامه رها کنید؛ بینا آن را می‌خواند و متن را **کنار تصویر اصلی** نشان می‌دهد تا مقایسه، اصلاح و کپی کنید.
بینا رایگان و متن‌باز است، و ساخته شده تا هر کسی، هر جا، بتواند کتاب‌ها، نامه‌ها، یادداشت‌ها و آرشیوهای فارسی را بی‌هزینه و بی‌آنکه سندهایش را به دیگری بسپارد، به متنِ زنده و جست‌وجوپذیر تبدیل کند.
### دانلود
| فایل | اندازه | برای چه کسی |
|---|---|---|
| **[⬇ نصب بینا (Bina-Setup-0.4.2.exe)](https://huggingface.co/rezkhos/Bina-Desktop/resolve/main/Bina-Setup-0.4.2.exe?download=true)** | ۱۶۲۶ مگابایت | همه (ویندوز ۱۰ یا ۱۱ هر نسخه، یا ویندوز ۸٫۱؛ ۶۴ بیتی). پشتیبانی کارت گرافیک انویدیا داخل همین فایل است. |
### نصب
1. فایل نصب بینا را اجرا کنید. دسترسی مدیر (Administrator) لازم نیست.
2. اگر کارت گرافیک انویدیا دارید، گزینهٔ «Use the NVIDIA graphics card» خودش روشن است (درایور ۵۸۰ یا تازه‌تر)؛ فایل جداگانه‌ای لازم نیست.
3. فایل‌های نصب هنوز امضای دیجیتال ندارند؛ اگر ویندوز پیام «Windows protected your PC» داد، روی «More info» و سپس «Run anyway» بزنید.
4. نمونه ندارید؟ در صفحهٔ اول برنامه «نمونه‌ای ندارید؟ صفحه‌های نمونه را امتحان کنید» را بزنید.
### امکانات
- عکس (JPG، PNG، WEBP، TIFF، BMP) و PDF چندصفحه‌ای؛ چسباندن عکس با Ctrl+V
- فارسی چاپی و دست‌نویس
- متن و تصویر کنار هم، با بزرگ‌نمایی و نمایش تمام‌صفحه برای بررسی سطر به سطر
- نمایش زندهٔ متن هنگام خواندن؛ توقف و خواندن دوباره در هر لحظه
- کپی، یا ذخیره به‌صورت فایل متنی (یک فایل یا همه با هم)
- **۱۲ صفحهٔ نمونه** داخل برنامه، هر کدام با متن درست؛ بینا پس از خواندن می‌گوید چند درصد نویسه‌ها را درست خوانده است
- **کارت گرافیک انویدیا** (با بستهٔ کارت گرافیک): بینا کارت را هنگام شروع می‌آزماید و فقط اگر نتیجه درست بود از آن استفاده می‌کند؛ وگرنه با پردازنده می‌خواند. تنظیمات ← «کارت گرافیک»: خودکار یا فقط پردازنده
- رابط کاملاً فارسی و راست‌به‌چپ؛ پوستهٔ روشن، تیره یا هماهنگ با ویندوز
| صفحهٔ شروع | تنظیمات |
|---|---|
| ![صفحهٔ شروع بینا](https://huggingface.co/rezkhos/Bina-Desktop/resolve/main/images/bina-start.png) | ![تنظیمات بینا](https://huggingface.co/rezkhos/Bina-Desktop/resolve/main/images/bina-settings.png) |
### دقت روی نمونه‌های داخل برنامه
درستی = درصد نویسه‌هایی که درست خوانده شده‌اند (ی/ک عربی و فارسی یکسان، بدون اعراب و فاصله‌های اضافه). صفحه‌های دست‌نویس از بخش آزمونِ داده‌اند که در آموزش مدل نبوده است.
| نوع | تعداد | درستی |
|---|---|---|
| چاپی (متن امروزی، عکس گوشی از آن، PDF دوصفحه‌ای) | ۳ | ۹۹٫۷ تا ۹۹٫۸٪ |
| شعر چاپی دوستونی با اعراب | ۱ | ۹۳٫۸٪ |
| دست‌نویس (کاغذ سفید و زرد، برگهٔ امتحان، عکس دفتر، فرم کم‌نور) | ۵ | ۹۷٫۳ تا ۱۰۰٪ |
| جدول دست‌نویس (کارنامه) | ۱ | ۶۵٫۶٪ |
| شعر نستعلیق ساختگی، یک‌ستونی / دوستونی | ۲ | ۹۱٫۰٪ / ۶۳٫۳٪ |
**محدودیت‌ها:** در جدول‌ها، شعرهای دوستونی و صفحه‌های پیچیده، واژه‌ها بیشتر درست‌اند ولی ترتیب خواندن ممکن است به هم بریزد. نستعلیق دست‌نویس واقعی هنوز دشوارتر است.
### سرعت و نیازها
روی لپ‌تاپی با پردازندهٔ Core i7-13650HX، ۱۶ گیگابایت حافظه و کارت RTX 3050:
- هر صفحهٔ کتاب: با پردازنده ۴۵ تا ۶۰ ثانیه؛ با کارت گرافیک حدود ۱۱ ثانیه. متن در هر دو حالت **دقیقاً یکسان** است.
- آماده شدن برنامه: ۹ تا ۱۷ ثانیه (با کارت گرافیک بار اول پس از نصب تا ۹۰ ثانیه)
- حافظه هنگام کار: حدود ۲٫۳ تا ۲٫۷ گیگابایت؛ با بستن پنجره همه آزاد می‌شود
- ویندوز ۱۰ یا ۱۱ (هر نسخه)، یا ویندوز ۸٫۱؛ ۶۴ بیتی. روی ویندوز ۸٫۱ برنامه در Edge باز می‌شود (پنجرهٔ خود برنامه آنجا اجرا نمی‌شود) و کارت گرافیک استفاده نمی‌شود. ویندوز ۷، ۸ و ۳۲ بیتی پشتیبانی نمی‌شوند.
- ۸ گیگابایت حافظه پیشنهاد می‌شود؛ حدود ۱٫۸ گیگابایت فضای دیسک (با کارت گرافیک ۱٫۴ گیگابایت بیشتر)
### حریم خصوصی
بینا به اینترنت وصل نمی‌شود. موتور برنامه فقط روی همین کامپیوتر (127.0.0.1) کار می‌کند و پنجره هر درخواستی جز آن را می‌بندد. هیچ آمار، به‌روزرسانی خودکار یا گزارشی بیرون نمی‌رود. کد برنامه باز است و هر کسی می‌تواند این را بررسی کند.
### مدل
بینا ۰٫۴ از مدل **[Bina-0.4-Koochik](https://huggingface.co/Reza2kn/Bina-0.4-Koochik-ONNX-INT4)** ساختهٔ **[رضا سیار](https://huggingface.co/Reza2kn)** استفاده می‌کند (نسخهٔ ONNX با کوانتش ۴ بیتی، مجوز OpenMDW-1.1).
### کد منبع و مجوز
- **[⬇ کد منبع (Bina-Desktop-0.4.2-source.zip)](https://huggingface.co/rezkhos/Bina-Desktop/resolve/main/Bina-Desktop-0.4.2-source.zip?download=true)**: کل برنامه با مجوز آزاد MIT. راهنمای ساخت در `AGENTS.md`.
- برنامه: MIT، © ۲۰۲۶ خسرو رضا · مدل: OpenMDW-1.1، رضا سیار · اجزای دیگر: هر کدام مجوز آزاد خود (`NOTICE.txt`)
- طراحی و توسعه: **[خسرو رضا](https://huggingface.co/rezkhos)** · مدل: **[رضا سیار](https://huggingface.co/Reza2kn)** · نمونه‌های دست‌نویس: مجموعهٔ آزاد [Persian Handwriting Pages](https://huggingface.co/datasets/Reza2kn/persian-handwriting-pages-3.69m) (ساخته از واژه‌های دست‌نویس واقعیِ مجموعهٔ طاها گرجی)
</div>
---
## English
**Bina** turns photos, scans and PDFs of Persian text, printed or handwritten, into editable text on your own computer. There is no internet connection, no account and no upload. Your files never leave the machine.
Drop in a page and Bina reads it, then shows the text **next to the original page** so you can compare, correct and copy it.
Bina is free and open source. It is made so that anyone, anywhere, can turn Persian books, letters, notes and archives into living, searchable text without paying, without an account, and without giving their documents away.
## Download
| File | Size | Who needs it |
|---|---|---|
| **[⬇ Bina-Setup-0.4.2.exe](https://huggingface.co/rezkhos/Bina-Desktop/resolve/main/Bina-Setup-0.4.2.exe?download=true)** | 1626 MB | Everyone (Windows 10 / 11 any version, or Windows 8.1; 64-bit). NVIDIA graphics card support is included. |
**Install:** run `Bina-Setup-0.4.2.exe`. No administrator rights are needed (it installs for your user only). If you have an NVIDIA card, the option "Use the NVIDIA graphics card" is already ticked; there is no separate pack any more. The installers are not code-signed yet, so Windows SmartScreen may show "Windows protected your PC". Click **More info → Run anyway**.
<details><summary>Verify the downloads (optional)</summary>
In PowerShell: `Get-FileHash .\Bina-Setup-0.4.2.exe`. The result should match `SHA256SUMS.txt`:
```
86adb8d99413783f026091ec06021db12df7b2130afe33e9059dde12157419e1 Bina-Setup-0.4.2.exe
```
</details>
## Features
- Images (JPG, PNG, WEBP, TIFF, BMP) and multi-page PDFs, plus pasting a screenshot with Ctrl+V
- Printed and handwritten Persian
- Text and page side by side, with zoom and a full-screen view, to check every line
- Live text as it is being read; stop at any time and read again
- Copy, or save as UTF-8 `.txt` (one file, or all files together)
- **12 built-in sample pages** (printed, a phone photo, a PDF, poetry, handwriting, Nastaliq), each with its true text, so Bina shows how many characters it read correctly
- **NVIDIA graphics card support** (NVIDIA card): Bina tests the card at start-up and uses it only if it gives correct results; otherwise it reads on the processor. Settings → «کارت گرافیک»: automatic or processor only
- Persian right-to-left interface; light, dark, or follow Windows
| Start screen | Settings |
|---|---|
| ![Bina start screen](https://huggingface.co/rezkhos/Bina-Desktop/resolve/main/images/bina-start.png) | ![Bina settings](https://huggingface.co/rezkhos/Bina-Desktop/resolve/main/images/bina-settings.png) |
## Accuracy on the built-in samples
Character accuracy = 1 − character edits ÷ length of the true text (Arabic ي/ك matched to Persian ی/ک, diacritics and spacing ignored). The handwritten pages are from the held-out test split, which was not used for training.
| Kind | Pages | Characters correct |
|---|---|---|
| Printed (modern text, a phone photo of it, a 2-page PDF) | 3 | 99.7 – 99.8% |
| Printed poetry in two columns, with diacritics | 1 | 93.8% |
| Handwriting (plain and yellow paper, exam sheet, photographed notebook, dim office form) | 5 | 97.3 – 100% |
| Handwritten table (report card) | 1 | 65.6% |
| Synthetic Nastaliq poetry, one column / two columns | 2 | 91.0% / 63.3% |
**Known limits:** tables, two-column poetry and other complex layouts can come out out of order or incomplete. The words are mostly right but the reading order breaks. Real hand-copied Nastaliq is harder still.
## Speed and system requirements
Measured on a laptop with an Intel Core i7-13650HX, 16 GB of memory and an NVIDIA RTX 3050 6 GB:
| | Processor (CPU) | NVIDIA graphics card |
|---|---|---|
| One book page | 45 – 60 s | about 11 s |
| Start-up | 9 – 17 s | about 10 s (up to 90 s the first time after installing) |
| Memory while open | about 2.3 GB | |
The text is identical on the processor and on the graphics card.
- Windows 10 or 11 (any version) or Windows 8.1, 64-bit; 8 GB of memory recommended. On Windows 8.1 Bina opens in Edge (its own window needs Windows 10) and reads on the processor. Not supported: Windows 7, Windows 8, 32-bit Windows
- Disk: about 1.8 GB, plus 1.4 GB with the graphics card part
- Graphics card: an NVIDIA card with a recent driver (version 580 or newer). Other graphics cards are not used; Bina reads on the processor instead
## Model
Bina 0.4 uses **[Bina-0.4-Koochik ONNX INT4](https://huggingface.co/Reza2kn/Bina-0.4-Koochik-ONNX-INT4)** (4-bit GPTQ, groups of 32), a Persian full-page OCR model developed by **[Reza Sayar](https://huggingface.co/Reza2kn)** and derived from NVIDIA Nemotron Parse. It is released under the **OpenMDW-1.1** licence; the full text is installed with the program (`model\LICENSE`). Bina runs the model with its own tested runner, unchanged.
## Source code
**[⬇ Bina-Desktop-0.4.2-source.zip](https://huggingface.co/rezkhos/Bina-Desktop/resolve/main/Bina-Desktop-0.4.2-source.zip?download=true)** (MIT): the whole app: the Electron window, the Python engine, the installer scripts, the GPU pack build and the sample pages. Start with `AGENTS.md`; build with `python installer/build.py`. To try another model folder without rebuilding, use Settings → Model.
## Credits
- Application: designed and developed by **[Khosrow Reza](https://huggingface.co/rezkhos)**
- OCR model: **Reza Sayar** ([Bina-0.4-Koochik](https://huggingface.co/Reza2kn/Bina-0.4-Koochik))
- Sample handwriting: [Persian Handwriting Pages](https://huggingface.co/datasets/Reza2kn/persian-handwriting-pages-3.69m) (CC-BY-SA-3.0), built from the real handwritten words of Taha Gorji's Persian Word Handwritten Dataset
- Built with Python, PyTorch, Hugging Face Transformers, ONNX Runtime, Electron, PDFium and the Vazirmatn font; the GPU pack adds the NVIDIA CUDA and cuDNN runtime libraries. Each keeps its own licence (`NOTICE.txt`, `gpu\licenses`)
## Privacy
Bina makes no network connections. The engine listens only on 127.0.0.1 (this computer), and the window blocks every request that is not to that engine. No telemetry, no update checks, and no logs leave the computer.
## Licence
- **Bina application** (the program around the model): MIT licence, © 2026 Khosrow Reza. See `LICENSE`.
- **Bina-0.4-Koochik model** (bundled): OpenMDW-1.1, by Reza Sayar. It is not covered by the MIT licence (`model\LICENSE` in the install folder).
- Other components keep their own open licences (`NOTICE.txt`).
## Changes
- **0.4.2** (2026-10-31): works on more PCs. Microsoft's C++ runtime is now inside Bina (on some PCs the engine stopped with «ارتباط با موتور قطع شد» because their own copy was missing or old). While reading, the window shows each step and says when the computer is slow; nothing waits forever (a stuck page or start is stopped with a plain reason); if the engine stops, the window says why (old processor, low memory). Settings explains why a graphics card is not used (card or driver too old); the setup offers the GPU part only for driver 580 or newer.
- **0.4.1** (2026-10-29): one setup with the NVIDIA part inside; installs on every Windows 10 and Windows 8.1.
- **0.4.0** (2026-10-29): optional NVIDIA GPU pack; built-in sample pages with accuracy; Settings → graphics card.
- **0.3.0**: new model, Bina-0.4-Koochik ONNX INT4 (about 2.5× faster than 0.3 on the CPU).
- **0.1.1**: first public version (Bina-0.3-Koochik).