# esearch-seg

> paddleseg models run on onnx

Latest version **1.1.9** (published 2026-08-13) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install esearch-seg
pnpm add esearch-seg
yarn add esearch-seg
bun add esearch-seg
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.1.9 |
| Published | 2026-08-13 |
| First published | 2023-07-11 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 34.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 2 |
| Author | xsf |
| Maintainers | xushengfeng |
| Keywords | seg, paddleseg, onnx |

## Links

- npm: https://www.npmjs.com/package/esearch-seg
- Repository: https://github.com/xushengfeng/eSearch-seg
- Issues: https://github.com/xushengfeng/eSearch-seg/issues
- npm.io page: https://npm.io/package/esearch-seg

## Recent versions

- 1.1.9 (latest) — 2026-08-13
- 1.1.8 — 2025-07-02
- 1.1.4 — 2024-07-23
- 1.1.3 — 2024-06-17
- 1.1.2 — 2024-06-16
- 1.1.0 — 2024-03-28
- 1.0.0 — 2023-07-11

## README

# eSearch-seg

本仓库是 [eSearch](https://github.com/xushengfeng/eSearch)的录屏人像识别依赖

基于 [PaddleSeg](https://github.com/PaddlePaddle/PaddleSeg)

基于[onnxruntime](https://github.com/microsoft/onnxruntime)的 web runtime，使用 wasm 运行，未来可能使用 webgl 甚至是 webgpu。

模型需要转换为 onnx 才能使用：[Paddle2ONNX](https://github.com/PaddlePaddle/Paddle2ONNX) 或[在线转换](https://www.paddlepaddle.org.cn/paddle/visualdl/modelconverter/x2paddle)

在 js 文件下使用 electron 进行调试（需要 HTML canvas，暂不支持纯 nodejs）

## 使用

```shell
npm i esearch-seg
```

web

```javascript
import * as seg from "esearch-seg";
```

nodejs

```javascript
const seg = require("esearch-seg");
```

```javascript
await seg.init({
    segPath: "seg.onnx",
});

let img = document.createElement("img");
img.src = "data:image/png;base64,...";
img.onload = async () => {
    let canvas = document.createElement("canvas");
    canvas.width = img.width;
    canvas.height = img.height;
    canvas.getContext("2d").drawImage(img, 0, 0);
    seg.seg(canvas.getContext("2d").getImageData(0, 0, img.width, img.height))
        .then((data) => {})
        .catch((e) => {});
};
```

init type

```typescript
{
    segPath: string;
    node?: boolean;
    dev?: boolean;
    ort?: typeof import("onnxruntime-web");
```

ocr type

```typescript
seg(img: ImageData): Promise<ImageData> // 人像
```

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