arcships/light-ocr
Fast, offline OCR for Node.js & C++. PP-OCRv6 with Core ML / WebGPU hardware acceleration — recognize text in images with confidence scores & coordinates. npm: @arcships/light-ocr
What it solves
light-ocr is a fast, offline Optical Character Recognition (OCR) engine designed for Node.js and C++ applications. It allows developers to extract text from images (JPEG, PNG, or raw pixel data) locally on the user's machine, eliminating the need for external cloud APIs and ensuring data privacy.
How it works
The project uses the PP-OCRv6 Small model to recognize text. It provides a high-performance C++ core with bindings for Node.js. To optimize speed and reduce CPU load, it automatically detects the hardware and applies acceleration: using Core ML on Apple Silicon (macOS 15+), and WebGPU (via Vulkan or D3D12) on Linux and Windows.
Who it’s for
Developers building Node.js or C++ applications that require local, high-performance text recognition from images without relying on cloud services.
Highlights
- Local Processing: All images and results stay on the machine, ensuring privacy.
- Hardware Acceleration: Automatic support for Core ML and WebGPU to significantly speed up recognition and reduce CPU usage.
- Tiled Mode: An optional mode to preserve the accuracy of small or dense text in high-resolution images.
- Lighweight Installation: The npm package includes the model and prebuilt components for major platforms.
- Detailed Output: Returns text, confidence scores, and quadrilateral coordinates for every recognized line.