robertknight/ocrs
Rust library and CLI tool for OCR (extracting text from images)
What it solves
Ocrs is designed to extract text from images (OCR) with minimal preprocessing. It aims to be a modern alternative to older engines like Tesseract, working effectively across various image types—such as scanned documents, screenshots, and photos—by leveraging machine learning more heavily in its pipeline.
How it works
The project uses neural network models trained in PyTorch and exported to ONNX format. These models are then executed using the RTen engine. The system is built in Rust, allowing it to run across multiple platforms, including WebAssembly.
Who it’s for
Developers and users who need a lightweight, easy-to-compile OCR engine that supports the Latin alphabet and can be used either as a command-line tool or integrated as a Rust library.
Highlights
- Cross-platform support: Works on various platforms, including WebAssembly.
- ML-driven pipeline: Reduces the need for manual image preprocessing.
- Open datasets: Trained on open and liberally licensed datasets.
- Flexible output: Supports text, JSON layout information, and annotated images showing word and line locations.