tensorflow-on-raspberry-pi icon indicating copy to clipboard operation
tensorflow-on-raspberry-pi copied to clipboard

binary for tf 1.2 release

Open cezarfx opened this issue 8 years ago • 25 comments

Any plans for a 1.2 release?

cezarfx avatar Jun 20 '17 17:06 cezarfx

Eventually! My Pis are in storage as I'm in the process of moving, so I won't be able to get to this for a few weeks.

samjabrahams avatar Jun 22 '17 04:06 samjabrahams

I managed to build Tensorflow 1.2.1 following Sam Abrahm's Step-By-Step Guide and changing this file. Here is the wheel file, but only for Python 2.7

elswork avatar Jul 23 '17 22:07 elswork

I managed to build Tensorflow 1.3.0 with the same environment than the last time, starting at step 4. Compiling TensorFlow, doing a Bazel clean and the same file change. Here is the wheel file tensorflow-1.3.0-cp27-none-linux_armv7l.whl, but only for Python 2.7

elswork avatar Aug 22 '17 23:08 elswork

That worked perfectly. I had to update enum, as per this thread. Thanks for saving us the effort :)

anupamsobti avatar Sep 03 '17 13:09 anupamsobti

@DeftWork any chance of getting a copy of 1.3.0 built for Python 3? The libraries I'm working with require P3, and sadly I've had little luck trying to build tensorflow myself. (In my defence, my pi skills are a little rusty).

G-Rath avatar Oct 31 '17 01:10 G-Rath

@G-Rath Yes, for sure, but now I've run out of MicroSD cards, I will build it ASAP.

elswork avatar Nov 01 '17 01:11 elswork

Building it right now, tomorrow we will see if it ends successfuly, after that I will try to do the same with latest release, Tensorflow 1.4.0 https://twitter.com/elswork/status/926228015411089408

elswork avatar Nov 03 '17 22:11 elswork

@DeftWork Awesome, thanks a million :D

G-Rath avatar Nov 04 '17 08:11 G-Rath

Tensorflow 1.4.0 would require a little bit of work: You have bazel 0.4.5- (@non-git) installed. Please upgrade your bazel installation to version 0.5.4 or higher to build TensorFlow!

elswork avatar Nov 04 '17 14:11 elswork

I attempted Tensorflow 1.4 installation to use the latest Object Detection implementation. Tensorflow compilation failed, but pre-requisites seemed to install fine.

Using Raspberry Pi 3B with Raspbian.

Bazel 5.4 installation from source seemed to work just fine. I followed the same suggestions in Sam's guide (https://github.com/samjabrahams/tensorflow-on-raspberry-pi/blob/master/GUIDE.md) about the SWAP, -J-Xmx500M flag and get_cpu_value function modification. The -J-Xmx500M flag location in the scripts/bootstrap/compile.sh was on different line, but the identical run "${JAVAC}" call can be found. The get_cpu_value function seems to have been moved to tools/cpp/lib_cc_configure.bzl from tools/cpp/cc_configure.bzl (as in Sam's guide), where I set it to return "arm". Compilation successful and no obvious errors relating to Bazel during Tensorflow compilation.

The Object Detection also requires Protobuf. The build from source was straightforward if I recall correctly (https://github.com/google/protobuf/blob/master/src/README.md). I downloaded and linked the latest googletest as in this example (https://raspberrypi.stackexchange.com/questions/55444/protobuf-2-5-0-and-raspberry-pi-3), but I don't know if it was necessary in the end.

However, after all this, Tensorflow 1.4 build failed. I didn't look into it further, but the problem appeared well into the build process (maybe 30 min).

Currently using DeftWork's PiP installation of Tensorflow 1.3 and the tensorflow Models commit 70c86f2 with Object Detection API to do object detection on RPi. This seems to be working fine, although, it'd be great if I could get tensorflow 1.4 working to use the latest object detection API.

sanntann avatar Nov 14 '17 12:11 sanntann

Here's the binary for Tensorflow 1.4 for Python 3.5.2. Haven't tested with the Object detection API yet.

https://www.dropbox.com/s/irno80f20rhpmsp/tensorflow-1.4.0-cp35-cp35m-linux_armv7l.whl?dl=0

smogili-gppdm avatar Nov 28 '17 21:11 smogili-gppdm

Here's the binary for Tensorflow 1.4 for Python 3.5.2. Haven't tested with the Object detection API yet.

https://www.dropbox.com/s/irno80f20rhpmsp/tensorflow-1.4.0-cp35-cp35m-linux_armv7l.whl?dl=0

Has anyone tried this on the object detection api so far? I've hit a problem with "GLIBC_2.23" and not sure if it's just me?

Thanks

Buzzology avatar Dec 12 '17 12:12 Buzzology

I've found Tensorflow binaries for raspberry but I've not tested yet: tensorflow-1.4.0-cp27-none-any.whl tensorflow-1.4.0-cp34-none-any.whl

elswork avatar Dec 22 '17 23:12 elswork

It works!, I've used it on my docker container rpi-tensorflow, more details on github and my blog

elswork avatar Dec 23 '17 01:12 elswork

@DeftWork Nice work! And thanks for the generous credit :)

