User avatar
Gavinmc42
Posts: 5097
Joined: Wed Aug 28, 2013 3:31 am

Re: Running AI algorithms on Rpi

Fri Oct 28, 2016 6:42 am

Did some more googling and found Torch.
http://torch.ch/

Followed these instructions
http://torch.ch/docs/getting-started.html

Took a long time but it installed, it was also aware of the NEON instructions on the Pi3.
Having some trouble with - luarocks install camera.
If that can be got working then USB cameras can be used.
Mathematica only allows the Pi camera, not a $20,000 USB multispectral camera :(

Torch is free too.
What can it be used for on a Pi3?
Will it be fast enough on a Zero? or even install?

https://github.com/torch/torch7/wiki/Cheatsheet
I guess the CUDA stuff won't work ;)
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
Gavinmc42
Posts: 5097
Joined: Wed Aug 28, 2013 3:31 am

Re: Running AI algorithms on Rpi

Sun Oct 30, 2016 2:12 am

It has been a surprise to me how much the AI field has advanced.
Even more of a surprise is how much of the software out there can run on a Pi.

Most of the tests I have been doing are on a Pi3 running latest Raspbian.
It also shows how stable Linux and ARM support is on the Pi.

After 2 hours downloading/compiling/installing, Torch just ran.
Most AI/Deep learning stuff is C/C++ or Python based.

A quick google found some more.
http://www.kdnuggets.com/2016/07/five-d ... rlook.html

Of interest is Leaf and Tiny-cnn.
Tiny-cnn is for small devices but it could interface to Jetpac's QPU code.
https://github.com/jetpacapp/DeepBelief ... yPiLibrary

Leaf is really interesting at it is Rust based and designed for hackers :P
http://autumnai.com/leaf/book/
Rust has also popped up this week when I went looking for latest browser tech = Servo, accelerated rendering = Webrender and new OS's = Redox OS.

Well rustc installs on Pi.
Could a new Robot OS be made with Redox + Leaf?
But in the meantime run Leaf from Raspbian? Still need to test this.

So Torch, Tiny-cnn and Leaf, all AI type deep learning methods.
We have already had Tensorflow and DeepbeliefSDK demos shown working on Pi's.

Another thing I have been looking at is baremetal AI.
Have not found much NN or tensor stuff based on free pascal yet, which is strange because Pascal has native array support.
AI is good for a one off specific task, a general purpose AI is still aways off.

Why run a single task AI on a general purpose OS like Linux?
Ultibo compiled to ARMv8/Aarch64 64bit code with NEON/SIMD assisted tensor maths :ugeek:
There could be a chance Ultibo might run Aarch64 before Raspbian :lol:
https://ultibo.org/forum/viewtopic.php? ... ch64#p1394

All this should get easier to test/do as Pi2/3 move to Aarch64 kernels with native NEON support.

Not much left of this year so 2017 could be the year school kids could make robots to pick up their Lego's.
2018 DIY Pi lawn mowers? 2019 the kids get Pi's to do their homework for them :lol:

For 40 years I thought I needed a super computer to do AI, turns out that computer costs $35 :shock:
Or $5 if Tiny-cnn and Jetpac's QPU code can work on a Zero.

So I guess the answer to the OP's original question is yes.
There is quite a number of ways to do AI on a Pi, if we stick to single task AI not AGI/ASI or what ever it is called now for human level AI.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

ilmarin
Posts: 1
Joined: Fri Nov 15, 2013 6:32 am

Re: Running AI algorithms on Rpi

Mon Dec 19, 2016 10:35 pm

Hello Everybody,

I made a small example on running deep convolutional network using torch on raspberry PI, it is available here:
https://github.com/vfonov/deep-pi
The code is running Network-in-Network model, trained on Image-net , with 1000 classes. It takes 14 sec on Raspberry-PI to apply it to the input image.

P.S. It will definitely work on RASPBERRY PI ZERO, but I only tried it on Raspberry PI B+ (which is older and slower).

Example output (via web interface):
Image

madtom1999
Posts: 59
Joined: Mon Jul 29, 2013 4:37 pm

Re: Running AI algorithms on Rpi

Sun Feb 18, 2018 7:48 pm

It seems ARM are about to release some software for speeding up NN stuff on their CPUs so hopefully the RaspberryPis will be included
https://developer.arm.com/products/proc ... ing/arm-nn

mic_s
Posts: 92
Joined: Sun Oct 26, 2014 4:15 pm

Re: Running AI algorithms on Rpi

Mon Feb 19, 2018 10:50 am

When it comes to object recognition with a single 5$-Pi Zero 1.3 :

https://www.youtube.com/watch?v=zRaQS5MA2fU
(real time (!), MobileNet)

No conection to extern servers and no extra Hardware (except the cam and PSU) is required. The arm core and the 12 Vector Processing Units in your pi 0 are more than enough to do this.

madtom1999
Posts: 59
Joined: Mon Jul 29, 2013 4:37 pm

Re: Running AI algorithms on Rpi

Mon Mar 05, 2018 9:28 am

Their web site (Idein Inc) is in Japanse. Do you have any more information on them - especially the software!

Return to “General discussion”