Deep learning on the Raspberry Pi!


Photo by Clive Darra

I’m very pleased to announce that I’ve managed to port the Deep Belief image recognition SDK to the Raspberry Pi! I’m excited about this because it shows that even tiny, cheap devices are capable of performing sophisticated computer vision tasks. I’ve talked a lot about how object detection is going to be commoditized and ubiquitous, but this is a tangible example of what I mean, and I’ve already had folks digging into some interesting applications; detecting endangered wildlife, traffic analysis, satellites, even intelligent toys.

I can process a frame in around three seconds, largely thanks to heavy use of the embedded GPU for heavy lifting on the math side. I had to spend quite a lot of time writing custom assembler programs for the Pi’s 12 parallel ‘QPU’ processors, but I’m grateful I could get access at that low a level. Broadcom only released the technical specs for their graphics chip in the last few months, and it’s taken a community effort to turn that into a usable set of examples and compilers. I ended up heavily patching one of the available assemblers to support more instructions, and created a set of helper macros for programming the DMA controller, so I’ve released those all as open source. I wish more manufacturers would follow Broadcom’s lead and give us access to their GPUs at the assembler level, there’s a lot of power in those chips but it’s so hard to tune algorithms to make use of them without being able to see how they work.

Download the library, give it a try, and let me know about projects you use it on. I’m looking forward to hearing about what you come up with!

17 responses

  1. Pingback: Four short links: 10 June 2014 - O'Reilly Radar

  2. Pingback: GPGPU hacking on the Pi | Raspberry Pi

  3. Pingback: GPGPU hacking on the Pi | Faweiz Blog

  4. Pingback: Machine Learning with Raspberry Pi | scientistnobee

  5. Pingback: Electronic Hobbies | GPGPU hacking on the Pi

  6. Pingback: GPGPU hacking on the Pi | Raspberry Pi » Geko Geek

  7. Pingback: Raspberry Pi Spotter | scientistnobee

  8. Pingback: ใช้ GPU บน Raspberry Pi มาช่วยประมวลผล | Unofficial of Raspberry Pi Fan in Thailand

  9. Hi,

    I just tried your SDK. After downloading it, I extracted and enter $HOME/src in order to compile it:
    sudo make TARGET=pi GEMM=piqpu

    Then I copied the two files jpcnn and into the directory $HOME/LinuxLibrary. Then run sudo ./ Fine!

    Now I compiled the example with Linux and run it to test the lena image. The output is somehow strange, since everything is zero except that the class Euopean hoopoe.

    A snippet of the output:

    790 0.000000 maze
    791 0.000000 pajama
    792 0.000000 purse
    793 0.000000 parachute
    794 0.000000 matchstick
    795 0.000000 puffer
    796 0.000000 swimming trunks
    797 0.000000 volcano
    798 0.000000 ptarmigan
    799 0.000000 armadillo
    800 0.000000 cuirass
    801 0.000000 frying pan
    802 0.000000 scale
    803 0.000000 leatherback turtle
    804 0.000000 chainlink fence
    805 0.000000 tile roof
    806 0.000000 pretzel
    807 0.000000 burrito
    808 0.515223 Euopean hoopoe
    809 0.000000 cassette
    810 0.000000 maraca
    811 0.000000 rule
    812 0.000000 jersey
    813 0.000000 sunscreen
    814 0.000000 espresso
    815 0.000000 vase
    816 0.000000 gorilla
    817 0.000000 spider monkey

    Do you have any idea?

  10. Pingback: ใช้ GPU บน Raspberry Pi มาช่วยประมวลผล | Unofficial of Raspberry Pi Fan in Thailand

  11. Pingback: Image Recognition on the Raspberry Pi 2 « Pete Warden's blog

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 1,281 other followers

%d bloggers like this: