| Crates.io | ocrs |
| lib.rs | ocrs |
| version | 0.11.0 |
| created_at | 2023-12-31 21:01:19.030779+00 |
| updated_at | 2025-09-11 17:58:18.041504+00 |
| description | OCR engine |
| homepage | https://github.com/robertknight/ocrs |
| repository | https://github.com/robertknight/ocrs |
| max_upload_size | |
| id | 1085006 |
| size | 368,296 |
This crate contains the ocrs OCR engine as a library. See the main project README for general details about the project.
Make sure you build the ocrs crate and its rten* dependencies in release
mode. Debug builds of these crates will be extremely slow.
See examples/hello_ocr.rs for a minimal example of using this library in a Rust application.
cd examples/
# Download models in .rten format.
./download-models.sh
# Run OCR on an image and print the extracted text.
cargo run --release --example hello_ocr rust-book.jpg
Note that, performance of the binary will differ significantly if
debugbuild profile is used. Learn more: https://github.com/robertknight/ocrs/issues/117#issuecomment-2362314977