Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
onnxjs-node
Advanced tools
onnxjs-node is a Node.js binding of ONNXRuntime that works seamlessly with ONNX.js.
Install the latest stable version:
npm install onnxjs-node
NOTE: binary files will be pulled from github during the npm install
process.
OS | Arch | CPU/GPU | NAPI version | Node.js version | ONNXRuntime version |
---|---|---|---|---|---|
Windows | x64 | CPU | v3 | v12.0.0+ | v1.4.0 |
Linux | x64 | CPU | v3 | v12.0.0+ | v1.4.0 |
macOS | x64 | CPU | v3 | v12.0.0+ | v1.4.0 |
Windows | x64 | GPU | v3 | v12.0.0+ | v1.4.0 |
Linux | x64 | GPU | v3 | v12.0.0+ | v1.4.0 |
There are 2 options to import onnxjs-node
.
onnxjs
by onnxjs-node
:
//const onnx = require('onnxjs');
const onnx = require('onnxjs-node');
// use 'onnx'
// ...
onnxjs-node
:
const onnx = require('onnxjs');
require('onnxjs-node'); // this line can be put on the top as well
// use 'onnx'
// ...
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.
Coming soon...
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
:
session = new onnx.InferenceSession({backendHint: 'wasm'}); // use WebAssembly backend
Copyright (c) fs-eire. All rights reserved.
Licensed under the MIT License.
FAQs
ONNXRuntime backend for ONNX.js
The npm package onnxjs-node receives a total of 3 weekly downloads. As such, onnxjs-node popularity was classified as not popular.
We found that onnxjs-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.