Repository navigation
dsh-ocr-free — local OCR with no install on macOS, no network, no capability patching #8566
vitas
started this conversation in
Show Your Plugins!
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I built dsh-ocr-free, an OCR plugin for DSH that adds two tools:
ocr_image— recognises text in an image file and returns it, together with a separate list of the lines the engine itself scored belowlowConfidence. That section is the point: OCR output reads equally well whether it is right or wrong, and the engine's own score is the only thing that separates a reading from a guess.ocr_status— reports which engine this machine can use and why, without reading an image.On macOS the engine is Apple Vision, compiled from a 130-line Swift file on first use and cached, so there is nothing to install: no venv, no model download, no network, no API key. Elsewhere it falls back to an installed
tesseract. When neither works the tool errors and names the cause — it never returns an empty reading.Verified against DSH 0.2.0-rc.2 — it installs without
allow-version, and the peer range is deliberately no wider than what was actually tested. Both tools were called live in a session before publishing.Repo: https://github.com/vitas/dsh-ocr-free · npm: https://www.npmjs.com/package/dsh-ocr-free
Two things it deliberately does not do, since they are the interesting design questions:
Model "…" does not support image input,MODEL_DOES_NOT_SUPPORT_IMAGES), so no tool can read it afterwards. Getting past that means claiming image capability for a model that declares none — a session-wide change to how every request is assembled — and this plugin does not make it. Either give the model real image input (aninput:list on its provider entry) or save the picture and pass a path.Measured on macOS 15.4.1: 1.6 s for a 1000×200 crop, 3.0 s for an 824×907 screenshot (
accurate). Thefastrecogniser is Latin-only on this build — asked for Cyrillic it returns Latin homoglyphs with high confidence instead of failing — so it is off by default and every fast result carries the caveat. Bulgarianъis the weak spot (събрание→сьбрание), which is what the tesseract fallback is for.Feedback welcome, especially on the capability question: is handing the model text the right trade for a text-only route, or should a plugin like this bridge the admission gate?
All reactions