Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions documentation/asciidoc/accessories/ai-hat-plus.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::ai-hat-plus/about.adoc[]

== Product brief

For more information about the AI HAT+, including mechanical specifications and operating environment limitations, see the https://datasheets.raspberrypi.com/ai-hat-plus/raspberry-pi-ai-hat-plus-product-brief.pdf[product brief].
75 changes: 75 additions & 0 deletions documentation/asciidoc/accessories/ai-hat-plus/about.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
[[ai-hat-plus]]
== About

.The 26 tera-operations per second (TOPS) Raspberry Pi AI HAT+
image::images/ai-hat-plus-hero.jpg[width="80%"]

The Raspberry Pi AI HAT+ add-on board has a built-in Hailo AI accelerator compatible with
Raspberry Pi 5. The NPU in the AI HAT+ can be used for applications including process control, security, home automation, and robotics.

The AI HAT+ is available in 13 and 26 tera-operations per second (TOPS) variants, built around the Hailo-8L and Hailo-8 neural network inference accelerators. The 13 TOPS variant can handle workloads similar to the xref:ai-kit.adoc[AI Kit]. The 26 TOPS variant can run larger networks, can run networks faster, and can more effectively run multiple networks simultaneously.

The AI HAT+ communicates using Raspberry Pi 5’s PCIe interface. The host Raspberry Pi 5 automatically detects the on-board Hailo accelerator and uses the NPU for supported AI computing tasks. Raspberry Pi OS's built-in `rpicam-apps` camera applications automatically use the NPU to run compatible post-processing tasks.

[[ai-hat-plus-installation]]
== Install

To use the AI HAT+, you will need:

* a Raspberry Pi 5

Each AI HAT+ comes with a ribbon cable, GPIO stacking header, and mounting hardware. Complete the following instructions to install your AI HAT+:

. First, ensure that your Raspberry Pi runs the latest software. Run the following command to update:
+
[source,console]
----
$ sudo apt update && sudo apt full-upgrade
----

. Next, xref:../computers/raspberry-pi.adoc#update-the-bootloader-configuration[ensure that your Raspberry Pi firmware is up-to-date]. Run the following command to see what firmware you're running:
+
[source,console]
----
$ sudo rpi-eeprom-update
----
+
If you see 6 December 2023 or a later date, proceed to the next step. If you see a date earlier than 6 December 2023, run the following command to open the Raspberry Pi Configuration CLI:
+
[source,console]
----
$ sudo raspi-config
----
+
Under `Advanced Options` > `Bootloader Version`, choose `Latest`. Then, exit `raspi-config` with `Finish` or the *Escape* key.
+
Run the following command to update your firmware to the latest version:
+
[source,console]
----
$ sudo rpi-eeprom-update -a
----
+
Then, reboot with `sudo reboot`.

. Disconnect the Raspberry Pi from power before beginning installation.

. For the best performance, we recommend using the AI HAT+ with the Raspberry Pi Active Cooler. If you have an Active Cooler, install it before installing the AI HAT+.
+
--
image::images/ai-hat-plus-installation-01.png[width="60%"]
--
. Install the spacers using four of the provided screws. Firmly press the GPIO stacking header on top of the Raspberry Pi GPIO pins; orientation does not matter as long as all pins fit into place. Disconnect the ribbon cable from the AI HAT+, and insert the other end into the PCIe port of your Raspberry Pi. Lift the ribbon cable holder from both sides, then insert the cable with the copper contact points facing inward, towards the USB ports. With the ribbon cable fully and evenly inserted into the PCIe port, push the cable holder down from both sides to secure the ribbon cable firmly in place.
+
--
image::images/ai-hat-plus-installation-02.png[width="60%"]
--
. Set the AI HAT+ on top of the spacers, and use the four remaining screws to secure it in place.

. Insert the ribbon cable into the slot on the AI HAT+. Lift the ribbon cable holder from both sides, then insert the cable with the copper contact points facing up. With the ribbon cable fully and evenly inserted into the port, push the cable holder down from both sides to secure the ribbon cable firmly in place.

. Congratulations, you have successfully installed the AI HAT+. Connect your Raspberry Pi to power; Raspberry Pi OS will automatically detect the AI HAT+.

