# @gutenye/ocr-node

> Guten OCR is a high accurate text detection (OCR) Javascript/Typescript library that runs on Node.js, Browser, React Native and C++. Based on PaddleOCR and ONNX runtime

Latest version **1.4.9** (published 2026-09-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @gutenye/ocr-node
pnpm add @gutenye/ocr-node
yarn add @gutenye/ocr-node
bun add @gutenye/ocr-node
```

## Health

**Score 60/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 1.4.9 |
| Published | 2026-09-19 |
| First published | 2024-05-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 4 |
| Unpacked size | 14.9 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 209 |
| Maintainers | gutenye |
| Keywords | ocr, paddleocr, typescript, onnxruntime, node |

## Links

- npm: https://www.npmjs.com/package/@gutenye/ocr-node
- Repository: https://github.com/gutenye/ocr
- Homepage: https://github.com/gutenye/ocr#readme
- Issues: https://github.com/gutenye/ocr/issues
- npm.io page: https://npm.io/package/@gutenye/ocr-node

## Dependencies (4)

- [sharp](https://npm.io/package/sharp.md) ^0.34.3
- [onnxruntime-node](https://npm.io/package/onnxruntime-node.md) ^1.22.0-rev
- [@gutenye/ocr-common](https://npm.io/package/@gutenye/ocr-common.md) ^1.2.0
- [@gutenye/ocr-models](https://npm.io/package/@gutenye/ocr-models.md) ^1.2.2

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.4.9 (latest) — 2026-09-19
- 1.4.8 — 2024-12-13
- 1.4.7 — 2024-12-04
- 1.4.4 — 2024-07-09
- 1.4.1 — 2024-05-20
- 1.4.0 — 2024-05-20
- 1.3.1 — 2024-05-20
- 1.3.0 — 2024-05-13
- 1.2.4 — 2024-05-08
- 1.2.2 — 2024-05-08
- 1.2.1 — 2024-05-02
- 1.2.0 — 2024-05-02
- 1.0.5 — 2024-05-01
- 1.0.4 — 2024-05-01
- 1.0.3 — 2024-05-01
- … 3 more at https://npm.io/package/@gutenye/ocr-node/versions

## README

# Guten OCR

> [Demo](https://gutenye-ocr.netlify.app/) | [Roadmap](https://github.com/users/gutenye/projects/5/views/4)

**an OCR Javascript library runs on Node.js, Browser, React Native and C++** 

Based on [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR) and [ONNX Runtime](https://github.com/microsoft/onnxruntime), supports PP-OCRv4 model

## Getting Started

### Node

> [Example](./packages/node/example/README.md)

```ts
bun add @gutenye/ocr-node
import Ocr from '@gutenye/ocr-node'
const ocr = await Ocr.create()
const result = await ocr.detect('a.jpg')
```

### Browser

> [Example](./packages/browser/example/README.md)

```ts
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('/a.jpg')
```

### React Native

> [Example](./packages/react-native/example/README.md)

```ts
bun add @gutenye/ocr-react-native
import Ocr from '@gutenye/ocr-react-native'
const ocr = await Ocr.create()
const result = await ocr.detect('a.jpg')
```

### C++

> [Example](./packages/react-native/cpp/example/README.md)

```cpp
#include "native-ocr.h"
NativeOcr* ocr = new NativeOcr(..)
auto result = ocr->detect("a.jpg");
```

### API Reference

```ts
Ocr.create({
  models?: {
    detectionPath: string
    recognitionPath: string
    dictionaryPath: string
  },
  isDebug?: boolean
  debugOutputDir?: string // Node only
  recognitionImageMaxSize?: number // RN only
  detectionThreshold?: number // RN only
  detectionBoxThreshold?: number // RN only
  detectionUnclipRatiop?: number // RN only
  detectionUseDilate?: boolean // RN only
  detectionUsePolygonScore?: boolean // RN only
  useDirectionClassify?: boolean // RN only
  onnxOptions?: {}       // Node only. Pass to ONNX Runtime
}): Promise<Ocr>

ocr.detect(imagePath: string | {data: Uint8Array | Uint8ClampedArray | Buffer, width: number, height: number}, {
  onnxOptions?: {}     // Node only. Pass to ONNX Runtime
}): Promise<{texts: TextLine[], resizedImageWidth: number, resizedImageHeight: number}>

TextLine {
  text: string
  score: number
  frame: { top, left, width, height }
}

```

## Development

- Requires Git LFS to clone the repo

```sh
brew install git-lfs 
git clone git@github.com:gutenye/ocr.git
```

- [Development](docs/Development.md)

## Related Projects

| Name                                                           | Platforms | Note                            |
| -------------------------------------------------------------- | --------- | ------------------------------- |
| [eSearch-OCR](https://github.com/xushengfeng/eSearch-OCR)      | Electron  |                                 |
| [paddleocr-onnx](https://github.com/backrunner/paddleocr-onnx) | Node      | Recogination part is incomplete |
| [ocrjs](https://github.com/SOVLOOKUP/ocrjs)                    | Node      | Recogination part is incomplete |
| [Paddle-Lite-Demo](https://github.com/PaddlePaddle/Paddle-Lite-Demo) | Mobile, C++ | |

## License

The source code of this project is licensed under the [MIT](./LICENSE) license.

The model and dictionary assets in `packages/models/assets` are **not** covered by the MIT license. They come from [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR) and remain under its [Apache-2.0](https://github.com/PaddlePaddle/PaddleOCR/blob/main/LICENSE) license.

---
_Source: https://npm.io/package/@gutenye/ocr-node · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
