client-side-ocr
v2.1.0
Published
High-performance client-side OCR with ONNX Runtime, RapidOCR and PPU PaddleOCR integration. 100+ language support. Process text from images entirely in the browser with state-of-the-art accuracy and complete privacy.
Maintainers
Readme
client-side-ocr
High-performance client-side OCR library with ONNX Runtime, supporting 100+ languages. Process text from images entirely in your browser with complete privacy.
Features
- 🚀 100% Client-Side: All processing happens in the browser
- 🌍 100+ Languages: Comprehensive multi-language support
- 🔒 Complete Privacy: Your data never leaves your device
- ⚡ High Performance: GPU acceleration with WebGL
- 📦 Small Size: 15-30MB total (cached after first use)
- 🎯 Multiple Models: RapidOCR and PPU PaddleOCR support
- 📱 PWA Ready: Works offline after initial load
Installation
npm install client-side-ocrQuick Start
import { createRapidOCREngine } from 'client-side-ocr';
// Create OCR engine
const ocr = createRapidOCREngine({
language: 'en', // or 'ch', 'ja', 'ko', etc.
modelVersion: 'PP-OCRv4'
});
// Initialize (downloads models if needed)
await ocr.initialize();
// Process an image
const result = await ocr.processImage(imageFile);
console.log(result.text);React Component
import { RapidOCRInterface } from 'client-side-ocr/react';
function App() {
return (
<RapidOCRInterface
defaultLanguage="en"
onResult={(result) => console.log(result.text)}
/>
);
}Documentation
Supported Languages
English, Chinese, Japanese, Korean, French, German, Spanish, Portuguese, Italian, Russian, Arabic, Hindi, Vietnamese, Indonesian, Persian, Kannada, and 80+ more languages.