== Get started with AI on your Raspberry Pi

To start running AI accelerated applications on your Raspberry Pi, check out our xref:../computers/ai.adoc[Getting Started with AI] guide.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions documentation/asciidoc/accessories/ai-kit.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
include::ai-kit/about.adoc[]

include::ai-kit/getting-started.adoc[]

== Product brief

For more information about the AI Kit, including mechanical specifications and operating environment limitations, see the https://datasheets.raspberrypi.com/ai-kit/raspberry-pi-ai-kit-product-brief.pdf[product brief].
Expand Down
4 changes: 4 additions & 0 deletions documentation/asciidoc/accessories/ai-kit/about.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,7 @@ image::images/ai-kit-installation-05.png[width="60%"]
--

WARNING: Always disconnect your Raspberry Pi from power before connecting or disconnecting a device from the M.2 slot.

== Get started with AI on your Raspberry Pi

To start running AI accelerated applications on your Raspberry Pi, check out our xref:../computers/ai.adoc[Getting Started with AI] guide.
2 changes: 2 additions & 0 deletions documentation/asciidoc/computers/ai.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include::ai/getting-started.adoc[]

Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
== Getting Started

This guide will help you set up the Raspberry Pi AI Kit with your Raspberry Pi 5. This will enable you to run `rpicam-apps` camera demos using the Hailo AI neural network accelerator.
This guide will help you set up a Hailo NPU with your Raspberry Pi 5. This will enable you to run `rpicam-apps` camera demos using an AI neural network accelerator.

=== Prerequisites

For this guide, you will need the following:

- a Raspberry Pi 5
- a Raspberry Pi AI Kit, which includes:
** an M.2 HAT+
** a pre-installed Hailo-8L AI module
- a 64-bit Raspberry Pi OS Bookworm install
- any official Raspberry Pi camera (e.g. Camera Module 3 or High Quality Camera)
* a Raspberry Pi 5
* one of the following NPUs:
** a xref:../accessories/ai-kit.adoc[Raspberry Pi AI Kit], which includes:
*** an M.2 HAT+
*** a pre-installed Hailo-8L AI module
** a xref:../accessories/ai-hat-plus.adoc[Raspberry Pi AI HAT+]
* a 64-bit Raspberry Pi OS Bookworm install
* any official Raspberry Pi camera (e.g. Camera Module 3 or High Quality Camera)

=== Hardware setup

. Attach the camera to your Raspberry Pi 5 board following the instructions at xref:camera.adoc#install-a-raspberry-pi-camera[Install a Raspberry Pi Camera]. You can skip reconnecting your Raspberry Pi to power, because you'll need to disconnect your Raspberry Pi from power for the next step.
. Attach the camera to your Raspberry Pi 5 board following the instructions at xref:../accessories/camera.adoc#install-a-raspberry-pi-camera[Install a Raspberry Pi Camera]. You can skip reconnecting your Raspberry Pi to power, because you'll need to disconnect your Raspberry Pi from power for the next step.

. Follow the xref:ai-kit.adoc#ai-kit-installation[installation instructions] to get your AI Kit hardware connected to your Raspberry Pi 5.
. Depending on your NPU, follow the installation instructions for the xref:../accessories/ai-kit.adoc#ai-kit-installation[AI Kit] or xref:../accessories/ai-hat-plus.adoc#ai-hat-plus-installation[AI HAT+], to get your hardware connected to your Raspberry Pi 5.

. Follow the instructions to xref:../computers/raspberry-pi.adoc#pcie-gen-3-0[enable PCIe Gen 3.0]. This step is optional, but _highly recommended_ to achieve the best performance with your AI Kit.
. Follow the instructions to xref:raspberry-pi.adoc#pcie-gen-3-0[enable PCIe Gen 3.0]. This step is optional, but _highly recommended_ to achieve the best performance with your NPU.

