Bina-Desktop / README.md
rezkhos's picture
Bina 0.4.0 (docs)
d6ce269 verified
|
Raw History Blame Contribute Delete
14.9 kB
metadata
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

بینا: صفحهٔ اصلی کنار متنی که از آن خوانده شده / Bina: the page next to the text read from it

فارسی

بینا عکس، اسکن و PDF فارسی را، چه چاپی چه دست‌نویس، روی کامپیوتر خودتان به متن قابل ویرایش تبدیل می‌کند. نه اینترنت لازم است، نه حساب کاربری، و هیچ فایلی از کامپیوترتان بیرون نمی‌رود. صفحه را در برنامه رها کنید؛ بینا آن را می‌خواند و متن را کنار تصویر اصلی نشان می‌دهد تا مقایسه، اصلاح و کپی کنید.

بینا رایگان و متن‌باز است، و ساخته شده تا هر کسی، هر جا، بتواند کتاب‌ها، نامه‌ها، یادداشت‌ها و آرشیوهای فارسی را بی‌هزینه و بی‌آنکه سندهایش را به دیگری بسپارد، به متنِ زنده و جست‌وجوپذیر تبدیل کند.

دانلود

فایل اندازه برای چه کسی
⬇ نصب بینا (Bina-Setup-0.4.0.exe) ۷۴۳ مگابایت همه (ویندوز ۱۰ نسخهٔ 1809 به بعد، یا ویندوز ۱۱؛ ۶۴ بیتی)
⬇ بستهٔ کارت گرافیک (Bina-GPU-Pack-0.4.0.exe) ۸۸۵ مگابایت اختیاری؛ فقط اگر کارت گرافیک انویدیا دارید (حدود ۴ برابر سریع‌تر)

نصب

  1. فایل نصب بینا را اجرا کنید. دسترسی مدیر (Administrator) لازم نیست.
  2. اگر کارت گرافیک انویدیا دارید، بعد از آن بستهٔ کارت گرافیک را هم نصب کنید (درایور انویدیا نسخهٔ ۵۸۰ یا تازه‌تر).
  3. فایل‌های نصب هنوز امضای دیجیتال ندارند؛ اگر ویندوز پیام «Windows protected your PC» داد، روی «More info» و سپس «Run anyway» بزنید.
  4. نمونه ندارید؟ در صفحهٔ اول برنامه «نمونه‌ای ندارید؟ صفحه‌های نمونه را امتحان کنید» را بزنید.

امکانات

  • عکس (JPG، PNG، WEBP، TIFF، BMP) و PDF چندصفحه‌ای؛ چسباندن عکس با Ctrl+V
  • فارسی چاپی و دست‌نویس
  • متن و تصویر کنار هم، با بزرگ‌نمایی و نمایش تمام‌صفحه برای بررسی سطر به سطر
  • نمایش زندهٔ متن هنگام خواندن؛ توقف و خواندن دوباره در هر لحظه
  • کپی، یا ذخیره به‌صورت فایل متنی (یک فایل یا همه با هم)
  • ۱۲ صفحهٔ نمونه داخل برنامه، هر کدام با متن درست؛ بینا پس از خواندن می‌گوید چند درصد نویسه‌ها را درست خوانده است
  • کارت گرافیک انویدیا (با بستهٔ کارت گرافیک): بینا کارت را هنگام شروع می‌آزماید و فقط اگر نتیجه درست بود از آن استفاده می‌کند؛ وگرنه با پردازنده می‌خواند. تنظیمات ← «کارت گرافیک»: خودکار یا فقط پردازنده
  • رابط کاملاً فارسی و راست‌به‌چپ؛ پوستهٔ روشن، تیره یا هماهنگ با ویندوز
صفحهٔ شروع تنظیمات
صفحهٔ شروع بینا تنظیمات بینا

دقت روی نمونه‌های داخل برنامه

درستی = درصد نویسه‌هایی که درست خوانده شده‌اند (ی/ک عربی و فارسی یکسان، بدون اعراب و فاصله‌های اضافه). صفحه‌های دست‌نویس از بخش آزمونِ داده‌اند که در آموزش مدل نبوده است.

نوع تعداد درستی
چاپی (متن امروزی، عکس گوشی از آن، PDF دوصفحه‌ای) ۳ ۹۹٫۷ تا ۹۹٫۸٪
شعر چاپی دوستونی با اعراب ۱ ۹۳٫۸٪
دست‌نویس (کاغذ سفید و زرد، برگهٔ امتحان، عکس دفتر، فرم کم‌نور) ۵ ۹۷٫۳ تا ۱۰۰٪
جدول دست‌نویس (کارنامه) ۱ ۶۵٫۶٪
شعر نستعلیق ساختگی، یک‌ستونی / دوستونی ۲ ۹۱٫۰٪ / ۶۳٫۳٪

