Introduction: Machine Learning With Raspberry Pi

Picture of Machine Learning With Raspberry Pi

Hi,

This is my first Instructable and moreover my English is not good. So please don't mind if it is not well written.

Background:

Deep learning is a new hot topic in the area of Machine Learning, that shows promising results to achieve artificial intelligence. These days we hear a lot about Machine Learning algorithms from big companies like Google and facebook. But recently a startup called Jetpac brought an iphone app that makes even lay person to use Machine learning. Now the same startup has ported their Deep Learning algorithm called Deep Belief to Raspberry Pi. Although, Pete Warden, the CTO of Jetpac, has given instructions on Github, there are some small changes required to adopt to install it on Raspberry Pi. Therefore, I am writing this instructable.

Step 1: Allocating RAM to GPU

This deep belief software requires, at least 128 MB of RAM. In order to allocate that memory, edit the config file of Pi, by using the following command.

---------------------------------------------

sudo nano /boot/config.txt

----------------------------------------------

Add the following line at the end of the file

---------------------------------------------

gpu_mem=128

-----------------------------------------------

Now reboot the Pi.

------------------------------

sudo reboot

------------------------------

In case. if you did not install git before, install it

------------------------------

sudo apt-get install git

------------------------------

Step 2: Install Deep Belief Image Recognition SDK on Raspberry Pi

Now we can install the Deep Belief SDK, by following the below instructions

--------------------------------------------------------------------

git clone https://github.com/jetpacapp/DeepBeliefSDK.git

cd DeepBeliefSDK/RaspberryPiLibrary

sudo ./install.sh

---------------------------------------------------------------------------

Step 3:

Inorder to check whether it is installed correctly or not, follow the below instructions:

-----------------------------------------------------------

cd ../examples/SimpleLinux/

make

sudo ./deepbelief

---------------------------------------------------------------

That should give the following out put

--------------------------------------------------------

0.016994 wool

0.016418 cardigan

0.010924 kimono

0.010713 miniskirt

0.014307 crayfish

0.015663 brassiere

0.014216 harp

0.017052 sandal

0.024082 holster

0.013580 velvet

0.057286 bonnet

0.018848 stole

0.028298 maillot

0.010915 gown

0.073035 wig

0.012413 hand blower

0.031052 stage

0.027875 umbrella

0.012592 sarong

-----------------------------------

This is basically telling that the algorithm is analyzing the default image in the library and giving the probability of it being sarong and umbrella. This algorithm is very useful in robotics. I am trying to implement this on my Raspberry Pi Robot soon. You can find more details on my blog.


Credits:

Pete Warden

https://github.com/jetpacapp/DeepBeliefSDK/tree/ma...

Comments

scshepard (author)2017-11-09

Hi, nice set of directions; I'm falling into a different hole; when making the SimpleLinux directory for the "deepbelief" executable, I get the error:

/usr/lib/libjpcnn.so: file not recognized: File format not recognized

Seems to be ELF 64-bit library, not the 32-bit for the other libraries. Any ideas??

Thanks!

jcrist70 (author)2017-10-05

I have the same issue as posted below/above. I'm using a fresh copy of Raspbian and a Pi 3. Please advise.

oliver20170701 (author)2017-07-01

Hi, great instructable !

I followed all the instructions but when I entered “sudo ./deepbelief” for the last command it gave me the error,

“Can’t open device file: /var/lib/jpcnn/char_dev”.

Any assistance on how to fix it would be greatly appreciated!

About This Instructable

63,872views

82favorites

License:

More by funny143:Machine learning with Raspberry Pi
Add instructable to: