zibo-chen/rust-paddle-ocr

高性能OCR识别库,支持上百种语言,提供命令行、图形界面及C API多种调用方式,使用便捷高效。 High-performance OCR library powered by PaddleOCR v4/v5/v6 with MNN backend. Supports 10+ languages (Chinese, English, Japanese, Korean, Arabic, Cyrillic, Thai, etc). Provides Rust crate + C API + CLI tools. Fast, lightweight, easy-to-integrate.

What it solves

It provides a lightweight way to integrate Optical Character Recognition (OCR) into Rust applications. It allows developers to detect and recognize text within images across multiple languages without needing to implement the complex underlying machine learning pipelines from scratch.

How it works

The library acts as a Rust wrapper around PaddleOCR models, utilizing the MNN inference runtime for execution. It supports a full end-to-end OCR pipeline (detection and recognition) or standalone modes for just detection or just recognition. It can load models from files or memory and supports various hardware backends including CPU, Apple Metal, CUDA, and Vulkan to accelerate processing.

Who it’s for

Rust developers who need to add text extraction capabilities to their software, particularly those looking for a high-performance, lightweight implementation that supports a wide array of languages (including Chinese, English, Japanese, and various Latin scripts).

Highlights

  • Multi-Model Support: Compatible with PP-OCRv4, v5, and v6 (tiny, small, and medium tiers).
  • Hardware Acceleration: Supports multiple backends including CUDA, Vulkan, and Metal.
  • Robust Text Handling: Includes a "robust mode" to handle images with mixed horizontal and vertical text.
  • Character-Level Precision: Provides an additive alignment API to get the exact coordinates (hit testing) for individual characters.
  • Flexible Deployment: Includes a converter script to transform Paddle models into MNN FP16 format to reduce model size.

관련

  • 프로젝트
  • 프로젝트
  • 프로젝트
  • 프로젝트
  • 프로젝트