Skip to content

heslabs/rpi5ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Raspberry Pi 5 and Hailo AI Accelerator


Raspberry Pi 5 Overview

https://www.raspberrypi.com/products/raspberry-pi-5/

  • Broadcom BCM2712 2.4GHz quad-core 64-bit Arm Cortex-A76 CPU, with cryptography extensions, 512KB per-core L2 caches and a 2MB shared L3 cache
  • VideoCore VII GPU, supporting OpenGL ES 3.1, Vulkan 1.2
  • Dual 4Kp60 HDMI® display output with HDR support
  • 4Kp60 HEVC decoder
  • LPDDR4X-4267 SDRAM (2GB, 4GB, 8GB, and 16GB)
  • Dual-band 802.11ac Wi-Fi®
  • Bluetooth 5.0 / Bluetooth Low Energy (BLE)
  • microSD card slot, with support for high-speed SDR104 mode
  • 2 × USB 3.0 ports, supporting simultaneous 5Gbps operation
  • 2 × USB 2.0 ports
  • Gigabit Ethernet, with PoE+ support (requires separate PoE+ HAT)
  • 2 × 4-lane MIPI camera/display transceivers
  • PCIe 2.0 x1 interface for fast peripherals (requires separate M.2 HAT or other adapter)
  • 5V/5A DC power via USB-C, with Power Delivery support
  • Raspberry Pi standard 40-pin header
  • Real-time clock (RTC), powered from external battery
  • Power button

Raspberry Pi 5 product brief

https://datasheets.raspberrypi.com/rpi5/raspberry-pi-5-product-brief.pdf


Raspberry Pi AI Kit and Raspberry Pi M.2 HAT+

image

Raspberry Pi HAT+ Specification

https://datasheets.raspberrypi.com/hat/hat-plus-specification.pdf

  • A guide to designing Hardware-Attached-on-Top of a Raspberry Pi
  • HAT+ boards should use 'HAT+' in their name. For example, "Raspberry Pi M.2 HAT+ M Key"
  • Unlike the AI Kit, which utilises an M.2 connector, the Hailo accelerator chip is directly integrated onto the main PCB.





Raspberry Pi 5 System Information


RPi5 Ubuntu OS and RPI-Connect


Raspberry Pi 5

Tech Spec: https://www.raspberrypi.com/products/raspberry-pi-5/

  • Broadcom BCM2712 2.4GHz quad-core 64-bit Arm Cortex-A76 CPU, with cryptography extensions, 512KB per-core L2 caches and a 2MB shared L3 cache
  • VideoCore VII GPU, supporting OpenGL ES 3.1, Vulkan 1.2
  • Dual 4Kp60 HDMI® display output with HDR support, 4Kp60 HEVC decoder
  • LPDDR4X-4267 SDRAM (2GB, 4GB, and 8GB)
  • Dual-band 802.11ac Wi-Fi®, Bluetooth 5.0 / Bluetooth Low Energy (BLE)
  • microSD card slot, with support for high-speed SDR104 mode
  • 2 × USB 3.0 ports, 2 × USB 2.0 ports
  • Gigabit Ethernet, with PoE+ support (requires separate PoE+ HAT)
  • 2 × 4-lane MIPI camera/display transceivers
  • PCIe 2.0 x1 interface for fast peripherals (requires separate M.2 HAT or other adapter)
  • 5V/5A DC power via USB-C, with Power Delivery support
  • Raspberry Pi OS (previously called Raspbian)
  • Raspberry Pi Connect provides to access your Raspberry Pi from anywhere

RPi5 AI kit (Hailo)

The Raspberry Pi 5 AI Kit bundles the Raspberry Pi M.2 HAT+ with a Hailo AI acceleration module. The kit contains the following:

  • Hailo AI module containing a Neural Processing Unit (NPU)
  • Raspberry Pi M.2 HAT+, to connect the AI module to your Raspberry Pi 5
  • Thermal pad pre-fitted between the module and the M.2 HAT+
  • Mounting hardware kit
  • 16mm stacking GPIO header