. Install the dependencies required to use the AI Kit. Run the following command from a terminal window:
. Install the dependencies required to use the NPU. Run the following command from a terminal window:
+
[source,console]
----
Expand All @@ -44,7 +46,7 @@ This installs the following dependencies:
$ hailortcli fw-control identify
----
+
If you see output similar to the following, you've successfully installed the AI Kit and its software dependencies:
If you see output similar to the following, you've successfully installed the NPU and its software dependencies:
+
----
Executing on device: 0000:01:00.0
Expand Down Expand Up @@ -90,9 +92,9 @@ This starts the camera and shows a preview window for ten seconds. Once you have

=== Demos

The `rpicam-apps` suite of camera applications implements a xref:../computers/camera_software.adoc#post-processing-with-rpicam-apps[post-processing framework]. This section contains a few demo post-processing stages that highlight some of the capabilities of the AI Kit.
The `rpicam-apps` suite of camera applications implements a xref:camera_software.adoc#post-processing-with-rpicam-apps[post-processing framework]. This section contains a few demo post-processing stages that highlight some of the capabilities of the NPU.

The following demos use xref:../computers/camera_software.adoc#rpicam-hello[`rpicam-hello`], which by default displays a preview window. However, you can use other `rpicam-apps` instead, including xref:../computers/camera_software.adoc#rpicam-vid[`rpicam-vid`] and xref:../computers/camera_software.adoc#rpicam-still[`rpicam-still`]. You may need to add or modify some command line options to make the demo commands compatible with alternative applications.
The following demos use xref:camera_software.adoc#rpicam-hello[`rpicam-hello`], which by default displays a preview window. However, you can use other `rpicam-apps` instead, including xref:camera_software.adoc#rpicam-vid[`rpicam-vid`] and xref:camera_software.adoc#rpicam-still[`rpicam-still`]. You may need to add or modify some command line options to make the demo commands compatible with alternative applications.

To begin, download the post-processing JSON files required for the demos. These files determine which post-processing stages to run and configure the behaviour of each stage. For example, you can enable, disable, strengthen, or weaken the strength of the temporal filtering in the object detection demos. Or you could enable or disable the output mask drawing in the segmentation demo.

Expand All @@ -107,7 +109,7 @@ TIP: The commands provided in subsequent sections use the JSON files in this rep

==== Object Detection

This demo displays bounding boxes around objects detected by a neural network. To disable the viewfinder, use the xref:../computers/camera_software.adoc#nopreview[`-n`] flag. To return purely textual output describing the objects detected, add the `-v 2` option. Run the following command to try the demo on your Raspberry Pi:
This demo displays bounding boxes around objects detected by a neural network. To disable the viewfinder, use the xref:camera_software.adoc#nopreview[`-n`] flag. To return purely textual output describing the objects detected, add the `-v 2` option. Run the following command to try the demo on your Raspberry Pi:

[source,console]
----
Expand Down
Binary file added documentation/images/ai-hat-plus-SMALL.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/images/ai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/images/full-sized/ai-hat-plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/images/full-sized/ai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 14 additions & 2 deletions documentation/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@
"image": "full-sized/Camera.png",
"subpath": "camera_software.adoc"
},
{
"title": "AI software",
"description": "Software and libraries for artificial intelligence on a Raspberry Pi hardware",
"image": "full-sized/ai.png",
"subpath": "ai.adoc"
},
{
"title": "Raspberry Pi hardware",
"description": "Technical information about Raspberry Pi hardware",
Expand Down Expand Up @@ -81,7 +87,7 @@
{
"title": "SD Cards",
"description": "Raspberry Pi's official SD cards",
"image": "full-sized/sd-cards.png",
"image": "full-sized/sd-card.png",
"subpath": "sd-cards.adoc"
},
{
Expand Down Expand Up @@ -140,10 +146,16 @@
},
{
"title": "AI Kit",
"description": "An NPU for your Raspberry Pi",
"description": "An NPU that connects to your Raspberry Pi via M.2",
"image": "full-sized/ai-kit.png",
"subpath": "ai-kit.adoc"
},
{
"title": "AI HAT+",
"description": "An NPU HAT+ for your Raspberry Pi",
"image": "full-sized/ai-hat-plus.png",
"subpath": "ai-hat-plus.adoc"
},
{
"title": "Raspberry Pi Audio",
"description": "High-definition audio with Raspberry Pi",
Expand Down