Artificial intelligence, precisely the generative kind, has recently seen a sudden surge in popularity as people explore the possibilities of creating visual and textual content with these tools. Such machine-learning models are usually run on very expensive equipment as they demand a lot of storage space and computing resources.

Enter the Raspberry Pi 4, a $35 single-board computer in a credit card form factor. While the Raspberry Pi is limited in its machine-learning capability due to its underpowered GPU, it still has certain artificial intelligence applications.

An enhanced sunflower image with OpenCV logo overlayed

1. Mycroft/Picroft: Personal AI Voice Assistant

Mycroft offers an open-source alternative to your Alexa, Google, and Siri smart speakers. It allows you to talk to and get information from the virtual assistant. With a focus on protecting your privacy, Mycroft keeps you in control and can be installed on an Android phone, a laptop, or a Raspberry Pi. You cancreate your own privacy-friendly Raspberry Pi smart speaker with Mycroft.

Picroft is a package of the voice assistant program specifically designed to run on Raspberry Pi models. It is built on top of Raspberry Pi OS Lite and the disk image can be burned to a microSD card. You will need a microSD card (8GB or larger), a USB microphone, and a 3.5mm jack or USB speaker.

Man holding phone using ChatGPT

Only the frontend is installed on your Raspberry Pi and this installation needs to call back to the backend hosted athome.mycroft.aifor the virtual assistant to work. It is possible but quite challenging to completely self-host Mycroft.

Although not as fully featured as commercial options, Mycroft does have a few tricks up its sleeve. It supports applications referred to as skills that expand the functionality of your virtual assistant. Some of the default skills allow you to set alarms, capture audio, and control music playback. You can install more skills from the marketplace or create new ones.

2.OpenCat: Quadruped Pet Robot

Based on both Raspberry Pi and Arduino, OpenCat offers an open-source framework for building Boston Dynamics-style quadruped pet robots. These robots move with four legs instead of wheels, giving them the ability to move in unstructured terrains with a degree of fluidity. This framework can be adapted for STEM learning, robotics education, Internet of Things applications, and robotics research.

This project is still in its early stages and is mostly suited for advanced makers with the hardware assembly and programming skills required. It is possible to buy a pre-assembled kit from Petoi in either cat or dog form (called Nybble and Bittle, costing $284 and $256 respectively), but some makers have deployed the OpenCat software on3D-printed robot pets.

OpenCat robots feature a customized Arduino board, NyBoard, which is responsible for powering the servos, extending wireless connectivity, orientation, balancing, and infrared detection. It also provides a socket where a Raspberry Pi can be mounted to extend the quadruped robot’s capabilities.

3.DeepPiCar: Self-Driving Car

Today, fully autonomous vehicles are still a fantasy, but we have come as far as level two out of the fivelevels of autonomous driving. Companies like Tesla and Google are hard at work trying to create the first completely self-driving car, and they all employ similar techniques to what DeepPiCar uses.

DeepPiCar is a deep-learning, self-driving robotic car project by David Tian based on Raspberry Pi, TensorFlow, SunFounder’s PiCar V kit, and Google’s Edge TPU coprocessor. The estimated cost of all the hardware required for this project is around $250 to $300.

This robotic car is capable of lane detection and following, traffic sign detection, and pedestrian handling. David describes the hardware and software setup in aseries on Medium. It is a challenging project, but it offers a great way to get into deep learning and autonomous driving.

4.Object and Animal Recognition With Raspberry Pi and OpenCV

OpenCV is a large, open-source computer vision and machine learning library designed for real-time applications and supports a wide range of languages. OpenCV allows the Raspberry Pi to recognize objects and animals in real time. Once installed, you will need to attach a Camera Module to the Raspberry Pi to capture the images you want to identify.

This tutorial by Core Electronics walks you through the process of setting up your OpenCV installation for object and animal detection and adjusting the code to detect specific objects while ignoring others. It uses the COCO dataset library, although you can use any other pre-trained library that fits your needs.

5.Gesture Recognition Using Raspberry Pi Pico and Edge Impulse

With Edge Impulse, you can easily train a model to recognize a variety of gestures, such as waving, pointing, or clapping. Once your model is trained, you can use it to control your project, such as turning on a light or playing a sound.

This gesture recognition project is based on Raspberry Pi Pico and Edge Impulse and offers a great way to add interactivity to your projects. It also uses the MPU6050 combined accelerometer and gyroscope sensor to track the gestures. Be sure to check out the Hackster tutorial (linked above) to learn how to train a model that can process this sensor data and then deploy it on the Raspberry Pi Pico.

6.VoiceGPT: Voice Assistant + ChatGPT

This AI project combines the concept of a generative chatbot and a virtual assistant to create a tool that can receive audio queries and return realistic answers. The answers are generated by ChatGPT and relayed as audio via Google Cloud’s Text-to-Speech. If you are unaware of just how powerful this AI chatbot is, take a look at the manythings you can do with ChatGPT.

All you need is a Raspberry Pi 4, a USB microphone, and a speaker to use this voice assistant and harness the full power of ChatGPT. You can find the project script and other required software on the GitHub page linked above.

Get Your Raspberry Pi Involved in the AI Race

Although modest in size and computing resources, the Raspberry Pi is able to bring certain artificial intelligence ideas to life. The projects listed above are just a few examples of the many possibilities that exist. By combining your creativity and programming skills, you can use Raspberry Pi to create real-world AI projects.