glyphwise ocr

Releases

What's new

Every release, newest first. Downloads: the latest release.

1.5.0

  • Chinese (Simplified): printed Chinese is read with --lang zh (server ?lang=zh, desktop language menu), and pages are recognised as Chinese automatically with --lang auto. 0.7% character errors on held-out Chinese government documents (115 pages, fonts not used in training). Horizontal text and the 6,763 characters of GB 2312; vertical text and Traditional characters are not read yet. 29 languages in all.
  • A new accurate model (--accurate, desktop Model choice, ?mode=accurate), which also reads Chinese: fewer errors than the 1.4 accurate model on printed lines (0.22% -> 0.19%) and than the fast model on every language tested (Turkish 0.33% -> 0.14%, Romanian 0.98% -> 0.12%), noisy pages (words found 91.5% -> 93.2%) and phone photos (97.1% -> 97.4%). It takes about 1.8 s per page in a batch (fast model: 0.6 s; 1.4 accurate model: 1.4 s). On handwriting read by the accurate model alone, the 1.4 model was better (old manuscripts 10.4% -> 11.6%, modern handwriting 41.7% -> 44.4%); the handwriting model (--alt, the desktop default) is unchanged. The fast model is unchanged.
  • Faster on small computers: line recognition on the processor uses 8-bit weights (same text; about 7% faster per page on one thread). GLYPHWISE_INT8=0 turns it off.
  • Chinese pages are no longer turned sideways by the page straightener, and are not cut into columns at the gaps between characters. Word output joins Chinese text without spaces.

1.4.0

  • Six more languages with their own language model: Turkish, Norwegian (Bokmål), Icelandic, Catalan, Galician and Welsh (--lang tr|nb|is|ca|gl|cy, server ?lang=, desktop language menu, and chosen automatically with --lang auto), 28 languages in all. Character errors on official legal texts: Turkish 0.34%, Norwegian 0.31%, Icelandic 1.08%, Catalan 0.88%, Galician 0.67%, Welsh 0.95%.
  • A new reading model, trained further on these languages: Turkish 1.47% -> 0.34% against the 1.3 model, and the other 22 languages the same or slightly better (Portuguese 0.24% -> 0.17%, Romanian 0.34% -> 0.26%). English documents read as before or slightly better (US government test lines 0.35% -> 0.33%).

1.3.0

  • A new reading model, trained further on European documents: in all 22 languages with their own language model, character errors on EU legislation fall, most by half or more: Latvian 4.07% -> 0.25%, Maltese 2.56% -> 0.87%, Polish 1.23% -> 0.20%, Slovak 1.61% -> 0.36%, Czech 0.88% -> 0.33%, Spanish 0.44% -> 0.23%, Portuguese 0.54% -> 0.24%, German 0.24% -> 0.16%. Lines read without a single error: 83-96% in 19 of the 22 languages.
  • English documents read as before (US government test lines 0.35% vs 0.33% character errors; full pages within 0.4 points of word accuracy), and handwriting with the handwriting model is unchanged.
  • The accurate model (--accurate) is unchanged from 1.2.

1.2.2

  • Fifteen more languages with their own language model: Polish, Czech, Slovak, Hungarian, Swedish, Danish, Finnish, Estonian, Latvian, Lithuanian, Slovenian, Croatian, Romanian, Maltese and Irish (--lang pl|cs|sk|hu|sv|da|fi|et|lv|lt|sl|hr|ro|mt|ga, server ?lang=, desktop language menu, and chosen automatically with --lang auto). On EU legislation these languages had 2.6-10.3% character errors when read with the English model; with their own they have 0.1-4.1% (most under 1.3%).
  • --lang none (server ?lang=none): read without any language model, for languages that have none yet.

