Sony Spresense SDK Tensorflow Lite - Person Detection - tensorflow

I am trying to do the person detection using camera using tensorflow lite in spresense board. This is a sample program from sony developers in spresense website under examples of spresense sdk cli/gui examples for tensorflow lite.
Under this program they have made of examples/tf_person_detection to config. But when try to run this command , we are getting error as this file doesn't exist.
They have mentioned at the start to enable the tensorflow LM in Kconfig of spresense. We are not sure on how to exactly do that.
Can any please help us out here on how to create the tf_example file and configure the Kconfig with tensorflow LM.
Thank you

Related

TensorFlow Lite Arduino IDE Library

I am working on using TF Lite to get a trained TF model onto my board via the Arduino IDE. I am using the Circuit Playground Bluefruit board (listed as supported on the TF website). When I try to run the hello-world from the cloned library, I get an "Error in compiling for baord" message.
Adafruit mentions I need only the NON pre-compiled library, but it seems the library was removed from the native library manager a few years ago, making it difficult to find the pre-compiled library. I tried to install using:
git clone https://github.com/tensorflow/tflite-micro-arduino-examples Arduino_TensorFlowLite
which, of course, gets a pre-compiled version. I think this is what is behind the aforementioned error message. Any guidance would be so appreciated!!

Use a model trained by Google Cloud Vertex AI accelerated with TRT on Jetson Nano

I am trying to standardize our deployment workflow for machine vision systems. So we were thinking of the following workflow.
Deployment workflow
So, we want to create the prototype for the same, so we followed the workflow. So, there is no problem with GCP operation whatsoever but when we try to export models, which we train on the vertexAI it will give three models as mentioned in the workflow which is:
SaveModel
TFLite
TFJS
and we try these models to convert into the ONNX model but we failed due to different errors.
SaveModel - Always getting the same error with any parameter which is as follows
Error in savemodel
I tried to track the error and I identified that the model is not loading inside the TensorFlow only which is wired since it is exported from the GCP vertexAI which leverages the power of TensorFlow.
TFLite - Successfully converted but again the problem with the opset of ONNX but with 15 opset it gets successfully converted but then NVIDIA tensorRT ONNXparser doesn't recognize the model during ONNX to TRT conversion.
TFJS - yet not tried.
So we are blocked here due to these problems.
We can run these models exported directly from the vertexAI on the Jetson Nano device but the problem is TF-TRT and TensorFlow is not memory-optimized on the GPU so the system gets frozen after 3 to 4 hours of running.
We try this workflow with google teachable machine once and it workout well all steps are working perfectly fine so I am really confused How I conclude this full workflow since it's working on a teachable machine which is created by Google and not working on vertexAI model which is again developed by same Company.
Or am I doing Something wrong in this workflow?
For the background we are developing this workflow inside C++ framework for the realtime application in industrial environment.

How to deploy a Pytorch model in IBM Watson Machine learning using Python Client

I am not able to find any good reference for Deployment of a PyTorch Model in IBM Watson .
I have created Bert Model from Hugging face transformers library and implemented using Pytorch . Now i need to deploy the PyTorch model in IBM watson for real time prediction .
I have searched a lot but couldn't find any good reference of Deployment Steps to follow .
have you had a look at :
https://github.com/IBM/pytorch-on-watson-studio ?
This code pattern takes you through the steps to create a model (simple handwritten digit recognizer) in Watson Studio with PyTorch.
Log into IBM Watson Studio
Run the Jupyter notebook in Watson Studio
Use PyTorch to download and process the data
Use Watson Machine Learning to train and deploy the model

How to use a tensorflow-lite model in tensorflow for java

Is it possible to load tensorflow lite models with tensorflow for java?
I've testet the SavedModleBundle and org.tensorflow.Graph.importGraphDef
but it doesnt work.
By loading the GraphDef there is a java.lang.IllegalArgumentException: Invalid GraphDef exception.
It looks like the tflite interpreter was not implemented for tensorflow for java.
Best regards
To use tensorflow model on standalone java(not in android), you have to use SavedModleBundle and you need to compile with java compiler as described here. For that you need TensorFlow Jar Archive (JAR) and Java Native Interface (JNI) file from tensorflow.
It is not possible to use tflite model in standalone java applications.Tensorflow Lite is specifically used for mobile and embedded devices.

Converting Tensorflow 1.1 model into Tensorflow Lite

I want to convert my tensorflow 1.1 based model into tensorflow lite in order to serve the model locally and remotely for a PWA. The official guide only offers Python APIs for 1.11 at the earliest. Command line tools only seem to work starting at 1.7. Is it possible to convert a 1.1 model to tensorflow lite? Has anyone had experience with this?
The tf module is an out-of-the-box pre-trained model using BIDAF. I am having difficulty serving the full tf app on Heroku, which is unable to run it. I would like to try a tf lite app to see if hosting it locally will make it faster, and easier to set up as a PWA.