Install the dependencies

Run the following command from a terminal window:

$ sudo apt install hailo-all
$ sudo apt remove hailo-all

This installs the following dependencies:

  • Hailo kernel device driver and firmware
  • HailoRT middleware software
  • Hailo Tappas core post-processing libraries
  • rpicam-apps: Hailo post-processing software demo

Validate device

$ hailortcli scan
$ hailortcli fw-control identify

The log message will be:

Executing on device: 0000:04:00.0
Identifying board
Control Protocol Version: 2
Firmware Version: 4.20.0 (release,app,extended context switch buffer)
Logger Version: 0
Board Name: Hailo-8
Device Architecture: HAILO8L
Serial Number: HLDDLBB243900626
Part Number: HM21LB1C2LAE
Product Name: HAILO-8L AI ACC M.2 B+M KEY MODULE EXT TMP
$ lspci
0000:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
0000:01:00.0 Co-processor: Hailo Technologies Ltd. Hailo-8 AI Processor (rev 01)
0001:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
0001:01:00.0 Ethernet controller: Raspberry Pi Ltd RP1 PCIe 2.0 South Bridge

Hailo RPi5 Examples

https://github.com/hailo-ai/hailo-rpi5-examples

  • Clone the repository and navigate to the repository directory:
  • Run the following script for quick installation
$ git clone https://github.com/hailo-ai/hailo-rpi5-examples.git
$ cd hailo-rpi5-examples
$ ./install.sh

Detection Example:

This example demonstrates object detection using the YOLOv8s model for Hailo-8L (13 TOPS) and the YOLOv8m model for Hailo-8 (26 TOPS) by default. It also supports all models compiled with HailoRT NMS post process. Hailo's Non-Maximum Suppression (NMS) layer is integrated into the HEF file, allowing any detection network compiled with NMS to function with the same codebase.

Run the Example:

  • Opening a new terminal session and sourced the environment setup script
  • Run the detection example using Python script
  • To close the application, press Ctrl+C.
$ source setup_env.sh
$ python basic_pipelines/detection.py
$ python basic_pipelines/get_usb_camera.py
$ python basic_pipelines/detection.py --input /dev/video0
$ python basic_pipelines/detection.py --help


Pose Estimation Example

This example demonstrates human pose estimation using the yolov8s_pose model for Hailo-8 Lite (H8l) and the yolov8m_pose model for Hailo-8 (H8)

To Run the Example:

  • Opening a new terminal session andsourced the environment setup script
  • Run the example using Python script
  • To close the application, press Ctrl+C
  • For additional options, execute command with --help option
$ source setup_env.sh
$ python basic_pipelines/pose_estimation.py
$ python basic_pipelines/get_usb_camera.py
$ python basic_pipelines/pose_estimation.py --input /dev/video0
$ python basic_pipelines/pose_estimation.py --help


Instance Segmentation Example

This example demonstrates instance segmentation using the yolov5n_seg model for Hailo-8 Lite (H8l) and the yolov5m_seg model for Hailo-8 (H8).

  • Opening a new terminal session andsourced the environment setup script
  • Run the example using Python script
  • To close the application, press Ctrl+C
  • For additional options, execute command with --help option
$ source setup_env.sh
$ python basic_pipelines/instance_segmentation.py
$ python basic_pipelines/get_usb_camera.py
$ python basic_pipelines/instance_segmentation.py --input /dev/video0
$ python basic_pipelines/instance_segmentation.py --help


Raspberry AI from Zero to Hero

  1. Introduction to AI
  2. Set up your Raspberry Pi and AI Kit
  3. Computer vision projects and practice
  4. LLM projects and practice
  5. Custom model development and deployment
  6. Raspberry Pi and AIoT


Reference


Reference: Installation


Reference: Examples

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors