PYPI PACKAGE AUDIT v0.1.0a1 Needs Improvement

glyphly

OCR for Python with nothing to install but the package: words, boxes and confidences, no Tesseract.

PyPkgScore glyphly
Methodology & Criteria ♥ Donate
555 / 1000
Quick Install
pip install glyphly
1. Governance
50/200
2. PEP Metadata
200/200
3. Security
200/200
4. Docs & SEO
105/200
5. CI Engineering
0/200
📣 Share Audit: Share this report and visual preview in the current language
Advertisement
PYPI TELEMETRY

Downloads & Community Adoption

Last 30 days (without mirrors)
Last 7 days
99
Last 30 days
99
Total (180 days)
99
Metric / Ecosystem Status / Value Source
Downloads (30d / 180d) — PyPI Stats (without mirrors)
Trusted Publishing (PEP 740) ✓ Verified OIDC PyPI Integrity / Sigstore
Django Packages — djangopackages.org
PyTech / PyPkgScore 555 / 1000 PyPkgScore Engine

Health & Engineering Analysis (5 Pillars)

1. Governance & Community50 / 200 ▾
LICENSE✓ 50 pts
SECURITY.md✕ 0 pts
CONTRIBUTING.md✕ 0 pts
CODE_OF_CONDUCT.md✕ 0 pts
2. PEP Metadata & Packaging200 / 200 ▾
Wheel (.whl)✓ 50 pts
pyproject.toml✓ 50 pts
Project URLs✓ 50 pts
Trove Classifiers✓ 50 pts
3. Security & Supply Chain200 / 200 ▾
Zero CVEs (OSV)✓ 60 pts
Trusted Publishing (OIDC)✓ 50 pts
Snyk / Audit Link✓ 40 pts
HTTPS Repository✓ 50 pts
4. Documentation, SEO & Ecosystem105 / 200 ▾
Structured README✓ 60 pts
Read the Docs✕ 0 pts
Django Packages✕ 0 pts
Website / Technical Articles✓ 45 pts
5. Engineering, CI & Quality0 / 200 ▾
Automated Tests✕ 0 pts
GitHub Actions CI✕ 0 pts
CHANGELOG.md✕ 0 pts
Env & Lockfile (uv/rye/poetry/pdm/hatch)✕ 0 pts
Advertisement
README & DOCS

Official Documentation & Usage Guide — glyphly

PyPI Metadata v0.1.0a1
Show full original documentation (English README) ▾

glyphly

OCR for Python with nothing to install but the package. Reads scans, photos and images into text, with every word's position and confidence. No Tesseract, no OpenCV, no system programs: pip install glyphly brings NumPy, Pillow and ONNX Runtime, all as wheels for Windows, macOS and Linux.

Pre-alpha. The engine works and is measured, but the API may change and it is not on PyPI yet. Feedback is very welcome.

import glyphly

page = glyphly.read("scan.png")  # path, bytes, PIL image or NumPy array
print(page.text)  # lines in reading order
print(page.confidence)  # 0..1, character-weighted
for word in page.lines[0].words:
    print(word.text, word.box, word.confidence)  # box = (x0, top, x1, bottom) in pixels
glyphly read scan.png            # text
glyphly read scan.png --json     # lines, words, boxes, confidences
glyphly download                 # fetch the model files now, for offline use later

For many images, create one glyphly.Reader() and call reader.read(...) on each: the models load once.

How it works

  1. Find text lines. A small segmentation network (PP-OCRv6 detection) marks text pixels. glyphly's own post-processing, written in NumPy, groups them into lines and measures each line's direction, so tilted pages (skewed scans, phone photos) are cut out straight instead of slicing through neighbouring lines.
  2. Read each line. A recognition network (PP-OCRv6) reads each straightened line at its full width (no width cap, so long lines and wide fonts are not squeezed), and CTC decoding turns its output into characters.
  3. Locate words. Each character comes from a known column of the line, so every word gets its own box on the page.

The model files (31 MB) are downloaded once into ~/.cache/glyphly (or GLYPHLY_HOME) and checked against a pinned SHA-256 fingerprint before use. They come from PaddleOCR via the RapidOCR project, both Apache-2.0 (see NOTICE). Replacing the recognition model with one trained by this project is on the roadmap.

Accuracy

Measured with bench/ocr.py on pages rendered from known text in 5 fonts, so the ground truth is exact. Held-out test split (pages never used while building), character error rate, lower is better:

glyphly gleanly + Tesseract RapidOCR (same models) plain Tesseract
Standard: clean, fax, blur, noise, 3° skew, JPEG, faint + shadow, phone photo (120 pages) under 0.05% 0.6% 5.1% 16.1%
Hard: small print, white on dark, colour, perspective, cheap scan, two columns, table (105 pages) 0.1% 0.0% 15.1% 0.5%

Two columns are read one after the other and tables row by row (each row on one line). Weak spot left on the hard suite: cheap scans (0.3%). These are generated pages: real scans and a comparison with docTR, EasyOCR, PaddleOCR and a paid OCR service come next (see docs/review.md).

Languages

glyphly.read() works out the script by itself: Latin-script languages, Chinese and Japanese are read by the default model; lines that look misread are re-read with the matching script model (downloaded the first time a page needs it, about 8 MB each, checked by SHA-256), right-to-left lines are put in reading order, and numbers skipped by the Arabic-script model are read back in. Or choose: Reader(lang="ru"), Reader(lang=["hi", "en"]), glyphly read scan.png --lang ar; glyphly download --all fetches every model for offline use.

Measured with bench/languages.py (the same short notice with a date and an amount, written in each language and drawn by a browser so every script is shaped correctly), character error rate:

Script Languages measured CER
Latin English, German, French, Spanish, Portuguese, Polish, Turkish 0%
Latin Vietnamese 5.4% (stacked accents dropped)
Chinese, Japanese, Korean zh, ja, ko 0%
Greek, Thai, Tamil el, th, ta 0%
Cyrillic Russian, Ukrainian 5.0%, 1.2%
Devanagari, Telugu Hindi, Telugu 1.4%, 4.2%
Arabic script Arabic, Persian 5.3%, 6.3%
Not supported yet Hebrew, Bengali (and other scripts without an open model) 83%, 76%

Average over the 20 supported languages: 1.4%. One sentence per language is a smoke test, not a full benchmark: real documents per language are on the roadmap.

Status and roadmap

  • Engine on ONNX Runtime with no system dependencies; rotated lines; word boxes
  • Held-out and hard-suite results; two-column reading order; table rows
  • 20 languages in 11 scripts, detected automatically
  • Table structure (cells), page orientation, real-scan benchmark
  • Hebrew, Bengali and other scripts without an open model
  • Release on PyPI; used by gleanly for OCR
  • glyphly's own trained recognition model
  • Real-scan benchmark; comparison with Docling, Marker and a paid OCR service

Development

uv sync                      # package + dev tools
uv run glyphly download      # model files
uv run pytest
uv sync --group bench        # + RapidOCR baseline; gleanly[ocr] and Tesseract optional
uv run python -m bench.ocr --split dev

License

Apache-2.0. See LICENSE and NOTICE.