onnxruntime/js/react_native
2021-05-20 09:52:34 -07:00
..
android ONNX Runtime React Native Library (#7564) 2021-05-11 10:34:40 -07:00
example update debug.keystore for a public usage (#7696) 2021-05-14 09:54:54 -07:00
ios ONNX Runtime React Native Library (#7564) 2021-05-11 10:34:40 -07:00
lib ONNX Runtime React Native Library (#7564) 2021-05-11 10:34:40 -07:00
scripts ONNX Runtime React Native Library (#7564) 2021-05-11 10:34:40 -07:00
.gitignore ONNX Runtime React Native Library (#7564) 2021-05-11 10:34:40 -07:00
.npmignore ONNX Runtime React Native Library (#7564) 2021-05-11 10:34:40 -07:00
babel.config.js ONNX Runtime React Native Library (#7564) 2021-05-11 10:34:40 -07:00
onnxruntime-react-native.iphoneos.podspec ONNX Runtime React Native Library (#7564) 2021-05-11 10:34:40 -07:00
onnxruntime-react-native.iphonesimulator.podspec ONNX Runtime React Native Library (#7564) 2021-05-11 10:34:40 -07:00
package.json [js] update version of package "onnxruntime-web" and "onnxruntime-react-native" (#7769) 2021-05-20 09:52:34 -07:00
README.md ONNX Runtime React Native Library (#7564) 2021-05-11 10:34:40 -07:00
tsconfig.build.json ONNX Runtime React Native Library (#7564) 2021-05-11 10:34:40 -07:00
tsconfig.json ONNX Runtime React Native Library (#7564) 2021-05-11 10:34:40 -07:00
tsconfig.scripts.json ONNX Runtime React Native Library (#7564) 2021-05-11 10:34:40 -07:00
yarn.lock ONNX Runtime React Native Library (#7564) 2021-05-11 10:34:40 -07:00

onnxruntime-react-native

ONNX Runtime React Native provides a JavaScript library for running ONNX models on React Native app.

Installation

yarn add onnxruntime-react-native

Usage

import { InferenceSession } from "onnxruntime-react-native";

// load a model
const session: InferenceSession = await InferenceSession.create(modelPath);
// input as InferenceSession.OnnxValueMapType
const result = session.run(input, ['num_detection:0', 'detection_classes:0'])

Refer to ONNX Runtime JavaScript examples for samples and tutorials. Different from other JavaScript frameworks like node.js and web, React Native library doesn't support these features

  • Unsigned data type at Tensor
  • Model loading using ArrayBuffer

License

License information can be found here.