Search code examples
nativescripttensorflow.jstensorflow-lite

Tensorflow lite with NativeScript


I am trying to create a mobile app using NativeScript. since the device on which this model will be running is a mobile device, it makes sense to use tflite model. My question is how to use tflite with javascript. and if that is not possible, would tensorflow.js be efficient to be used on a mobile device ??

NOTE: I did look through the documentation of tensorflow.js and didn't find a module for tflite


Solution

  • You could use a custom model through nativescript's firebase plugin.

    You will need to add the following to your firebase.nativescript.json to enable the custom model capabilities

    "ml_kit_custom_model": true,
    

    You can then add your custom model (tensorflow lite) following firebase's official docs and some additional configs that needs to be done on the Nativescript side.