Although Machine learning appears as a high-tech term, we come across it every day without knowing it. For example tasks such as filtering of spam mails, automatic tagging of facebook photos are accomplished by Machine learning algorithms. In recent years a new area of Machine learning, known as deep learning is getting lot of attention, as a promising route for achieving artificial intelligence.
Until recently this knowledge of deep learning is confined to only big data centers. This is because, the deep learning technology requires large amount of data sets, which only big data mining firms such as Google, Facebook, Microsoft have access to. To keep this technology in every one’s hand, a new startup Jetpac has given the access to their deep learning technology to everyone with a computing device (check their app). This is exciting because, many people have mobile phones, which have so much of computing power. Just see what can be done with such kind of democratization of technology in the above video.
Now coming to the Raspberry Pi, it has roughly 20 GFLOPS (almost same as the Parallela board offers) of computing power, thanks to its GPU. After Broadcam has released the documentation for the GPU specs, Pete Warden has done a great job by porting his Deep Belief Image recognition SDK to the Raspberry Pi. Today after seeing about this post in the Raspberry Pi Blog, I have tried to follow his instructions and successfully run the first example on my Pi.
Instructions to install Deep Belief on Raspberry Pi
This algorithm requires at least 128 MB of RAM dedicated to GPU. To allocate that, we need to edit
/boot/config.txt. We do it by using the following command
sudo nano /boot/config.txt
Then add the following line at the end of
save and exit the editor. Now we have to reboot the Raspberry Pi to get a ‘clean’ area of memory.
Install git by using the following command
sudo apt-get install git
We are now ready to install the Deep belief. Just follow the below instructions
git clone https://github.com/jetpacapp/DeepBeliefSDK.git
That’s it. You have installed one of the best Machine learning algorithm on Pi. Now to test whether everything is working or not, hit the following commands.
If everything goes well, you should see the following output
0.012413 hand blower
Pete Warden has explained how to implement this algorithm for various applications on Gitgub. I would like to use this for my Robotic project, so that my robot can recognize the objects around it, just like the Romo in the above video. I am planning to do this with Open CV.
If you don’t allocate sufficient RAM for GPU, you may get the following error.
Unable to allocate 7778899 bytes of GPU memory
mmap error -1