An OCR engine that learned to skip the prep work
Extracts text from images by leaning heavily on machine learning, avoiding the tedious preprocessing rituals of older OCR engines.

What it does
ocrs is a Rust library and CLI tool that recognizes text in images ranging from scanned documents to casual screenshots. It passes images through neural network models—trained in PyTorch, exported to ONNX, and executed with the RTen engine—to produce text and layout information. The CLI can emit plain text, JSON with layout details, or annotated images highlighting detected words and lines.
The interesting bit
The project was built to need “zero or much less preprocessing” than Tesseract by using machine learning more extensively throughout the pipeline. It also targets WebAssembly and openly admits to prioritizing a readable, modifiable codebase over chasing incumbent accuracy.
Key highlights
- Handles varied inputs—scanned docs, photos, screenshots—with minimal preprocessing compared to Tesseract
- Runs across multiple platforms including WebAssembly
- Models trained on open, liberally licensed datasets and available in ONNX format for other runtimes
- CLI outputs JSON layout extraction, annotated images, and offers optional clipboard integration
- Includes unit tests and end-to-end tests covering the full pipeline
Caveats
- Explicitly in early preview; the README warns to “expect more errors than commercial OCR engines”
- Latin alphabet only; broader language support is planned but not yet available
Verdict
Worth a look if you want an embeddable, hackable OCR engine in Rust and can tolerate some accuracy trade-offs. If you need production-grade multilingual recognition today, stick with the incumbents.
Frequently asked
- What is robertknight/ocrs?
- Extracts text from images by leaning heavily on machine learning, avoiding the tedious preprocessing rituals of older OCR engines.
- Is ocrs open source?
- Yes — robertknight/ocrs is open source, released under the Apache-2.0 license.
- What language is ocrs written in?
- robertknight/ocrs is primarily written in Rust.
- How popular is ocrs?
- robertknight/ocrs has 1.9k stars on GitHub.
- Where can I find ocrs?
- robertknight/ocrs is on GitHub at https://github.com/robertknight/ocrs.