On 23 December 2017 at 01:41, DeftWork [email protected] wrote:

It works!, I've used it on my docker container rpi-tensorflow https://hub.docker.com/r/elswork/rpi-tensorflow/, more details on github https://github.com/DeftWork/rpi-tensorflow and my blog http://deft.work/tensorflow_for_raspberry

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/samjabrahams/tensorflow-on-raspberry-pi/issues/104#issuecomment-353699548, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJHPso442LZf2PkQprUJXjf-gXB2-9Wks5tDFo8gaJpZM4N_7pP .

-- personal:@romillyc work:@rareblog skype:romilly.cocking web: http://blog.rareschool.com/

romilly avatar Dec 23 '17 13:12 romilly

@romilly Thank you and many others like @samjabrahams for spreading your knowledge and experience so generously. People like you are a source of inspiration, you awaken curiosity in many of us and become an example to follow. I want to add that those binaries that I put in the previous post, are night versions that although they are not published in the official repositories along with the official binaries for other architectures it seems they come directly from the tensorflow team.

elswork avatar Dec 24 '17 02:12 elswork

I have tried various tensorflow 1.4 wheel files in docker container on raspberry-pi3. Sometime opencv dont work , and sometimes tensorflow 1.4 don't work. So I am avoiding to use docker for rasp-pi, as I need opencv library too. So I just installed opencv on rasp-pi using pip3 install opencv-python and this tensorflow1.4 wheel file( https://www.dropbox.com/s/74f776rqly2kwpg/tensorflow-1.4.0-cp34-none-any.whl?dl=0) from elswork (https://hub.docker.com/r/elswork/rpi-tensorflow/). I have checked object detection and its working. Hope it helps. If anyone have working tensorflow1.4 along with opencv3 docker image, please post.

sunnychugh avatar Jan 03 '18 01:01 sunnychugh

I think this article from Pete Warden would be very interesting for many of us: https://petewarden.com/2017/08/20/cross-compiling-tensorflow-for-the-raspberry-pi/ There is a short reference about Sam Abrahams project and instructions about how to handle Tensorflow installations under distinct Python versions.

elswork avatar Jan 03 '18 13:01 elswork

I too can confirm that the Python 2.7 binaries supplied by @DeftWork works perfectly on my Raspberry Pi 3 model B running on Jessie Lite. Great work guys! I haven't tested the binaries for Python 3.4. Why isn't this made available through pip?

JesperChristensen89 avatar Jan 08 '18 17:01 JesperChristensen89

Also consider using prebuilt wheels from tensorflow Jenkins builds.

Python 3: http://ci.tensorflow.org/view/Nightly/job/nightly-pi-python3/

Python 2: http://ci.tensorflow.org/view/Nightly/job/nightly-pi/

For example, for Python 3 and TF 1.5 run: pip install http://ci.tensorflow.org/view/Nightly/job/nightly-pi-python3/lastSuccessfulBuild/artifact/output-artifacts/tensorflow-1.5.0-cp34-none-any.whl

kdubovikov avatar Jan 31 '18 16:01 kdubovikov

@DeftWork Good Job, did you compile Tensorflow 1.4 for Jessie or Stretch ?

dfoley84-zz avatar Apr 10 '18 19:04 dfoley84-zz

No, I'm sorry, since tensorflow team provides wheel files for arm I don't compile them myself. http://ci.tensorflow.org/view/Nightly/job/nightly-pi/ I don't know if older wheel files are stored somewhere. Maybe the latest one (1.7.0) is suitable for you. I've been using them for a while: https://hub.docker.com/r/elswork/rpi-tensorflow/

elswork avatar Apr 10 '18 22:04 elswork

@DeftWork Does this have object detection model install with this for python 2.7 I am looking for the ability to use Tensorflow Object detection on my Raspberry Pi

dfoley84-zz avatar Apr 11 '18 15:04 dfoley84-zz

No, I believe you should install aditional libraries but Tensorflow is not imprescindible to do object detection, here there is an example:

https://github.com/mharizanov/AI-ipcam

Tensorflow is used to train models, but there are a bunch of models already trained to do this, Tensorflow would be useful to develop, test and messure performance and accuracy.

https://github.com/thtrieu/darkflow

https://github.com/tensorflow/models/tree/master/research/object_detection

elswork avatar Apr 11 '18 21:04 elswork