1.3.0 • Published 5 days ago
@gutenye/ocr-browser v1.3.0
Guten OCR
an OCR Javascript library runs on Node.js, Browser and React Native
| Demo |
Based on PaddleOCR, supports PP-OCRv4 model
Examples
Getting Started
Node
bun add @gutenye/ocr-node
import Ocr from '@guenye/ocr-node'
const ocr = await Ocr.create()
const result = await ocr.detect('a.jpg')
Browser
bun add @gutenye/ocr-browser
import Ocr from '@gutenye/ocr-browser'
const ocr = await Ocr.create({
models: {
detectionPath: '/assets/ch_PP-OCRv4_det_infer.onnx',
recognitionPath: '/assets/ch_PP-OCRv4_rec_infer.onnx',
dictionaryPath: '/assets/ppocr_keys_v1.txt'
}
})
const result = await ocr.detect(imageUrl)
React Native
Due to opencv does not work on React Native. You need to implement the detectBoxes method by yourself
Related Projects
Name | Platforms | Note |
---|---|---|
eSearch-OCR | Electron | |
paddleocr-onnx | Node | Recogination part is incomplete |
ocrjs | Node | Recogination part is incomplete |
Paddle-Lite-Demo | Mobile, C++ |