محدودیت‌ها: در جدول‌ها، شعرهای دوستونی و صفحه‌های پیچیده، واژه‌ها بیشتر درست‌اند ولی ترتیب خواندن ممکن است به هم بریزد. نستعلیق دست‌نویس واقعی هنوز دشوارتر است.

سرعت و نیازها

روی لپ‌تاپی با پردازندهٔ Core i7-13650HX، ۱۶ گیگابایت حافظه و کارت RTX 3050:

  • هر صفحهٔ کتاب: با پردازنده ۴۵ تا ۶۰ ثانیه؛ با کارت گرافیک حدود ۱۱ ثانیه. متن در هر دو حالت دقیقاً یکسان است.
  • آماده شدن برنامه: ۹ تا ۱۷ ثانیه (با کارت گرافیک بار اول پس از نصب تا ۹۰ ثانیه)
  • حافظه هنگام کار: حدود ۲٫۳ گیگابایت؛ با بستن پنجره همه آزاد می‌شود
  • ویندوز ۱۰ (1809 به بعد) یا ۱۱، ۶۴ بیتی؛ ۸ گیگابایت حافظه پیشنهاد می‌شود؛ حدود ۱٫۸ گیگابایت فضای دیسک (و ۱٫۳ گیگابایت برای بستهٔ کارت گرافیک)

حریم خصوصی

بینا به اینترنت وصل نمی‌شود. موتور برنامه فقط روی همین کامپیوتر (127.0.0.1) کار می‌کند و پنجره هر درخواستی جز آن را می‌بندد. هیچ آمار، به‌روزرسانی خودکار یا گزارشی بیرون نمی‌رود. کد برنامه باز است و هر کسی می‌تواند این را بررسی کند.

مدل

بینا ۰٫۴ از مدل Bina-0.4-Koochik ساختهٔ رضا سیار استفاده می‌کند (نسخهٔ ONNX با کوانتش ۴ بیتی، مجوز OpenMDW-1.1).

کد منبع و مجوز

  • ⬇ کد منبع (Bina-Desktop-0.4.0-source.zip): کل برنامه با مجوز آزاد MIT. راهنمای ساخت در AGENTS.md.
  • برنامه: MIT، © ۲۰۲۶ خسرو رضا · مدل: OpenMDW-1.1، رضا سیار · اجزای دیگر: هر کدام مجوز آزاد خود (NOTICE.txt)
  • طراحی و توسعه: خسرو رضا · مدل: رضا سیار · نمونه‌های دست‌نویس: مجموعهٔ آزاد Persian Handwriting Pages (ساخته از واژه‌های دست‌نویس واقعیِ مجموعهٔ طاها گرجی)

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.0.exe 743 MB Everyone (Windows 10 1809+ / 11, 64-bit)
⬇ Bina-GPU-Pack-0.4.0.exe 885 MB Optional: NVIDIA graphics card owners, about 4× faster

Install: run Bina-Setup-0.4.0.exe. No administrator rights are needed (it installs for your user only). If you have an NVIDIA card, run Bina-GPU-Pack-0.4.0.exe afterwards. The installers are not code-signed yet, so Windows SmartScreen may show "Windows protected your PC". Click More info → Run anyway.

Verify the downloads (optional)

In PowerShell: Get-FileHash .\Bina-Setup-0.4.0.exe (and the same for the GPU pack). The results should match SHA256SUMS.txt:

65dc050ac5ac49d180c744919f52c3bf68ea93a7e8e40a570a3f145e8aec27a7  Bina-Setup-0.4.0.exe
ffe537784ca89a3f880ea346b4c79d1760f104360a85b5dbd3c8f3c3dc8a76d5  Bina-GPU-Pack-0.4.0.exe

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 (with the GPU pack): 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 Bina settings

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 card (GPU pack)
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 1809 or newer, 64-bit; 8 GB of memory recommended
  • Disk: about 1.8 GB, plus 1.3 GB for the GPU pack
  • GPU pack: 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 (4-bit GPTQ, groups of 32), a Persian full-page OCR model developed by Reza Sayar 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.0-source.zip (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
  • OCR model: Reza Sayar (Bina-0.4-Koochik)
  • Sample handwriting: Persian Handwriting Pages (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.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).