如果您在开始安装人工智能套件之前须要帮助,本指南供应了安装过程的分步图片。

安装人工智能套件:

https://www.Raspberrypi.com/documentation/accessories/ai-kit.html#install

条件条件

若安在 Raspberry Pi 5 上设置 Raspberry Pi AI Kit

本指南须要以下设备:

一台 Raspberry Pi 5

一个 Raspberry Pi AI 套件,个中包括

一个 M.2 HAT+

一个预装的 Hailo-8L AI 模块

一个 64 位 Raspberry Pi OS Bookworm 安装包

任何 Raspberry Pi 官方摄像头(如摄像头模块 3 或高质量摄像头)

硬件设置

1. 按照安装 Raspberry Pi 摄像头的解释,将摄像头安装到 Raspberry Pi 5 板上。
您可以跳过将 Raspberry Pi 重新连接到电源的步骤,由于您须要断开 Raspberry Pi 的电源才能进行下一步。

安装 Raspberry Pi 摄像头:https://www.raspberrypi.com/documentation/accessories/camera.html#install-a-raspberry-pi-camera

2. 按照安装解释将 AI 套件硬件连接到 Raspberry Pi 5。

安装解释:https://www.raspberrypi.com/documentation/accessories/ai-kit.html#ai-kit-installation

3. 按照解释启用 PCIe Gen 3.0。
这一步是可选的,但强烈建议您这样做,以使您的 AI Kit 得到最佳性能。

PCIe Gen 3.0 启用解释:https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#pcie-gen-3-0

4. 安装利用 AI 套件所需的依赖项。
在终端窗口运行以下命令

$sudoaptinstallhailo-all

这将安装以下依赖项:

Hailo 内核设备驱动程序和固件

HailoRT 中间件软件

Hailo Tappas 核心后处理库

rpicam-apps Hailo 后处理软件演示阶段

5. 末了,利用 sudo reboot 重启树莓派,使这些设置生效。

6. 为确保统统运行正常,请运行以下命令:

$hailortclifw-controlidentify

如果您看到类似下面的输出,解释您已经成功安装了 AI 工具包及其软件依赖项:

Executingondevice:0000:01:00.0IdentifyingboardControlProtocolVersion:2FirmwareVersion:4.17.0(release,app,extendedcontextswitchbuffer)LoggerVersion:0BoardName:Hailo-8DeviceArchitecture:HAILO8LSerialNumber:HLDDLBB234500054PartNumber:HM21LB1C2LAEProductName:HAILO-8LAIACCM.2B+MKEYMODULEEXTTMP

此外,还可以运行 dmesg | grep -i hailo 检讨内核日志,其输出结果应与下面类似:

[3.049657]hailo:Initmodule.driverversion4.17.0[3.051983]hailo0000:01:00.0:Probingon:1e60:2864...[3.051989]hailo0000:01:00.0:Probing:Allocatememoryfordeviceextension,11600[3.052006]hailo0000:01:00.0:enablingdevice(0000->0002)[3.052011]hailo0000:01:00.0:Probing:Deviceenabled[3.052028]hailo0000:01:00.0:Probing:mappedbar0-000000000d8baaf116384[3.052034]hailo0000:01:00.0:Probing:mappedbar2-000000009eeaa33c4096[3.052039]hailo0000:01:00.0:Probing:mappedbar4-00000000b9b3d17d16384[3.052044]hailo0000:01:00.0:Probing:Forcesettingmax_desc_page_sizeto4096(recommendedvalueis16384)[3.052052]hailo0000:01:00.0:Probing:Enabled64bitdma[3.052055]hailo0000:01:00.0:Probing:Usinguserspaceallocatedvdmabuffers[3.052059]hailo0000:01:00.0:DisablingASPML0s[3.052070]hailo0000:01:00.0:SuccessfullydisabledASPML0s[3.221043]hailo0000:01:00.0:Firmwarewasloadedsuccessfully[3.231845]hailo0000:01:00.0:Probing:Addedboard1e60-2864,/dev/hailo0

7. 为确保摄像机正常运行,请运行以下命令:

$rpicam-hello-t10s

这将启动摄像机并显示十秒钟的预览窗口。
确认统统安装精确后,就可以运行一些演示了。

演示 Demo:

https://www.raspberrypi.com/documentation/accessories/ai-kit.html#demos