ONNX.js – A Javascript library to run ONNX models in browsers and Node.js
by Emma Ning (Microsoft)
ONNX.js is a Javascript library for running ONNX models on browsers and on Node.js, on both CPU and GPU. Thanks to ONNX interoperability, it’s also
compatible with Tensorflow and Pytroch. For running on CPU, ONNX.js adopts WebAssembly to execute the model at near-native speed and utilizes Web Workers to provide a “multi-threaded” environment, achieving very promising performance gains. For running on GPU, ONNX.js takes advantage of WebGL which is a popular standard for accessing GPU capabilities. By reducing data transfer between CPU and GPU as well as GPU processing cycles, ONNX.js further push the performance to the maximum.
00:29 JS-based Client-side applications
01:45 JS-based Clientside Machine Learning
03:48 ONNX.JS Background -ONNX
04:44 ONNX converters for popular frameworks
05:44 ONNX Community
06:26 ONNX.js
11:31 Model inference with ONNX.JS
11:56 HTML example to use ONNX.js
12:17 Using NPM and bundling tools to use ONNX.js
12:27 ONNX.js Demo
13:13 We’d love to embrace your contribution
source
linux foundation