Raspberry Pi meets AI: The projects that put machine learning on the $35 board

Explore the projects pushing the limit of what's possible on the budget board.
By Nick Heath, Contributor
1 of 15 Image: Raspberry Pi Foundation

Cutting-edge Pi

While computers capable of recognizing people and objects were once the stuff of science fiction, today they're very much a reality.

Even more impressive, some of these tasks are possible on the cheapest of machines, such as the $35 Raspberry Pi.

The majority of the following projects use pre-trained, machine-learning models to teach Pi boards about the world around them: schooling robots in how to navigate tricky terrain through to powering early warning systems for car parking attendants.

2 of 15 Image: Joey Meyer / YouTube

Raspberry Turk

What is it?: A modern take on the famous chess-playing Mechanical Turk, which uses computer vision and a robot arm to play a mean game of chess on a real board with physical pieces.

Results: As you can see here, the Raspberry Turk moves pieces around the board both rapidly and smoothly.

What it uses: A Raspberry Pi camera module suspended above the chess board captures the pieces' current positions, feeding the images back to the Python OpenCV image library running on the Pi for analysis. Once the system has calculated the position of all the pieces on the board, these are fed to the open-source chess engine Stockfish, which works out the next move for the robot arm -- controlled by the Pi and an Arbotix-M Robocontroller -- to play.

Find out more here.

3 of 15 Image: Kazunori Sato / YouTube

Japanese cucumber sorter

What is it?: A computer vision system that sorts cucumbers according to their quality at a Japanese cucumber farm -- an important task considering that straight and thick cucumbers with a vivid color and lots of prickles can command a premium price.

Results: Real-world tests achieved 70% accuracy at sorting cucumbers according to grade, a task that can take eight hours during peak harvest season. The system's creator believes a higher accuracy rate is possible with more training data.

What it uses: An Arduino Micro controls the conveyor, servo motors and sorts the cucumbers according to their classification. A Raspberry Pi 3 with an attached camera uses TensorFlow/OpenCV to recognize cucumbers as they travel along the conveyor and sends photos to Google Cloud for further processing. Google Cloud running TensorFlow and Django sorts the cucumbers into nine grades and then returns appropriate data so the cucumbers can be automatically sorted.

Find out more here.

4 of 15 Image: Antonin Raffin

Autonomous Racing Robot

What is it?: A miniature robot car capable of autonomously racing around a track thanks to its built-in computer vision systems.

Results: The car was able to follow the line at the center of the winding track without crashing during a recent contest in Toulouse, France.

What it uses: A system that combines a Raspberry Pi, an Arduino Uno and a Pi Camera, and which uses Python, C++ and a neural network for real-time image processing.

Find out more here.

5 of 15 Image: UBC Sailbot

Ada Sailbot 1.0: Autonomous boat

What is it?: A Pi-controlled autonomous boat that attempted to sail from North America to Ireland.

Results: Unfortunately, Ada was declared lost at sea in December 2016, but that shouldn't diminish the fact it sailed almost 8,000km across the Atlantic Ocean over the course of several months. It was recovered in December 2017, and you can see its route travelled here.

What it used: Two identical control boxes containing a Raspberry Pi and Arduino Mega. On deck was another Raspberry Pi perched on a tripod handling data from infrared cameras, known as the Obstacle Avoidance Pi (OA Pi). The Pi boards in the control boxes used the data from the OA Pi, weather reports and GPS co-ordinates to plot the next waypoint in the boat's journey across the Atlantic -- with the Arduino relaying relevant commands to the the sail and rudder motors.

Find out more here.

6 of 15 Image: Silicon Valley Data Science / YouTube

Train spotter

What is it?: Determines whether a Caltrain is passing the offices of Silicon Valley Data Science, by classifying the type of trains captured on video.

Results: Able to consistently distinguish between five categories of train from the video after overnight training.

What it uses: Raspberry Pi 2B with accessories, Pi Camera, case for GoPro mount and GoPro wall mount, and a Wi-Fi adapter -- with total cost of $130. Using TensorFlow and JupyterHub for software and services.

Find out more here.

7 of 15 Image: Charlie Leight / ASU Now


What is it?: A cardboard, turtle-inspired robot that uses machine learning to discover how to push itself across different terrain on its flippers.

Results: Researchers at Arizona State University hope that fleets of the bots could eventually be used to detect and map landmines.

What it uses: Runs on a $5 Raspberry Pi Zero, all parts cost just $70, cheap enough to be considered disposable.

Find out more here.

8 of 15 Image: Adam Vaughan / YouTube

Engine efficiency booster

What is it?: A Pi-controlled engine designed to improve the efficiency of gasoline combustion and reduce CO2 emissions. The system attempts to predict at which point fuel in the engine should undergo Homogeneous Charge Compression Ignition -- an efficient combustion method that works by placing fuel under pressure.

What it uses: Raspberry Pi 1 Model B running Raspbian and an "adaptive Extreme Learning Machine algorithm".

Read more about it here.

9 of 15 Image: Raspberry Pi Foundation / Harvard Medical Faculty Physicians

Stent-testing robot

What is it?: A computer vision system that helps test medical stents used to keep patients' airways open.

Results: The system can identify points of failure more precisely, which in turn allows designers to produce a more resilient stent.

