tflite_web 0.0.2
tflite_web: ^0.0.2 copied to clipboard
Run Tensorflow Lite models using TFLite JS and WebAssembly on browser
TFLite Web #
Run TFLite models on Dart JS. It is packaged in a WebAssembly binary that runs in a browser
Getting Started #
-
Unpack tflite folder (link) to your web folder. Result structure:
-- Web
├── tflite
├── tf-backend-cpu.js
├── tf-core.js
├── tf-tflite.min.js
├── tflite_web_api_cc_simd.js
├── tflite_web_api_cc_simd.wasm -
Initialize dependencies:
TFLiteWeb.initialize() -
Load a model:
From URLTFLiteWeb.loadModelFromUrl
From DataTFLiteWeb.loadModelFromMemory -
Create Tensor:
createTensor(data, shape, dataType) -
Run model:
loadedModel.predict(inputs)
Current Version: #
- TF JS: 4.2.0
- TFLite: 0.0.1-alpha.9