TensorFlow Lite Arduino IDE Library - tensorflow

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!!

Related

Deep learning on SHArC processors?

Does anyone know what are the possibilities for running ML/AI algos on a SHArC processor (ADSP 2156x) via a 3rd party C/C++ library?
Existing algo is done in Python using the TensorFlow py package. The algo I easily ported to Arm because the TensorFlow C code can be compiled for Arm (using CMake, here is the makefile to check which CPUs/OSes are supported).
What about trying to compile the TensorFlow for SHArC, is it hopeless?
Are there any other deep learning libraries available for SHArC processors?

Sony Spresense SDK Tensorflow Lite - Person Detection

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

gstreamer custom plugin for nvidia gpu

I want to develop a gstreamer plugin that can use the acceleration provided by the GPU of the graphics card (NVIDIA RTX2xxx). The objective is to have a fast gstreamer pipeline that process a video stream including on it a custom filter.
After two days googling, I can not find any example or hint.
One of the best alternatives found is use "nvivafilter", passing a cuda module as argument. However, no where explains how to install this plugin or provides an example. Worst, it seems that it could be specific for Nvidia Jetson hardware.
Another alternative seems use gstreamer inside an opencv python script. But that means a mix that I do not known how impacts performance.
This gstreamer tutorial talks about several libraries. But seems outdated and not provides details.
RidgeRun seems to have something similar to "nvivafilter", but not FOSS.
Has someone any example or suggestion about how to proceed.
I suggest you start with installing DS 5.0 and explore the examples and the apps provided. It's built on Gstreamer. Deepstream Instalation guide
The installation is straight forward. You will find custom parsers built.
You will need to install the following: Ubuntu 18.04, GStreamer 1.14.1, NVIDIA driver 440or later,CUDA 10.2,TensorRT 7.0 or later.
Here is an example of running an app with 4 streams. deepstream-app -c /opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt
The advantage of DS is that all the video pipeline is optimized on GPU including decoding and preprocessing. You can always run Gstreamer along opencv only, in my experience it's not an efficient implementation.
Building custom parsers:
The parsers are required to convert the raw Tensor data from the inference to (x,y) location of bounding boxes around the detected object. This post-processing algorithm will vary based on the detection architecture.
If using Deepstream 4.0, Transfer Learning Toolkit 1.0 and TensorRT 6.0: follow the instructions in the repository https://github.com/NVIDIA-AI-IOT/deepstream_4.x_apps
If using Deepstream 5.0, Transfer Learning Toolkit 2.0 and TensorRT 7.0: keep following the instructions from https://github.com/NVIDIA-AI-IOT/deepstream_tlt_apps
Resources:
Starting page: https://developer.nvidia.com/deepstream-sdk
Deepstream download and resources: https://developer.nvidia.com/deepstream-getting-started
Quick start manual: https://docs.nvidia.com/metropolis/deepstream/dev-guide/index.html
Integrate TLT model with Deepstream SDK: https://github.com/NVIDIA-AI-IOT/deepstream_tlt_apps
Deepstream Devblog: https://devblogs.nvidia.com/building-iva-apps-using-deepstream-5.0/
Plugin manual: https://docs.nvidia.com/metropolis/deepstream/plugin-manual/index.html
Deepstream 5.0 release notes: https://docs.nvidia.com/metropolis/deepstream/DeepStream_5.0_Release_Notes.pdf
Transfer Learning Toolkit v2.0 Release Notes: https://docs.nvidia.com/metropolis/TLT/tlt-release-notes/index.html
Transfer Learning Toolkit v2.0 Getting Started Guide: https://docs.nvidia.com/metropolis/TLT/tlt-getting-started-guide/index.html
Metropolis documentation: https://docs.nvidia.com/metropolis/
TensorRT: https://developer.nvidia.com/tensorrt
TensorRT documentation: https://docs.nvidia.com/deeplearning/tensorrt/developer-guide/index.html
TensorRT Devblog: https://devblogs.nvidia.com/speeding-up-deep-learning-inference-using-tensorrt/
TensorRT Open Source Software: https://github.com/NVIDIA/TensorRT
https://gstreamer.freedesktop.org/documentation/base/gstbasetransform.html?gi-language=cGood luck.

Tensorflow not working on Python 3.7, Mac OS, and Pycharm

Attempting to run tensorflow a Mac, using python 3.7 as well as PyCharm and receiving where module tensorflow has no attribute app, at the following.
I've run through a number of potential solutions. Following the instructions provided on this question: Installing tensorflow on Pycharm (Mac). I've managed to successfully create a virtual-env in which I installed the tensorflow package however this folder contains
nothing but the init.py and pycache and the error remains.
I've also tried copying the contents of the tensorflow GitHub repo directly into this folder but it results in an ImportError.
Not sure what the issue is. Should I switch to python 2.7?
Python 3.7 is still unsupported as of this moment by tensorflow.

How can I build libtensorflow.so for the Tensorflow Rust bindings without SSE?

I've been trying to use the Tensorflow Rust community bindings on Ubuntu 16.04 32bit. The compilation succeeds, and I have a working libtensorflow.so file that
links properly with the Rust program, but as soon as I run the program I get the following error:
F tensorflow/core/platform/cpu_feature_guard.cc:35] The TensorFlow library was compiled to use SSE instructions, but these aren't available on your machine.
I've tried several solutions, and I've successfully gotten the libtensorflow_cc.so shared library to work, but the same solutions that worked for that don't work for the libtensorflow.so shared library. I'm trying to compile the r1.0 tag from the main tensorflow github repository.
The tensorflow.bzl doesn't have the line referenced in this answer, so that solution wouldn't apply. I've also tried compiling with bazel build --copt=-mno-sse ..., but that also did not work. Any ideas as to how to fix this?