Raspberry Pi’s newAI Camera Kittakes the strain of processing neural network models from the CPU; instead theSonyIMX500 does all of the hard work. Yes, the $70Raspberry Pi AI Camera Kithas just been released and we had early access to a unit for our review, but we wanted to show you how to get started with the kit, and this will be the first in a short series of how tos, covering getting started and how to generate your own neural network models for use with the kit.
In this part, we get things up and running, learn how to use the software from the terminal, and via Python. We’ll be using a Raspberry Pi 5 for the how to, but the process can be repeated on a Raspberry Pi 4 or Zero 2 W. Note that other models of Pi may need a few tweaks to work.
For this project you will need
Installing the Raspberry Pi AI Camera
Our first step is to get the hardware installed, luckily this is really easy to do.
Running the demo applications
Raspberry Pi OS has a series of camera applications that can be used for quick camera projects, or in this case, to test that the camera is working properly. The first is raspi-hello, the “hello world” of camera testing. We’re going to use it with a never-ending timer (-t 0s) and the mobilenet object detection model.
If we would like to use pose estimation, then we need to modify the command to use the posenet model.
To record the session as a ten-second video, use raspicam-vid to output an MP4 file. This will save the video, along with the bounding boxes and recognized objects.
Get Tom’s Hardware’s best news and in-depth reviews, straight to your inbox.
Using the Raspberry Pi AI Camera with Picamera2
Picamera2 is the Python module that can be used to control the plethora of Raspberry Pi cameras, and now it has support for the new AI Camera. But before we can use it, we need to install some software dependencies.
We can also use the pose estimation demo to check that Python can detect a human pose.
What about creating our own neural network models?
Thedocumentationdoes reference creating your own neural network models, but Sony’s Brain Builder for AITRIOS is not ready yet, and we were unable to convert a Tensorflow model created inMicrosoftLobe, for use in the imx500 converter suite of tools. We’ll be keeping an eye on this, and once the tool is ready, an additional how to will cover how to train your own neural network model for use with the Raspberry Pi AI Camera.
Les Pounder is an associate editor at Tom’s Hardware. He is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training program “Picademy”.