1.2.1

  • Checkboxes in Word documents: ticked and empty boxes on forms become Word checkboxes you can click, in the text and in table cells, instead of being left out or read as a stray "[" or "O".
  • Fixes a crash in accurate mode together with the handwriting model (the desktop window's default when both are installed): a conversion could stop on a rare handwritten line.

1.2.0

Glyphwise 1.2: Word output, form fields and checkboxes, invoices and receipts, barcodes, accessible PDF/A, smaller PDFs, redaction, a hot folder, automatic language choice and your own word lists. Licences for 1.0 and 1.1 work unchanged.

  • Word documents (--docx OUT, server ?format=docx, desktop format Word): editable .docx with the page size, paragraphs in reading order (end-of-line hyphens rejoined), headings, font sizes, alignment, indents, bold words (scanned pages), two-column pages and tables with merged cells. Prose pages come out close to the original; forms become flowing text and tables rather than keeping their exact positions.
  • Form fields and checkboxes (--fields OUT.csv, server ?format=fields, SDK format 5, desktop format Fields): Label: value pairs, labels with their value beside or below, and checkboxes with their label and whether they are ticked. The JSON output carries fields, checkboxes and barcodes on every page.
  • Invoices and receipts: invoice number, dates, order number, vendor and tax id, IBAN, currency, subtotal, tax, total and the line items come out as fields (kind invoice), with a check that the amounts add up. Labels in English, German, French, Spanish, Italian, Dutch and Portuguese.
  • Barcodes and QR codes: QR (every version and error level), Data Matrix (every ECC 200 size), PDF417, Code 128, Code 39, EAN-13, UPC-A and EAN-8 are read on every page, also turned or noisy ones, and reported in the JSON and fields output. --no-forms and --no-barcodes switch the new page analysis off (about 0.1 s per page).
  • Searchable PDFs are now PDF/A-2u and keep any character (Greek, Cyrillic, Polish, ...), not only Western European ones.
  • Accessible PDFs (PDF/UA): searchable PDFs are tagged, so screen readers read the text in order as headings, paragraphs and tables, skip page headers, footers and numbers, and know the document's language and title.
  • Smaller PDFs (--pdf-image lossless|jpeg[:Q]|bw|mrc, server ?pdf_image=, desktop select): black and white (about a fifth of the size on clean pages) or compact (sharp text over a soft background, about a third); lossless stays the default.
  • Your own words (--words FILE, repeatable; desktop: %APPDATA%\Glyphwise\words.txt; SDK add_words): names, places and terms the reader should prefer, one per line.
  • Fast and accurate modes: when a package ships an accurate model, --accurate, server ?mode=accurate and the desktop Model choice read with it.
  • Large print of capitals and digits (headings, totals, form entries) is no longer occasionally misread.
  • Redaction (--redact email,ssn,phone,card,iban|all, --redact-terms FILE, server ?redact=): personal data is blacked out in every output; in searchable PDFs it is painted over on the image and left out of the text.
  • Hot folder (--watch DIR --out-dir OUT): reads every file that appears, moves it to done or failed.
  • Automatic language (--lang auto, server ?lang=auto, desktop Automatic): the language model is chosen per page.
  • Tables without lines: dense, regular whitespace-aligned tables are found as well.
  • Headers, footers and page numbers are recognized: the JSON marks those lines ("role": "header" / "footer") and Word documents no longer repeat them in the body text.
  • Protected PDFs: PDFs protected only against printing, copying or editing (no password needed to open) are now read, in every standard encryption (RC4, AES-128, AES-256). A PDF that needs a password to open still says so.
  • Per-client API keys for the server (--api-keys FILE, one NAME KEY per line; Authorization: Bearer or X-API-Key): each request logs the key's name, and deleting a line revokes that key without a restart.
  • The server now always shuts down cleanly with many workers.

1.1.1

  • Fixes a crash ("RefCell already borrowed") that could stop a conversion when several pages were prepared at the same time: long documents with a licence, and the desktop window or server converting several documents at once.

1.1.0

Glyphwise 1.1: a Windows installer, the desktop program in its own window, and encrypted models. Licences for 1.0 work unchanged.

  • Windows installer (glyphwise-<version>-windows-x64-setup.exe): per-user install without administrator rights (or for all users), Start menu entries, optional desktop icon, Open with Glyphwise on PDFs and images, command-line programs on PATH, licence file chosen during setup; uninstall from Settings > Apps.
  • Desktop window: Glyphwise opens in its own window instead of a browser tab and console, and stops when the window is closed. Starting it again, or Open with Glyphwise, adds the files to the open window. New: Browse… for the output folder, Folder to show saved results, Cancel, Install licence…, remembered settings, automatic reconnection, and the shipped handwriting model is used automatically. Results are kept on disk instead of in memory, so long sessions and large documents no longer fill the memory.
  • The models in the packages are now stored encrypted. Nothing changes in use: the programs and the SDK read them as before, in evaluation mode too. A licence can carry keys for models made only for its holder.
  • Faster language-model decoding on long lines; the text read is unchanged.
  • --confidence-power A calibrates the line and word confidences (and the choice of the handwriting model).
  • Very small, clean print (x-height of 5 pixels or less) is enlarged before reading.

1.0.0

Glyphwise 1.0: licences are now on sale at https://www.glyphwise.site (Desktop, Server and Developer; one payment buys a year, no automatic renewal).

Handwriting

  • New handwriting model (models/handwriting.bin), trained on about 62,000 more lines of 18th- and 19th-century manuscripts from the Library of Congress (public domain). Used with --alt, character errors fall from 11.3% to 10.9% on the Bentham manuscripts and from 42.5% to 42.2% on modern handwritten notes; printed pages read the same.
  • With the handwriting model, more handwritten lines are now given to it: about half a point fewer character errors on handwriting, printed pages unchanged.

Tables

  • Tables for programs: format 4 of the C library returns a file's tables as CSV, and the Python, .NET, Java, Node.js and Go wrappers return each table as typed cells (doc.tables(), table.grid()).
  • Cells of digits and a short word ("11 to 25") are read at the right size, and text in a row that spans the columns, such as a footnote under the table, is no longer cut at the column lines.

Smaller download

  • The models are stored with 16-bit weights: half the size (the main model is 5.5 MB instead of 10.9 MB) with the same results on every test set. Earlier versions cannot read these model files.

Licences

  • Licences limited to version 0 (max-version: 0) do not cover 1.0. Licences without a version limit, or limited to version 1, work as before.

0.3.0

Desktop window

  • glyphwise-gui: convert documents from a page in your web browser, served by the program on this computer only. Double-click it, drop files or whole folders, tick the outputs (text, searchable PDF, JSON, hOCR, ALTO, review list, tables) and click Convert all; download each result or all of them as a zip, or save them straight into a folder. Each converted page can be viewed with its recognized words outlined and doubtful words highlighted.

Tables to Excel

  • Tables on scanned pages are found and their cells filled with the recognized text: tables drawn with lines (forms, government tables, including merged cells) and typeset tables with lines above and below. --xlsx FILE writes an Excel workbook with one sheet per table (plain numbers as numbers), --csv FILE a CSV file; the HTTP service takes ?format=xlsx or ?format=csv, and the JSON output lists each page's tables with their cells.

Handwriting

  • A second recognition model for handwritten and mixed documents ships as models/handwriting.bin. With --alt models/handwriting.bin, lines the main model is unsure of are read again by it: about one character error in ten fewer on handwriting (12.9% to 11.9% on 19th-century manuscripts), printed pages unchanged.

More accurate on forms and tables

  • Short items such as table cells, amounts and item numbers are prepared with the room around them they were missing, and small print is no longer scaled up to the size of the body text: "$90" no longer reads as "$900" or "4.4" as "44". Words found on the 38-page test set rise from 97.7% to 97.9%, on 53 other pages from 97.4% to 97.7%, and on phone photos from 96.6% to 96.8%.
  • Long ruled tables are now cut into cells all the way down; before, their lower rows were read as whole lines.

Faster

  • Pages are read 20-25% faster, on one core or many: the recognizer reads similar lines together and uses the processor's vector instructions, and page cleanup runs on all cores. The recognized text is unchanged.

0.2.1

More accurate in other languages

  • A new recognition model, trained further on French, German, Spanish, Italian, Portuguese and Dutch text. With each language's own language model, character errors on held-out text fall by another 19-33% (French 2.78% to 1.85%, German 3.13% to 2.17%, Spanish 3.34% to 2.33%, Italian 3.76% to 3.06%, Portuguese 3.69% to 2.63%, Dutch 1.93% to 1.52%), and two in three lines now come back without a single error.
  • English documents read as before or slightly better: words found on the 38-page test set rise from 97.3% to 97.7%; handwriting reads about the same.

0.2.0

Languages

  • French, German, Spanish, Italian, Portuguese and Dutch, besides English: --lang fr (or de, es, it, pt, nl; --lang list shows them) picks the language model that corrects likely misreadings. On held-out text, character errors fall by 24-57% against reading those languages with the English model. The models ship next to the main model as models/line.bin.<code>.lm. The HTTP service takes ?lang= per request and lists its languages on /health; the library adds glyphwise_recognize_lang and glyphwise_languages.

For developers

  • Wrappers for Python, .NET, Java, Node.js and Go in bindings/: typed results (pages, lines, words with boxes and confidence), exceptions, languages and licence calls. Only Node.js needs a package (koffi).

Faster

  • Recognition on one processor core is 2.6 times faster, and 1.3 times faster on all cores, with identical results.

HTTP service

  • Optional token (--token-file or GLYPHWISE_TOKEN; clients send Authorization: Bearer <token>), a limit on pages per request (--max-pages, default 500; longer documents are refused before any work), a deadline for receiving a request (--timeout-secs, default 120), stricter request parsing, and a warning when it listens beyond this computer without a token. In evaluation mode only the pages that are returned are recognized.

Also

  • The licence agreement names the support address, sales@glyphwise.site.
  • The website has a live demo that runs the engine in the browser (nothing is uploaded), now with a language menu.

0.1.0 (first release)

Glyphwise reads scanned documents, PDFs, phone photos and handwriting on your own computer and returns searchable PDFs, plain text, JSON, hOCR or ALTO, with a box and a confidence score for every word. Nothing is sent anywhere.

Packages

  • Windows 10/11 x64 (.zip), Linux x64, glibc 2.35 or newer (.tar.gz), macOS 12 or newer, one universal build for Apple silicon and Intel (.tar.gz). Unpack and run; no installer.
  • Each package: the glyphwise command line, the glyphwise-server local HTTP service, the C library with its header and examples for Python, C# and C, the recognition model, the user guide, licence agreement and notices.

Reading

  • PDF (text layers read exactly; scanned pages recognized, including JBIG2 and JPEG 2000 images), TIFF (multi-page; LZW, Deflate, PackBits, CCITT G3/G4, JPEG), PNG, JPEG, JPEG 2000, JBIG2, GIF, BMP, PNM.
  • Pages are repaired before reading: turned or upside-down pages set upright, large skew removed, salt-and- pepper noise cleaned; phone photos straightened (the page found on the surface it lies on and flattened), shadows and uneven light evened out, and the photo's orientation tag honoured.
  • Tables and forms: ruled cells are read as separate blocks; columns are kept apart.
  • One model for printed text and handwriting, with a language model and word list that correct likely misreadings.

Output

  • Searchable PDF (--pdf for one combined file, or --out-dir DIR --formats pdf for one per input), plain text, JSON with every word's box and confidence, hOCR 1.2, ALTO v4, and --review for a list of the low-confidence words worth checking.
  • Folders and wildcards as input (glyphwise models/line.bin scans --out-dir out --formats pdf,txt); files are processed in parallel; --gpu uses CUDA or OpenCL on Windows and Linux.

Accuracy (public-domain test documents never used in training; details on the website)

  • Printed document lines: 0.31% character errors (Tesseract 5.4: 1.47%).
  • Whole pages including forms: 97.3% and 97.5% of words found on two test sets (Tesseract: 94.1%, 94.0%).
  • Phone photos of the same pages (angle, shadow, blur, compression combined): 96.5% (Tesseract: 90.9%).
  • Handwriting: 13.0% character errors on 18th-century manuscripts, 44.9% on photographed modern notes.

Licensing

  • Without a licence file every feature works in evaluation mode, limited to 3 pages per run (the HTTP service and the library: 3 pages per request or call, 25 per process). A licence file from https://www.glyphwise.site/#pricing removes the limit; it is checked offline.

Known limits

  • macOS builds are not yet notarized (clear the download flag once: xattr -dr com.apple.quarantine .), and Windows may show a SmartScreen notice for the unsigned programs.
  • Not supported: encrypted PDFs, PDF soft masks, BigTIFF, WebP, arithmetic or lossless JPEG.
  • Best on English and other Latin-alphabet text.