An engineers guide to AI applications with Raspberry Pi

An engineers guide to AI applications with Raspberry Pi An engineers guide to AI applications with Raspberry Pi

Raspberry Pi’s latest book, AI Projects with Raspberry Pi, is a hands-on guide to discovering real-world AI applications using Raspberry Pi hardware.

Inside, you’ll find projects that run on a range of Raspberry Pi devices, including Raspberry Pi 4, 5, and Zero 2 W as well as Raspberry Pi Pico microcontrollers. There is also full and detailed use of the Raspberry Pi AI Camera and the Raspberry Pi AI HAT+ and AI HAT+ 2 – all using the standard Raspberry Pi OS.

The projects detailed inside are ones that you can actually build and run and they span across a broad range of applications:

  • Computer vision – recognise and classify what’s in front of a camera or inside files. The book covers both image recognition and video recognition
  • Python and predictive modelling – work with the regression-style workhorses behind most practical data science
  • Speech to text (and vice versa) – convert speech to text, generate speech from text, and use spoken commands to control local devices
  • Linguistics – perform audio transcription, language translation, and processing
  • Sensor data – gather sensor data on a Raspberry Pi Pico. Use Python to train a machine learning model on your Raspberry Pi, then deploy the model on the Raspberry Pi Pico, where you’ll perform real-time inference
  • Large language models – run genuine LLMs locally on Raspberry Pi hardware and the Raspberry Pi AI HAT+ 2 accelerator. Run chatbot-style services securely, privately, and locally at the Edge
  • Image generation – use Stable Diffusion techniques to generate images with Raspberry Pi hardware
  • Model training – discover how models are trained with test and training data. Slice and dice MobileNet and retrain it to detect hand gestures

“In this book, you’ll write code that watches for the gesture and, the moment it fires, tells an attached device to do something. We walk you through this by showing you how to make a magic wand that sparkles when you flick it. It’s one of several projects that take AI out of the abstract and into something you can hold in your hand,” Raspberry Pi stated on its website.

Kicking off with the essential language of AI and machine learning, the book introduces tensors, the core data structure underpinning nearly everything discussed later, before pulling back to survey the full Raspberry Pi AI stack across both hardware and software, then moving on to regression models. The focus turns visual with a chapter on text-to-image generation, followed by an in-depth look at running an LLM straight on the Raspberry Pi, tapping into both the CPU and the AI HAT+ 2 accelerator.

From there, things get playful with the magic wand project, where you’ll train a model to recognise gestures and build a wand that sparkles in response. Voice takes centre stage in its own extensive chapter, spanning speech transcription, responding to spoken commands, text-to-speech generation, language translation, and even a voice-powered chatbot. The book then narrows in on image recognition, showing how to identify and classify objects in real time using either the Raspberry Pi AI Camera or the Raspberry Pi AI HAT+ (version 1 or 2).

It closes by exploring how to access and deploy models from model zoos, including a hands-on dismantling of the MobileNet vision model, splicing off its end layers and retraining it in Python for hand gesture recognition.

AI Projects with Raspberry Pi is available from Raspberry Pi Press at an introductory offer of £8.99 as well as Amazon US and UK.

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Previous Post
Integrating waterproof speakers for real-world reliability

Integrating waterproof speakers for real-world reliability