Dicklesworthstone/franken_ocr
Pure-Rust, CPU-only OCR engine for Baidu Unlimited-OCR (a DeepSeek-OCR-derived 3B MoE VLM). Five-model zoo, custom int8 kernels, no ML framework, no Python, no GPU.
What it solves
franken_ocr provides a way to run high-quality document parsing and vision-language models on standard CPUs without needing a GPU, Python, or heavy machine learning frameworks like CUDA. It is designed for environments where shipping large dependencies is impractical, such as edge devices, CI runners, or local agent hosts.
How it works
It uses a single, portable Rust binary (focr) that executes hand-optimized kernels for specific, pre-defined vision-language models. Instead of using a generic ML engine, it transforms model checkpoints into custom .focrq artifacts. These artifacts run offline, and the engine includes built-in support for rasterizing PDFs, splitting book spreads, and extracting figures. It supports a specific zoo of models, including Baidu Unlimited-OCR for general documents, GOT-OCR2 for structured data, and TrOMR for sheet music.
Who it’s for
This tool is for developers and engineers who need reliable, offline OCR and vision-language capabilities in resource-constrained environments or within Rust-based applications. It is particularly useful for those who want to avoid the complexity of managing Python environments or GPU-dependent software stacks.
Highlights
- Portable: A single binary with no Python, CUDA, or GPU requirements.
- Offline: Once model weights are pulled, inference runs entirely without network access.
- Versatile: Supports document OCR, chart data extraction, image description, and sheet music transcription.
- Developer-Friendly: Provides a synchronous Rust API for embedding, plus a CLI that outputs Markdown, structured JSON, or NDJSON for agent pipelines.
- Performance-Focused: Uses shape-specialized kernels and ISA-specific dispatch (e.g., AVX-512, Apple Silicon) to maximize CPU efficiency.
- Transparent: Includes a performance ledger and parity testing to ensure accuracy and document how the engine performs against reference models.
Related
- Project
- Project
- Project
- Project
- Project