TensorFlow Raspberry Pi Examples - python

I'm really not familiar with make. So I don't understand the meaning of those steps in 2 tutorials ("TensorFlow Makefile" and "TensorFlow Raspberry Pi Examples") to make my project on laptop work on raspberry pi 2
TensorFlow Makefile:
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/makefile
TensorFlow Raspberry Pi Examples:
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/pi_examples
As far as i know,"TensorFlow Makefile" will convert the tensorflow source,lib to executable file. "TensorFlow Raspberry Pi Examples" means convert your project to executable file then run the file in your_project/gen/bin/your_project
tensorflow/contrib/pi_examples/label_image/gen/bin/label_image
Hence,if I have a project on my laptop and want to load my project into Pi 2 ("TensorFlow Makefile" is already done). I just copy it to my pi 2 and do :
make -f tensorflow/my_project/Makefile
then run :
tensorflow/my_project/gen/bin/my_project
This is how to make your project work on raspberry pi 2, right ?

This will only work for Makefiles which have the option to cross-compile from a (presumably) x86(_64?)-architecture laptop to an ARM-architecture Raspberry Pi.
You're in luck, though: Google's included options in TensorFlow's Makefile to cross-compile between architectures!
If you look at line 123 of the Makefile, you'll see a comment about this.
Default to running on the same system we're compiling on.
You should override TARGET on the command line if you're cross-compiling, e.g.
make -f tensorflow/contrib/makefile/Makefile TARGET=ANDROID
So, simply make the project like so:
$ make -f tensorflow/contrib/makefile/Makefile TARGET=PI
This will compile TensorFlow for the RPi.
Incidentally, if you can, it may be easier to simply compile TensorFlow on the RPi by either pulling the sources from git or transferring it onto the RPi via USB, and building there.

Related

How to install tensorflow on a raspberry pi 4 running Manjaro

I am trying to get tensorflow installed on a raspberry pi 4 which is running manjaro. It is to use the open source BNN library Larq, which recommended manjaro as an OS because it was 64bit as opposed to Raspbian. I have tried to install using yay from Archlinux user repository but got a couple different errors, like: "tensorflow/workspace.bzl: patch does not apply" and a failure to download. Any suggestions, I am very new to manjaro.
As a side note, I am not particularly stuck to Manjaro is anyone has experience using Larq and the larq compute engine on a RPi4 with a different OS any insight there would be helpful as well.
Thank you!
I cannot help you with Manjaro. However, I used Ubuntu 20.04 (64 bits) on my RPI4. I suppose you need the RPI4 to deploy and run your BNNs. If I am correct, I give you the following advice.
Please, note that the RPI4 is needed only to run LCE models (*.tflite). To this end, you don't need to install Tensorflow on your RPI4.
For everything else (see below) you can use a regular Linux box.
To check if everything is fine with your runtime environment (i.e. the RPI4), You can use your main Larq+LCE installation to convert one of your models into an LCE model and test it with the benchmark tool available here. For the RPI4+Ubuntu you should use lce_benchmark_model_aarch64.
If you need to compile your own BNN-based applications for your RPI4, you can follow the build guide on the LCE website. I did it once a long time ago. I used the LCE Docker to have a working environment. Then, from the inside of the docker, I followed the ARM guide: "Cross-compiling with Make" version.
I hope this helps.

Blynk change properties of GPIO

I have a small problem with the python library of BLYNK: I need to set the properties of an appbutton with
blynk.set_property("G20", "offBackColor", "#000000")
It only works with
blynk.set_property("20", "offBackColor""#000000")
with a virtual pin. I followed some tutorials from github, pypi and their own tutorials but nothing worked.
I use Python3 and a raspberry pi 4

OpenCV installation Raspberry Pi 3B model

I am trying to install OpenCV in raspberry pi 3B but every time I try to install it gives error during compilation. I have been trying this for a long time and I don't know how to do it. I have followed mainly all the instruction given in these articles :
Install opencv 4 on raspberry pi
Install guide raspberry pi 3 raspbian jessie opencv 3
I had the same error a few weeks ago and for me it works when I just use
make -j
instead of
make -j4
-j4 simply means that the raspberry pi uses all for cpu cores instead of just one with make -j
Hope I could help and please write if that works for you as well ;)

How to Copy Library between python installations

Here is the situation:
Raspberry pi 2 running raspbian running python 3.5.2 with Opencv,Numpy,pyusb
Orange pi pc running Armbian.
Both boards are quad-core arm.
So the question is can i somehow transfer the libraries from one distro to another without recompiling them? It would save me hours.
If not can i just transfer Opencv as this is the main culprit.
Thanks in advance.

Raspbian Jessie (RPI3) boot options not launching Desktop

I'm trying to connect raspberry pi with MatLab. I use the toolbox within matlab to configure raspberry pi. It automatically connects through network however it also gives you OS within that setup procedure, you can't connect to raspberry pi without it. Although the system it gives is technically Raspbian Jessie it comes with limited package.
When it launches and I input dir into console it only shows files such as: satkin_ws install ros_indigo.sh install_ros_package.sh and ros_catkin_ws. No other folders or files are pre-loaded onto the system. I tried to install some packages for display manager such as gdm3 and lightdm but I still have a problem with loading desktop environment. Can someone give me suggestions on how to resolve this issue?
Alright after doing some research I found that the system installed by Matlab is Raspbian Jessie Lite which does not come with GUI/Desktop environment by default but you can install it you want. Here is the link to get you going:
https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=133691

Categories

Resources