Releases: deeplabua/deepocr
Release list
0.1.0 — 2026-07-26
Release Notes
First release. deepocr scan.pdf writes scan.ocr.pdf: the original page image with an
invisible, selectable text layer on top — searchable in any PDF viewer, produced entirely on
your machine.
Added
- Searchable PDFs. Recognized words are written in text render mode 3 over the page image,
positioned on the words themselves, so selection,Ctrl-Fand copy all land where they should.
The font is a generated glyphless TrueType (~600 bytes) addressed throughIdentity-H, with an
identityToUnicodemap so copied text comes back as the recognized text. - Inputs: scanned PDFs, born-digital and mixed PDFs, PNG, JPEG, and multi-page TIFF (one page
per frame). A scanned page is lifted out of the PDF without re-rendering; anything else is
rasterized withhayroat--dpi. - Scans are preserved byte for byte. A page that arrived as an encoded stream goes into the
output unchanged, so a JPEG scan loses nothing to a round trip. Only pages that had to be
rasterized are encoded, once. --deskewmeasures a page's tilt with a projection profile and rotates it back.
--rotate autorecognizes a thumbnail four ways up and keeps the orientation that reads;
the output page is built upright without resampling the scan.--optimizerecompresses page images (with--quality), downsampling to--dpiwhere a
scan is finer than that. It never makes a page larger — if recompression does not win, the
original stream is kept.--pageslimits which pages are recognized; every page of the input still reaches the
output.--skip-text(default),--forceand--redodecide what happens to pages
that already carry text.--sidecarwrites the plain text beside the PDF, pages separated by a form feed.- Batch:
--recursivewalks a folder and mirrors its tree into--output. One unreadable
file is reported and counted, not fatal; the run ends with a summary. - Offline by default. Release binaries (Homebrew, GitHub Releases, the installers) carry the
OCR models inside them — nothing is downloaded, and no document leaves the machine. A
cargo installbuild fetches the models into a cache directory on first run, verifying them
against pinned checksums;--model/DEEPOCR_MODEL_DIRoverride the location for air-gapped
setups. deepocr-coreis published alongside the binary, so the engine can be embedded elsewhere.
Known limitations
- Latin script only, which is what
ocrsreads today. Other scripts arrive with additional
backends behind the sameOcrBackendtrait. - A page skipped by
--skip-textkeeps its image but not its text layer. The output is
rebuilt from page rasters, so an existing layer is not carried across;--redorecognizes such
pages again. Adding the layer to the original page in place is planned. - Output is a plain searchable PDF, not PDF/A.
Notes
- No Ghostscript, no Python, no runtime dependencies — one binary. Every crate in the dependency
graph is permissively licensed (MIT / Apache-2.0 / BSD / MPL / Zlib). - The OCR models come from ocrs-models and are
mirrored in this repository'smodels-v1release so that a pinned checksum stays valid.
Install deepocr 0.1.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/deeplabua/deepocr/releases/download/v0.1.0/deepocr-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/deeplabua/deepocr/releases/download/v0.1.0/deepocr-installer.ps1 | iex"Install prebuilt binaries via Homebrew
brew install deeplabua/tap/deepocrDownload deepocr 0.1.0
| File | Platform | Checksum |
|---|---|---|
| deepocr-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
| deepocr-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
| deepocr-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
| deepocr-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |
OCR models v1 (ocrs mirror)
Mirror of the Latin OCR models DeepOCR pins, so fetching them does not depend on an unversioned upstream URL.
The files are byte-for-byte the ones published at https://ocrs-models.s3-accelerate.amazonaws.com/, and match the checksums pinned in crates/core/src/models.rs:
| file | sha256 |
|---|---|
text-detection.rten |
f15cfb56bd02c4bf478a20343986504a1f01e1665c2b3a0ad66340f054b1b5ca |
text-recognition.rten |
e484866d4cce403175bd8d00b128feb08ab42e208de30e42cd9889d8f1735a6e |
This tag never moves. A new set of weights gets a new tag, so a pinned checksum stays valid forever.
Where the models come from
They are produced by robertknight/ocrs-models and are the ones the ocrs engine downloads on first run. Per that project's README they are trained exclusively on open datasets with non-restrictive licences (including HierText, CC-BY-SA 4.0).
The upstream repository does not state a licence for the model files themselves; we have asked and will record the answer here. The ocrs engine code is MIT OR Apache-2.0, as is DeepOCR.