Skip to content
This repository was archived by the owner on Jun 4, 2021. It is now read-only.

Commit c0fb631

Browse files
authored
archive repo
1 parent 197a76b commit c0fb631

File tree

1 file changed

+1
-55
lines changed

1 file changed

+1
-55
lines changed

README.md

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -4,58 +4,4 @@
44
# onnxjs-node
55
**onnxjs-node** is a Node.js binding of [ONNXRuntime](https://github.com/Microsoft/onnxruntime) that works seamlessly with [ONNX.js](https://github.com/Microsoft/onnxjs).
66

7-
## Installation
8-
Install the latest stable version:
9-
```
10-
npm install onnxjs-node
11-
```
12-
13-
*NOTE: binary files will be pulled from github during the `npm install` process.*
14-
15-
## Supported Platforms
16-
OS |Arch |CPU/GPU |NAPI version |Node.js version | ONNXRuntime version
17-
---------|-----|--------|-------------|----------------|---------------------
18-
Windows | x64 | CPU | v3 | v12.0.0+ | v1.4.0
19-
Linux | x64 | CPU | v3 | v12.0.0+ | v1.4.0
20-
macOS | x64 | CPU | v3 | v12.0.0+ | v1.4.0
21-
Windows | x64 | GPU | v3 | v12.0.0+ | v1.4.0
22-
Linux | x64 | GPU | v3 | v12.0.0+ | v1.4.0
23-
24-
## Usage
25-
There are 2 options to import `onnxjs-node`.
26-
- Option 1 - replace `onnxjs` by `onnxjs-node`:
27-
```js
28-
//const onnx = require('onnxjs');
29-
const onnx = require('onnxjs-node');
30-
31-
// use 'onnx'
32-
// ...
33-
```
34-
- Option 2 - add a single line to require `onnxjs-node`:
35-
```js
36-
require('onnxjs');
37-
require('onnxjs-node'); // this line reset global variable 'onnx'
38-
39-
// use global variable 'onnx'
40-
// ...
41-
```
42-
43-
After `onnxjs-node` is imported, the default inference session class of ONNX.js will be overwritten. Any existing ONNX.js code will continue to work and model will run by ONNXRuntime backend.
44-
45-
## Options
46-
### Enable/Disable GPU
47-
Coming soon...
48-
### Backend Fallback
49-
After `onnxjs-node` is imported, ONNXRuntime backend will be used by default. However, it is possible to fallback to other backend by specifying the session option `backendHint`:
50-
```js
51-
session = new onnx.InferenceSession({backendHint: 'wasm'}); // use ONNX.js WebAssembly backend
52-
```
53-
54-
## Documentation
55-
- [ONNX.js Home](https://github.com/Microsoft/onnxjs)
56-
- [ONNXRuntime Node.js binding](https://github.com/Microsoft/onnxruntime/nodejs)
57-
58-
# License
59-
Copyright (c) fs-eire. All rights reserved.
60-
61-
Licensed under the [MIT](https://github.com/fs-eire/onnxjs-node/blob/master/LICENSE) License.
7+
UPDATE on 2021-06-03: This repo is archived. Please refer to official [ONNX Runtime Node.js binding](https://github.com/microsoft/onnxruntime/tree/master/js/node).

0 commit comments

Comments
 (0)