| Crates.io | rustocr |
| lib.rs | rustocr |
| version | 0.7.0 |
| created_at | 2025-12-28 17:23:44.444536+00 |
| updated_at | 2025-12-28 17:35:04.60252+00 |
| description | High-performance Rust CLI for EasyOCR with 80+ language support, featuring server mode and batch processing. Fastly Built by FastBuilder.AI |
| homepage | https://github.com/cyberiums/RustOCR |
| repository | https://github.com/cyberiums/RustOCR |
| max_upload_size | |
| id | 2009164 |
| size | 1,292,757 |
Fastly Built by FastBuilder.AI 🚀
A fast Rust CLI wrapper for EasyOCR providing OCR capabilities with 80+ language support.
Before using RustOCR, ensure you have:
Python 3.7+ installed
EasyOCR Python library:
pip install easyocr
Note: If you encounter import errors with EasyOCR (e.g.,
bidimodule issues), try reinstalling:pip install --upgrade --force-reinstall python-bidi easyocr
Rust toolchain (for building from source):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cd /home/user/EasyOCR/rustOCR
cargo build --release
The binary will be available at target/release/rustocr.
cargo install --path .
# Simple OCR on an English image
./target/release/rustocr -i image.jpg
# OCR with Chinese and English
./target/release/rustocr -i chinese.jpg -l ch_sim,en
# Use CPU instead of GPU
./target/release/rustocr -i document.png -g false
# Get simple text output (no bounding boxes)
./target/release/rustocr -i image.jpg -d 0 -o text
# Detailed human-readable output
./target/release/rustocr -i image.jpg -o detailed
Options:
-i, --input <FILE> Input image file path
-l, --languages <LANGS> Languages to recognize (comma-separated) [default: en]
-g, --gpu <BOOL> Enable GPU acceleration [default: true]
-d, --detail <LEVEL> Detail level: 0 (text only) or 1 (full) [default: 1]
-o, --output <FORMAT> Output format: json, text, or detailed [default: json]
-h, --help Print help
-V, --version Print version
EasyOCR supports 80+ languages including:
See thefull list of supported languages.
[
{
"bbox": [[10, 20], [100, 20], [100, 50], [10, 50]],
"text": "Hello World",
"confidence": 0.9872
}
]
Hello World
Sample Text
--- Result 1 ---
Text: Hello World
Confidence: 0.9872
Bounding Box: [[10, 20], [100, 20], [100, 50], [10, 50]]
-g false if you don't have GPU support. Performance will be slower but still functional.Make sure EasyOCR is installed:
pip install easyocr
If you encounter GPU errors, try CPU mode:
./target/release/rustocr -i image.jpg -g false
Ensure the image path is correct and the file exists.
RustOCR uses PyO3 to bridge Rust and Python, calling the EasyOCR library at runtime:
┌─────────────┐
│ Rust CLI │ (Argument parsing, error handling)
│ (clap) │
└──────┬──────┘
│
↓
┌─────────────┐
│ PyO3 │ (Rust ↔ Python bridge)
└──────┬──────┘
│
↓
┌─────────────┐
│ EasyOCR │ (Python library)
│ (PyTorch) │
└─────────────┘
Apache-2.0 (matching the parent EasyOCR project)