onnxruntime-react-native
TypeScript icon, indicating that this package has built-in type declarations

1.19.2 • Public • Published

onnxruntime-react-native

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

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 React Native

With ONNX Runtime React Native, React Native developers can score pre-trained ONNX models directly in React Native apps by leveraging ONNX Runtime, so it provides a light-weight inference solution for Android and iOS.

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. The ONNX Runtime React Native library does not currently support the following features:

  • Tensors with unsigned data types, with the exception of uint8 on Android devices
  • Model loading using ArrayBuffer

Operator and type support

ONNX Runtime React Native version 1.13 supports both ONNX and ORT format models, and includes all operators and types.

Previous ONNX Runtime React Native packages use the ONNX Runtime Mobile package, and support operators and types used in popular mobile models. See here for the list of supported operators and types.

License

License information can be found here.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.19.2112latest
1.19.0-dev.20240804-ee2fe87e2d10dev

Version History

VersionDownloads (Last 7 Days)Published
1.19.2112
1.19.0242
1.19.0-dev.20240804-ee2fe87e2d10
1.18.0247
1.18.0-dev.20240430-204f1f59b90
1.17.30
1.17.17
1.17.059
1.17.0-dev.20240118-a63b71eadb0
1.16.315
1.16.21
1.16.11
1.16.04
1.16.0-dev.20230908-a9df3aea722
1.16.0-dev.20230820-cbaa0083912
1.16.0-dev.20230712-a396a15fa61
1.16.0-dev.20230704-d540c7da0f1
1.15.1109
1.16.0-dev.20230606-f0139658311
1.15.00
1.15.0-dev.20230502-abdd4f518a0
1.15.0-dev.20230430-31e7d3d7d40
1.15.0-dev.20230411-0fbf7158240
1.15.0-dev.20230317-e42f7487df0
1.15.0-dev.20230212-12d91173c40
1.14.01
1.15.0-dev.20230131-e2dd1315c70
1.14.0-dev.20230119-b51415b0ea0
1.14.0-dev.20221124-4ca62b9ee80
1.13.10
1.13.0-dev.20221007-f4b944e1a0
1.13.0-dev.20221001-0cf17b1921
1.13.0-dev.20220927-94e34ace13
1.13.0-dev.20220904-ac4f1bf960
1.13.0-dev.20220812-95f2a3e7e0
1.13.0-dev.20220808-bdd6b00c90
1.12.13
1.12.01
1.12.0-dev.20220708-c6732c0790
1.12.0-dev.20220707-62226d0300
1.12.0-dev.20220614-f6d2b629a0
1.12.0-dev.20220607-40d2c98e40
1.12.0-dev.20220520-e3a2d5cca0
1.12.0-dev.20220517-4dd3cc40c0
1.12.0-dev.20220516-c556f5f220
1.12.0-dev.20220510-3437967e60
1.12.0-dev.20220505-084165c740
1.12.0-dev.20220429-49d7050b81
1.11.00
1.11.0-dev.20220318-b713855a90
1.11.0-dev.20220228-eb116595d2
1.11.0-dev.20220220-4d3cd2f680
1.11.0-dev.20220217-8d06e5a9d0
1.8.13
1.7.0-dev.00

Package Sidebar

Install

npm i onnxruntime-react-native

Weekly Downloads

808

Version

1.19.2

License

MIT

Unpacked Size

168 kB

Total Files

50

Last publish

Collaborators

  • onnxruntime
  • hanbitmyths