Introduction: 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...