ocrs
Library Featured
OCR engine
- Downloads
- 196,739
- Dependents
- 20
- Stars
- 1,915
- Forks
- 92
- Contributors
- 12
- Commits
- 570
- Latest release
- 0.13.1 ·
About
ocrs is a Rust library and CLI tool for extracting text from images, also known as OCR (Optical Character Recognition).
The goal is to create a modern OCR engine that:
- Works well on a wide variety of images (scanned documents, photos containing text, screenshots etc.) with zero or much less preprocessing effort compared to earlier engines like Tesseract. This is achieved by using machine learning more extensively in the pipeline.
- Is easy to compile and run across a variety of platforms, including WebAssembly
- Is trained on open and liberally licensed datasets
- Has a codebase that is easy to understand and modify
Under the hood, the library uses neural network models trained in PyTorch, which are then exported to ONNX and executed using the RTen engine. See the models section for more details.
Status
ocrs is currently in an early preview. Expect more errors than commercial OCR engines.
Language Support
ocrs currently recognizes the Latin alphabet only (eg. English). Support for more languages is planned.
CLI installation
To install the CLI tool, you will first need Rust and Cargo installed. Then run:
$ cargo install ocrs-cli --locked
Read the full README
To enable support for reading images from the system clipboard, add the
clipboard feature:
$ cargo install ocrs-cli --locked --features clipboard
CLI usage
To extract text from an image, run:
$ ocrs image.png
When the tool is run for the first time, it will download the required models
automatically and store them in ~/.cache/ocrs.
If ocrs was installed with the clipboard feature, you can extract text from
an image on the system clipboard with:
$ ocrs --clipboard
$ ocrs -c # Short form
Additional examples
Extract text from an image and write to content.txt:
$ ocrs image.png -o content.txt
Extract text and layout information from the image in JSON format:
$ ocrs image.png --json -o content.json
Annotate an image to show the location of detected words and lines:
$ ocrs image.png --png -o annotated.png
Library usage
See the ocrs crate README for details on how to use ocrs as a Rust library.
Models and datasets
ocrs uses neural network models written in PyTorch. See the ocrs-models repository for more details about the models and datasets, as well as tools for training custom models.
Development
To build and run the ocrs library and CLI tool locally you will need a recent stable Rust version installed. Then run:
git clone https://github.com/robertknight/ocrs.git
cd ocrs
cargo run -p ocrs-cli -r -- image.png
Common development tasks are defined as recipes in the justfile and run with
just. Run just --list to see them all.
Testing
Ocrs has unit tests for the code that runs before and after ML model processing, plus E2E tests which exercise the whole pipeline, including models.
After making changes to the code, run unit tests and lint checks with:
just check
You can also run standard commands like cargo test directly.
Run the E2E tests with:
just test-e2e
For details of how the ML models are evaluated, see the ocrs-models repository.
Compatibility
- Runs on
- GPU support unknown
What shows it
- no dependency or feature matches a backend row
- Native code
- None found
- No native code found
- Python bindings
- No Python binding crate found
- License
- Apache-2.0 OR MIT
Compare with similar projects
Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days.
| Project | Downloads | Dependents | Stars | Latest release | Runs on (GPU) | Native code | License |
|---|---|---|---|---|---|---|---|
|
OCR engine |
196,739 downloads over 30 days | 20 | 1,915 | 0.13.1 | GPU support unknown | No native code found | Apache-2.0 OR MIT |
|
oar-ocr Listed
An Optical Character Recognition (OCR) and Document Layout Analysis library written in Rust. |
34,387 downloads over 30 days | 9 | 204 | 0.10.2 | CUDA, WebGPU, Metal | Binds native code: ort-sys | Apache-2.0 |
|
Higher-level bindings for Tesseract OCR |
24,101 downloads over 30 days | 12 | 176 | 0.15.2 | GPU support unknown | Binds native code: tesseract-sys, leptonica-sys | MIT |
|
rust-paddle-ocr Listed
A lightweight and efficient OCR library based on PaddleOCR models, using the MNN inference framework for high-performance text detection and recognition |
2,742 downloads over 30 days | 5 | 346 | 2.4.1 | CUDA, Metal, Vulkan | Build uses a native toolchain: bindgen, cc, cmake | Apache-2.0 |
|
rusto-rs New
RustO! - Pure Rust OCR library based on RapidOCR with PaddleOCR engine |
1,618 downloads over 30 days | 1 | 127 | 0.3.2 | CUDA, Metal, Vulkan | Binds native code: rusto-mnn-sys. Build uses a native toolchain: bindgen, cc, cmake | MIT |
|
franken_ocr New
Pure-Rust, CPU-hyper-optimized runner for the Baidu Unlimited-OCR model (single-binary CLI: focr) |
40 downloads over 30 days | 0 | 346 | 0.9.0 | GPU support unknown | No native code found | Not measured |
Why FeaturedIt passes every Featured gate.
What it meets
- It has 16 active dependents and 15 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days.
- Active dependents are at 100% of their peak. Featured needs at least 50%.
- Docs are present. The release commit or a manifest ties the crate to the repository.
- No vulnerability advisory stays unpatched past the grace window. At least one version is neither a prerelease nor 0.0.x.
- The last activity is on 8 Nov 2026, 1 day ago. The rules expect an update within 1200 days. Dormancy rule
Exact rules: Featured library. The check on applied thresholds version 9.
Every rule outcome, as the check records it
expected-interval: version 0.13.1 base 300, doubled for 196739 downloads per month, doubled for 16 active users: E = 1200 daysdormancy: last activity 2026-11-08, 1 days ago, E = 1200: activefeatured: featured: active_users 16, new_adopters 15, former_glory 1
Measurements and sources
Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.
Sources6 sources
- Description: the crates.io description
- crates.io database dump, fetched
- RustSec advisory database, fetched
- GitHub repository, fetched
- crates.io package, fetched
- GitHub contributors, fetched
Adoption16 active dependents, 15 new dependents in 365 days1 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | 16 | crates.io database dump | Yes | |
| New dependents (365 days) | 15 | crates.io database dump | Yes | |
| Peak active dependents | 15.5 | crates.io database dump | Yes | |
| Active dependents as a share of the peak | 1 | crates.io database dump | Yes | |
| Binary downloads per release | Not measured | Yes |
MaintenanceLatest human commit: 1 day ago3 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2026-11-08 | GitHub repository | Yes | |
| Latest release | 2026-09-13 | crates.io database dump | Yes | |
| First release | 2023-12-31 | crates.io database dump | Yes | |
| Latest version | 0.13.1 | crates.io database dump | Yes | |
| Days the oldest outside issue waits for a reply | 0 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 24 | GitHub repository | Yes | |
| Repository archived | false | GitHub repository | Yes | |
| Repository gone | false | GitHub repository | Yes | |
| Release commit or manifest in the repo | true | crates.io package | Yes | |
| Published docs | true | crates.io database dump | Yes | |
| Latest release fails cargo check | Not measured | Yes | ||
| Build check date | Not measured | Yes | ||
| Build check toolchain | Not measured | Yes |
SecurityUnpatched vulnerabilities: none
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Unpatched vulnerabilities past the grace window | none | RustSec advisory database | Yes | |
| RustSec unmaintained advisory | none | RustSec advisory database | Yes | |
| Deprecation notice | none | crates.io database dump | Yes | |
| Deprecated requirement | none | crates.io database dump | Yes |
Distribution21 releases, 196,739 downloads over 30 days5 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 21 | crates.io database dump | Yes | |
| Downloads over 30 days | 196739 | crates.io database dump | Yes | |
| Binary downloads over the last 3 releases | Not measured | Yes | ||
| Homebrew installs on request over 365 days | Not measured | Yes | ||
| Repology repository families | Not measured | Yes | ||
| Docker pull growth over 90 days | Not measured | Yes | ||
| Docker pulls at the growth baseline | Not measured | Yes | ||
| Every version a prerelease | false | crates.io database dump | Yes | |
| Every version 0.0.x | false | crates.io database dump | Yes | |
| Every version yanked | false | crates.io database dump | Yes | |
| Crate deleted from crates.io | false | crates.io database dump | Yes |
Repository1,915 stars, 92 forks, 12 contributors, 570 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 1915 | GitHub repository | Yes — one part of the repository route | |
| GitHub forks | 92 | GitHub repository | Yes — one part of the repository route | |
| Contributors with a GitHub account | 12 | GitHub contributors | Yes — one part of the repository route | |
| Commits on the default branch | 570 | GitHub repository | No | |
| Repository's main crate left out of the entry | none | crates.io database dump | Yes |
Facts that never count
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| License | Apache-2.0 OR MIT | crates.io database dump | No | |
| Runs on, from listed crates and their direct dependencies | GPU support unknown | crates.io database dump | No | |
| What shows each backend | no dependency or feature matches a backend row | crates.io database dump | No | |
| Native code, from listed crates and their dependencies | No native code found | crates.io database dump | No | |
| Python bindings, from direct dependencies of listed crates | No Python binding crate found | crates.io database dump | No | |
| Crates that depend on a listed crate directly | 20 | crates.io database dump | No |
Corrections and review history
No correction applies to this entry.
Judgments
A judgment enters only through an approved issue and a merged pull request.
No judgment applies to this entry.