Utilizing AI Kit
In this tutorial, we'll walk you through setting up your AI Kit and running example applications for object detection and human pose estimation using the Raspberry Pi 5 (RPi5).
Last updated
In this tutorial, we'll walk you through setting up your AI Kit and running example applications for object detection and human pose estimation using the Raspberry Pi 5 (RPi5).
Last updated
Before you begin, ensure the following:
You have a Raspberry Pi 5 (RPi5) with the OS installed and booted successfully.
Your RPi5 is connected to your Wi-Fi network.
VNC is enabled, and you're using a VNC client (like TigerVNC) to access the RPi5 remotely.
For help with installing the OS or enabling VNC, refer to the section of this documentation.
About the AI Kit Installation
If you purchased a complete Hackerbot with an AI Kit (AI, AI Pro, or AI Elite Edition), the AI Kit comes pre-installed. If you purchased the AI Kit separately, follow the hardware installation instructions .
USB Camera Requirement
Make sure a USB camera is connected to the RPi5. Most Hackerbot kits come with a global shutter camera suitable for the examples in this tutorial.
Connect to your RPi5 using TigerVNC. Once connected, open a terminal window. All following steps assume you're working from this terminal.
It's important to run the latest software to ensure hardware compatibility and receive security updates.
Update OS Packages
Run the following to update all software packages to their latest versions:
Check Your Bootloader Firmware
The firmware controls how the RPi5 interfaces with connected hardware.
Check the output. If the date listed is earlier than December 6, 2023, you will need to update your firmware.
Update the Bootloader
Launch the configuration tool:
Navigate to: Advanced Options > Bootloader Version
Select Latest
Press Finish
or Esc
to exit the config tool
Then, apply the firmware update:
Reboot the system to apply changes:
After rebooting, reconnect using TigerVNC and open a new terminal.
The AI Kit uses the PCIe interface to communicate at high speed with the RPi5. Enabling Gen 3.0 mode allows full bandwidth operation.
Run the following:
Go to Advanced Options
Select PCIe Speed
Choose Yes to enable PCIe Gen 3.0
Exit and reboot:
Note: This reboot may take a few minutes. Be patient and reconnect with TigerVNC once it's ready.
The Hailo AI accelerator requires software support to work with the RPi5.
Install the complete package:
This may take several minutes. Once complete, reboot again:
After reboot, open a new terminal and verify that the device is detected:
Expected output (details may vary):
If you receive output like the above, your Hailo hardware is successfully recognized.
Clone the official example repository from Hailo and run the installer script:
This installs scripts and models that demonstrate real-time AI inference using the Hailo chip.
Each time you reboot the RPi5 or change Python environments, you'll need to source the environment setup script:
Now you can run the example applications. Make sure your USB camera is connected and recognized as /dev/video0
.
This runs a real-time object detector and displays bounding boxes for detected objects.
This tracks and overlays human skeletons on detected individuals.
This performs segmentation by coloring each detected object with a unique mask.
Interested in training on your own dataset? Check out the retraining guide from Hailo:
👉