What it uses: Runs the image-recognition library OpenCV on the Pi, which analyzes footage of the test captured by the Pi's camera module. The Pi is augmented by a HAT [attached hardware board], which controls the gripper crushing the stent during tests.

Find out more here.

10 of 15 Image: Google

Google N-Synth Super

What is it?: A Pi-based synthesizer that takes the fundamental characteristics of the sounds of different musical instruments, learned in advance using a deep learning network, and remixes them into new sounds.

Results: You can listen here for yourself. While musicians can create new samples for the synthesizer to mix, these require some hefty backend computing power to generate.

What it uses: Raspberry Pi 3, potentiometers, rotary encoders, and the Adafruit 1.3″ OLED display. Full instructions for how to build an N-Synth Super are available here.

Find out more here.

11 of 15 Image: Warwick Mobile Robotics


What is it?: A quadcopter designed to fly via a set of pre-programmed GPS waypoints.

Results: By the end of the project the drone was "very close" to being entirely autonomous, with the only thing holding it back being a pressure sensor needed to maintain altitude.

What it uses: The Raspberry Pi provided throttle, roll, pitch and yaw signals for the larger flight controller board on the drone, which used a semi-autonomous flight progress system that helped guide the drone to the next waypoint.

Find out more here.

12 of 15 Image: Henry Conklin / Raspberry Pi Foundation

Twitter for dogs

Of course, not every project that uses the Pi and machine learning is serious, but while the projects that follow are a tad silly they are still technically quite impressive.

What is it?: A system that for several years elevated the quality of discourse on Twitter by posting Tweets capturing every bark, woof and ruff uttered by a dog called Oliver.

Results: Years of the pooch's pronouncements are still available on @OliverBarkBark's profile.

What it uses: Oliver's barks were captured using a Rasberry Pi, a Wi-Fi dongle, and a microphone. The Pi ran a pre-trained machine-learning model, built using the pyAudioAnalysis library, to recognize and screen out background noise to prevent them inadvertently triggering Tweets. Once barks were verified as genuine, posts were made to Oliver's Twitter account via API.

Find out more here.

13 of 15 Image: Getty Images/iStockphoto

​Meter-maid monitor

What is it?: A system that warns drivers parked on the street when a parking attendant is approaching, using machine vision to spot their telltale vehicle. Not yet tested on live images. Sends a text message to drivers.

What it uses: Raspberry Pi 3 and Pi Camera. Requires installation of OpenCV 3.0.0 and Python3, and Wi-Fi hotspot for Raspberry Pi. TensorFlow was run in Docker following this tutorial.

Find out more here.

14 of 15 Image: Alex Kent / YouTube

Self-driving fish

What is it?: The world's first instance of a fish driving a tank, albeit an aquarium rather than a 60-ton weapon of war.

Results: The movement is controlled by the fish, a camera suspended above the tank captures the fish's movement and computer vision tracks its location as it swims around, with a control system linked to the Pi then moving the tank in the corresponding direction.

What it uses: A Raspberry Pi running the OpenCV computer vision library in Python, together with other Python code for driving the wheels.

Find out more here.

15 of 15 Image: Adrian Rosebrock

Santa detector

What is it?: As the name suggests, this system is dedicated to spotting Father Christmas -- flashing lights on a Christmas tree and playing music upon spying Saint Nick.

Results: As you can see from the screenshot the system works pretty well, appearing very confident that the white-bearded gentleman in the red suit is Kris Kringle.

What it uses: A Raspberry Pi and camera module / USB camera, the 3D Christmas Tree for the Raspberry Pi and a set of speakers. The Pi runs a machine learning model, a Convolutional Neural Network pre-trained to spot Santa, and uses a variety of Python software libraries including OpenCV, Keras and TensorFlow.

Find out more here.

Related Galleries

Holiday wallpaper for your phone: Christmas, Hanukkah, New Year's, and winter scenes
Holiday lights in Central Park background

Related Galleries

Holiday wallpaper for your phone: Christmas, Hanukkah, New Year's, and winter scenes

21 Photos
Winter backgrounds for your next virtual meeting
Wooden lodge in pine forest with heavy snow reflection on Lake O'hara at Yoho national park

Related Galleries

Winter backgrounds for your next virtual meeting

21 Photos
Holiday backgrounds for Zoom: Christmas cheer, New Year's Eve, Hanukkah and winter scenes
3D Rendering Christmas interior

Related Galleries

Holiday backgrounds for Zoom: Christmas cheer, New Year's Eve, Hanukkah and winter scenes

21 Photos
Hyundai Ioniq 5 and Kia EV6: Electric vehicle extravaganza

Related Galleries

Hyundai Ioniq 5 and Kia EV6: Electric vehicle extravaganza

26 Photos
A weekend with Google's Chrome OS Flex

Related Galleries

A weekend with Google's Chrome OS Flex

22 Photos
Cybersecurity flaws, customer experiences, smartphone losses, and more: ZDNet's research roundup

Related Galleries

Cybersecurity flaws, customer experiences, smartphone losses, and more: ZDNet's research roundup

8 Photos
Inside a fake $20 '16TB external M.2 SSD'
Full of promises!

Related Galleries

Inside a fake $20 '16TB external M.2 SSD'

8 Photos