TensorFlow and the Raspberry Pi are working together in the city and on the farm. Learn about three recent, innovative projects.

Subscribe now

Get the highlights in your inbox every week.

In early 2017, the Raspberry Pi Foundation announced a Google developer survey, which requested feedback from the maker community on what tools they wanted on the Raspberry Pi. The blog post says that Google has developed tools for machine learning, IoT, wearables, robotics, and home automation, and that the survey mentions face- and emotion-recognition, speech-to-text translation, natural language processing, and sentiment analysis. "The survey will help them get a feel for the Raspberry Pi community, but it'll also help us get the kinds of services we need," the post explains. Meanwhile, data scientists aren't waiting around to put Google's TensorFlow, an open source software library for machine learning, to work on the Raspberry Pi.

Because delay estimates provided by Caltrain "can be a bit ... off" (their words), the team wanted to integrate new data sources for delay predictions beyond what was available from Caltrain's API. They outline three questions they wanted an IoT Raspberry Pi train detector to answer:

Then, in TensorFlow Image Recognition on a Raspberry Pi, Rubashkin writes, "When we set up a new Raspberry Pi in our Mountain View office, we ran into a big problem: the Pi was not only detecting Caltrains (true positive), but also detecting Union Pacific freight trains and the VTA light rail (false positive). In order to reliably detect Caltrain delays, we would have to reliably classify the different trains." He says 2016 was a good year to run into this classification problem because several deep learning image recognition technologies had been released as open source projects, including Google's TensorFlow.

To get experience creating an image classifier using TensorFlow, Rubashkin used the flowers tutorial on the tutorials page in TensorFlow for Poets, by Pete Warden. Then to get the train training data set, Rubashkin used 1,000 images from Google Images to create a vehicle classifier for Caltrains, freight trains, light rail, trucks, and cars. See the TensorFlow training action in this video:

Meter Maid Monitor

At the TechCrunch Disrupt Hackathon in September 2016, John Naulty introduced Meter Maid Monitor. On the project website, Naulty says Meter Maid Monitor, which combines TensorFlow image classification with a Raspberry Pi motion detection and speed-measuring program, is an effort to avoid parking tickets. "With this set of tools, one can park their car, knowing that a notification will arrive via text message notifying them of a passing metermaid," he explains. The idea is that this marks the official start of their two-hour parking time limit.

When an image of a moving car in the field of view is captured, it gets analyzed by TensorFlow with trained data (to recognize the meter maid vehicles). If the image is a meter maid match, a message gets sent via Twilio with a link to the image. Naulty includes the disclaimer, "This is a free, open source project and the developers are in no way accountable for parking tickets because of rebellious, citation-breaking citizens."

Check out the project on GitHub, or watch the TechCrunch Disrupt Hackathon video for Naulty's brief presentation:

TensorFlow on the farm

TensorFlow isn't only for city slickers—it comes in handy on the farm, too. Makoto Koike, a former embedded systems designer from the Japanese automobile industry, started helping out at his parents' cucumber farm. An article on the Google Cloud Platform blog, How a Japanese cucumber farmer is using deep learning and TensorFlow, explains that Koike's mother spent up to eight hours a day sorting cucumbers by characteristics such as size, thickness, color, texture, small scratches, and whether they have prickles, which command higher prices on the market.

"The system uses Raspberry Pi 3 as the main controller to take images of the cucumbers with a camera, and in a first phase, runs a small-scale neural network on TensorFlow to detect whether or not the image is a cucumber," the article explains. "It then forwards the image to a larger TensorFlow neural network running on a Linux server to perform a more detailed classification."

Read the article to learn more about how the project works, or watch the video to see the sorter in action:

Do you know about other cool projects using TensorFlow and the Raspberry Pi? Let us know about them in the comments, or send your story idea to us at open@opensource.com.

Topics

About the author

Rikki Endsley - Rikki Endsley is the Developer Program managing editor at Red Hat, and a former community architect and editor for Opensource.com. In the past, she worked as the community evangelist on the Open Source and Standards (OSAS) team at Red Hat; a freelance tech journalist; community manager for the USENIX Association; associate publisher of Linux Pro Magazine, ADMIN, and Ubuntu User; and as the managing editor of Sys Admin magazine and...

Footer

The opinions expressed on this website are those of each author, not of the author's employer or of Red Hat.

Opensource.com aspires to publish all content under a Creative Commons license but may not be able to do so in all cases. You are responsible for ensuring that you have the necessary permission to reuse any work on this site. Red Hat and the Red Hat logo are trademarks of Red Hat, Inc., registered in the United States and other countries.