diff --git a/documentation/asciidoc/accessories/ai-hat-plus.adoc b/documentation/asciidoc/accessories/ai-hat-plus.adoc new file mode 100644 index 000000000..dc6a3a7cf --- /dev/null +++ b/documentation/asciidoc/accessories/ai-hat-plus.adoc @@ -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]. diff --git a/documentation/asciidoc/accessories/ai-hat-plus/about.adoc b/documentation/asciidoc/accessories/ai-hat-plus/about.adoc new file mode 100644 index 000000000..be22d0869 --- /dev/null +++ b/documentation/asciidoc/accessories/ai-hat-plus/about.adoc @@ -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 works best with moderate workloads, with performance 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. diff --git a/documentation/asciidoc/accessories/ai-hat-plus/images/ai-hat-plus-hero.jpg b/documentation/asciidoc/accessories/ai-hat-plus/images/ai-hat-plus-hero.jpg new file mode 100644 index 000000000..08064ca25 Binary files /dev/null and b/documentation/asciidoc/accessories/ai-hat-plus/images/ai-hat-plus-hero.jpg differ diff --git a/documentation/asciidoc/accessories/ai-hat-plus/images/ai-hat-plus-installation-01.png b/documentation/asciidoc/accessories/ai-hat-plus/images/ai-hat-plus-installation-01.png new file mode 100644 index 000000000..33fb88280 Binary files /dev/null and b/documentation/asciidoc/accessories/ai-hat-plus/images/ai-hat-plus-installation-01.png differ diff --git a/documentation/asciidoc/accessories/ai-hat-plus/images/ai-hat-plus-installation-02.png b/documentation/asciidoc/accessories/ai-hat-plus/images/ai-hat-plus-installation-02.png new file mode 100644 index 000000000..b2a60016a Binary files /dev/null and b/documentation/asciidoc/accessories/ai-hat-plus/images/ai-hat-plus-installation-02.png differ diff --git a/documentation/asciidoc/accessories/ai-kit.adoc b/documentation/asciidoc/accessories/ai-kit.adoc index 38398444a..c5d54d1d4 100644 --- a/documentation/asciidoc/accessories/ai-kit.adoc +++ b/documentation/asciidoc/accessories/ai-kit.adoc @@ -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]. diff --git a/documentation/asciidoc/accessories/ai-kit/about.adoc b/documentation/asciidoc/accessories/ai-kit/about.adoc index 4cfb42b96..10b11f42a 100644 --- a/documentation/asciidoc/accessories/ai-kit/about.adoc +++ b/documentation/asciidoc/accessories/ai-kit/about.adoc @@ -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. diff --git a/documentation/asciidoc/computers/ai.adoc b/documentation/asciidoc/computers/ai.adoc new file mode 100644 index 000000000..af8f6182d --- /dev/null +++ b/documentation/asciidoc/computers/ai.adoc @@ -0,0 +1,2 @@ +include::ai/getting-started.adoc[] + diff --git a/documentation/asciidoc/accessories/ai-kit/getting-started.adoc b/documentation/asciidoc/computers/ai/getting-started.adoc similarity index 73% rename from documentation/asciidoc/accessories/ai-kit/getting-started.adoc rename to documentation/asciidoc/computers/ai/getting-started.adoc index 6dd8473ed..c3767bf77 100644 --- a/documentation/asciidoc/accessories/ai-kit/getting-started.adoc +++ b/documentation/asciidoc/computers/ai/getting-started.adoc @@ -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] ---- @@ -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 @@ -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. @@ -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] ---- diff --git a/documentation/images/ai-hat-plus-SMALL.png b/documentation/images/ai-hat-plus-SMALL.png new file mode 100644 index 000000000..48233f4bb Binary files /dev/null and b/documentation/images/ai-hat-plus-SMALL.png differ diff --git a/documentation/images/ai.png b/documentation/images/ai.png new file mode 100644 index 000000000..f4a2e75c2 Binary files /dev/null and b/documentation/images/ai.png differ diff --git a/documentation/images/full-sized/ai-hat-plus.png b/documentation/images/full-sized/ai-hat-plus.png new file mode 100644 index 000000000..f2e81af82 Binary files /dev/null and b/documentation/images/full-sized/ai-hat-plus.png differ diff --git a/documentation/images/full-sized/ai.png b/documentation/images/full-sized/ai.png new file mode 100644 index 000000000..13e2da0a3 Binary files /dev/null and b/documentation/images/full-sized/ai.png differ diff --git a/documentation/images/full-sized/sd-cards.png b/documentation/images/full-sized/sd-card.png similarity index 100% rename from documentation/images/full-sized/sd-cards.png rename to documentation/images/full-sized/sd-card.png diff --git a/documentation/images/sd-cards-SMALL.png b/documentation/images/sd-card-SMALL.png similarity index 100% rename from documentation/images/sd-cards-SMALL.png rename to documentation/images/sd-card-SMALL.png diff --git a/documentation/index.json b/documentation/index.json index dc057ae92..a5865c3ed 100644 --- a/documentation/index.json +++ b/documentation/index.json @@ -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", @@ -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" }, { @@ -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",