@aislamov/onnxruntime-web64

中文文档
1.0.6发布于 2023/11/07MITTypeScriptCommonJS近 30 天下载 3620

A Javascript library for running ONNX models on browsers

原始使用文档
文档目录8 节
  1. Why ONNX models
  2. Why ONNX Runtime Web
  3. Usage
  4. Documents
  5. Developement
  6. Compatibility
  7. Operators
  8. License

ONNX Runtime Web

ONNX Runtime Web is a Javascript library for running ONNX models on browsers and on Node.js.

ONNX Runtime Web has adopted WebAssembly and WebGL technologies for providing an optimized ONNX model inference runtime for both CPUs and GPUs.

Why ONNX models

The Open Neural Network Exchange (ONNX) is an open standard for representing machine learning models. The biggest advantage of ONNX is that it allows interoperability across different open source AI frameworks, which itself offers more flexibility for AI frameworks adoption.

Why ONNX Runtime Web

With ONNX Runtime Web, web developers can score models directly on browsers with various benefits including reducing server-client communication and protecting user privacy, as well as offering install-free and cross-platform in-browser ML experience.

ONNX Runtime Web can run on both CPU and GPU. On CPU side, WebAssembly is adopted to execute the model at near-native speed. ONNX Runtime Web complies the native ONNX Runtime CPU engine into WebAssembly backend by using Emscripten, so it supports most functionalities native ONNX Runtime offers, including full ONNX operator coverage, multi-threading, ONNX Runtime Quantization as well as ONNX Runtime Mobile. For performance acceleration with GPUs, ONNX Runtime Web leverages WebGL, a popular standard for accessing GPU capabilities. We are keeping improving op coverage and optimizing performance in WebGL backend.

See Compatibility and Operators Supported for a list of platforms and operators ONNX Runtime Web currently supports.

Usage

Refer to ONNX Runtime JavaScript examples for samples and tutorials.

Documents

Developement

Refer to the following links for development information:

Compatibility

OS/BrowserChromeEdgeSafariElectronNode.js
Windows 10wasm, webglwasm, webgl-wasm, webglwasm
macOSwasm, webglwasm, webglwasm, webglwasm, webglwasm
Ubuntu LTS 18.04wasm, webglwasm, webgl-wasm, webglwasm
iOSwasm, webglwasm, webglwasm, webgl--
Androidwasm, webglwasm, webgl---

Operators

WebAssembly backend

ONNX Runtime Web currently support all operators in ai.onnx and ai.onnx.ml.

WebGL backend

ONNX Runtime Web currently supports a subset of operators in ai.onnx operator set. See webgl-operators.md for a complete, detailed list of which ONNX operators are supported by WebGL backend.

WebGPU backend

WebGPU backend is still an experimental feature. See webgpu-operators.md for a detailed list of which ONNX operators are supported by WebGPU backend.

License

License information can be found here.

版本与发布记录

@aislamov/onnxruntime-web64 共发布 11 个版本,首次发布于 2023/07/18;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.0.6latest2023/11/073 年前
1.0.52023/11/073 年前
1.0.42023/11/073 年前
1.0.32023/10/233 年前
1.0.22023/09/293 年前
1.0.12023/09/203 年前

关于 @aislamov/onnxruntime-web64 的常见问题

@aislamov/onnxruntime-web64 是什么?

A Javascript library for running ONNX models on browsers

如何安装 @aislamov/onnxruntime-web64?

在项目目录运行 npm install @aislamov/onnxruntime-web64,或使用 pnpm add / yarn add / bun add。

@aislamov/onnxruntime-web64 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@aislamov/onnxruntime-web64 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@aislamov/onnxruntime-web64 可以商用吗?

@aislamov/onnxruntime-web64 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@aislamov/onnxruntime-web64 的下载量有多少?

根据 npm 官方下载统计,@aislamov/onnxruntime-web64 在 2026/10/05 – 2026/11/03 这 30 天内被下载 3,620 次,日均约 121 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@aislamov/onnxruntime-web64 还在维护吗?

最新版本 1.0.6 发布于 2023/11/07(3 年前);至今共发布 11 个版本,其中过去 12 个月发布了 0 个;首次发布于 2023/07/18。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。