tflite_web 0.1.0
tflite_web: ^0.1.0 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 (link) into 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 -
Sample Code:
await TFLiteWeb.initialize();
final loadedModel = await TFLiteModel.fromUrl(modelUrl);
final input = createTensor(data, shape, dataType);
final outputs = loadedModel.predict(input);
Current Version: #
- TF-JS: 4.2.0
- TF-JS TFLite: 0.0.1-alpha.9