From 33b6ea89d9ca33ba466c92816cfd7174623b1125 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Tue, 10 Dec 2024 08:51:43 +0000 Subject: [PATCH 1/8] hailo: Update documentation for new assets file location and note about serial numbers missing. --- .../computers/ai/getting-started.adoc | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/documentation/asciidoc/computers/ai/getting-started.adoc b/documentation/asciidoc/computers/ai/getting-started.adoc index c3767bf77c..e98a77cbf7 100644 --- a/documentation/asciidoc/computers/ai/getting-started.adoc +++ b/documentation/asciidoc/computers/ai/getting-started.adoc @@ -60,6 +60,7 @@ Serial Number: HLDDLBB234500054 Part Number: HM21LB1C2LAE Product Name: HAILO-8L AI ACC M.2 B+M KEY MODULE EXT TMP ---- +NOTE: The AI HAT+ devices may show `` for `Serial Number`, `Part Number` and `Product Name` above. This is expected, and will not affect device functionality. + Additionally, you can run `dmesg | grep -i hailo` to check the kernel logs, which should yield output similar to the following: + @@ -96,24 +97,20 @@ The `rpicam-apps` suite of camera applications implements a xref:camera_software 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. - -To download the entire collection of post-processing JSON files, clone the `rpicam-apps` repo. Run the following command to clone only the most recent commit from the repo, saving space: +To begin, ensure you have the latest `rpicam-apps` software package installed with: [source,console] ---- -$ git clone --depth 1 https://github.com/raspberrypi/rpicam-apps.git ~/rpicam-apps +$ sudo apt install rpicam-apps ---- -TIP: The commands provided in subsequent sections use the JSON files in this repository. To make it easy to reference these files, this command creates the cloned `rpicam-apps` directory in your home folder. If you modify the location of this directory, you must also alter the demo commands below to reference the new location of the JSON files. - ==== Object Detection 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] ---- -$ rpicam-hello -t 0 --post-process-file ~/rpicam-apps/assets/hailo_yolov6_inference.json --lores-width 640 --lores-height 640 +$ rpicam-hello -t 0 --post-process-file /usr/share/rpi-camera-assets/hailo_yolov6_inference.json ---- Alternatively, you can try another model with different trade-offs in performance and efficiency. @@ -122,21 +119,21 @@ To run the demo with the Yolov8 model, run the following command: [source,console] ---- -$ rpicam-hello -t 0 --post-process-file ~/rpicam-apps/assets/hailo_yolov8_inference.json --lores-width 640 --lores-height 640 +$ rpicam-hello -t 0 --post-process-file /usr/share/rpi-camera-assets/hailo_yolov8_inference.json ---- To run the demo with the YoloX model, run the following command: [source,console] ---- -$ rpicam-hello -t 0 --post-process-file ~/rpicam-apps/assets/hailo_yolox_inference.json --lores-width 640 --lores-height 640 +$ rpicam-hello -t 0 --post-process-file /usr/share/rpi-camera-assets/hailo_yolox_inference.json ---- To run the demo with the Yolov5 Person and Face model, run the following command: [source,console] ---- -$ rpicam-hello -t 0 --post-process-file ~/rpicam-apps/assets/hailo_yolov5_personface.json --lores-width 640 --lores-height 640 +$ rpicam-hello -t 0 --post-process-file /usr/share/rpi-camera-assets/hailo_yolov5_personface.json ---- ==== Image Segmentation @@ -145,7 +142,7 @@ This demo performs object detection and segments the object by drawing a colour [source,console] ---- -$ rpicam-hello -t 0 --post-process-file ~/rpicam-apps/assets/hailo_yolov5_segmentation.json --lores-width 640 --lores-height 640 --framerate 20 +$ rpicam-hello -t 0 --post-process-file /usr/share/rpi-camera-assets/hailo_yolov5_segmentation.json --framerate 20 ---- ==== Pose Estimation @@ -154,7 +151,7 @@ This demo performs 17-point human pose estimation, drawing lines connecting the [source,console] ---- -$ rpicam-hello -t 0 --post-process-file ~/rpicam-apps/assets/hailo_yolov8_pose.json --lores-width 640 --lores-height 640 +$ rpicam-hello -t 0 --post-process-file /usr/share/rpi-camera-assets/hailo_yolov8_pose.json ---- === Further Resources From 9063891e1e99f425a514bdb65291ad7cb2ef5f67 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Tue, 10 Dec 2024 14:47:48 +0000 Subject: [PATCH 2/8] hailo: Add alternative package version instructions. --- .../computers/ai/getting-started.adoc | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/documentation/asciidoc/computers/ai/getting-started.adoc b/documentation/asciidoc/computers/ai/getting-started.adoc index e98a77cbf7..7d1cd18c21 100644 --- a/documentation/asciidoc/computers/ai/getting-started.adoc +++ b/documentation/asciidoc/computers/ai/getting-started.adoc @@ -154,6 +154,38 @@ This demo performs 17-point human pose estimation, drawing lines connecting the $ rpicam-hello -t 0 --post-process-file /usr/share/rpi-camera-assets/hailo_yolov8_pose.json ---- +=== Alternative Package Versions + +The AI Kit/HAT+ devices will not function if there is a version mismatch between the Hailo software packages and device drivers. In addition, Hailo's neural network tooling may also require particular a version for the generated model file. At the time of writing, the latest package version is 4.19, but if earlier versions are required, the following steps should be followed: + +. If you have previously used `apt-mark` to hold any of the relevant packages, you may need to unhold them: ++ +[source,console] +---- +$ sudo apt-mark unhold hailo-tappas-core hailort hailo-dkms +---- + +. Install the required version of the software packages ++ +[tabs%sync] +==== +v4.18:: ++ +[source,console] +---- +$ sudo apt install hailo-tappas-core=3.29.1 hailort=4.18.0 hailo-dkms=4.18.0-2 +$ sudo apt-mark hold hailo-tappas-core hailort hailo-dkms +---- + +v4.17:: ++ +[source,console] +---- +$ sudo apt install hailo-tappas-core-3.28.2 hailort=4.17.0 hailo-dkms=4.17.0-1 +$ sudo apt-mark hold hailo-tappas-core hailort hailo-dkms +---- +==== + === Further Resources Hailo has also created a set of demos that you can run on a Raspberry Pi 5, available in the https://github.com/hailo-ai/hailo-rpi5-examples[hailo-ai/hailo-rpi5-examples GitHub repository]. From 875623bafd56ad7d2280d906e7412f51ae7b9585 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Tue, 10 Dec 2024 14:51:06 +0000 Subject: [PATCH 3/8] hailo: Rename the page from "AI software" to "AI Kit/Hat+ software" for clarity. --- documentation/asciidoc/accessories/ai-hat-plus/about.adoc | 2 +- documentation/asciidoc/accessories/ai-kit/about.adoc | 2 +- documentation/index.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/asciidoc/accessories/ai-hat-plus/about.adoc b/documentation/asciidoc/accessories/ai-hat-plus/about.adoc index be22d08694..0ea4e2997c 100644 --- a/documentation/asciidoc/accessories/ai-hat-plus/about.adoc +++ b/documentation/asciidoc/accessories/ai-hat-plus/about.adoc @@ -72,4 +72,4 @@ image::images/ai-hat-plus-installation-02.png[width="60%"] == 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. +To start running AI accelerated applications on your Raspberry Pi, check out our xref:../computers/ai.adoc[Getting Started with the AI Kit/HAT+] guide. diff --git a/documentation/asciidoc/accessories/ai-kit/about.adoc b/documentation/asciidoc/accessories/ai-kit/about.adoc index 10b11f42af..0c0074ae2e 100644 --- a/documentation/asciidoc/accessories/ai-kit/about.adoc +++ b/documentation/asciidoc/accessories/ai-kit/about.adoc @@ -90,4 +90,4 @@ WARNING: Always disconnect your Raspberry Pi from power before connecting or dis == 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. +To start running AI accelerated applications on your Raspberry Pi, check out our xref:../computers/ai.adoc[Getting Started with the AI Kit/HAT+] guide. diff --git a/documentation/index.json b/documentation/index.json index 4b4e1833c9..d57d2689c8 100644 --- a/documentation/index.json +++ b/documentation/index.json @@ -54,7 +54,7 @@ "subpath": "camera_software.adoc" }, { - "title": "AI software", + "title": "AI Kit/Hat+ software", "description": "Software and libraries for artificial intelligence on a Raspberry Pi hardware", "image": "full-sized/ai.png", "subpath": "ai.adoc" From 15210887845e94096d8e10898dd2cdb56f6615a2 Mon Sep 17 00:00:00 2001 From: nate contino Date: Tue, 10 Dec 2024 15:10:44 +0000 Subject: [PATCH 4/8] Apply suggestions from code review --- .../computers/ai/getting-started.adoc | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/documentation/asciidoc/computers/ai/getting-started.adoc b/documentation/asciidoc/computers/ai/getting-started.adoc index 7d1cd18c21..0bd7bc380b 100644 --- a/documentation/asciidoc/computers/ai/getting-started.adoc +++ b/documentation/asciidoc/computers/ai/getting-started.adoc @@ -60,7 +60,8 @@ Serial Number: HLDDLBB234500054 Part Number: HM21LB1C2LAE Product Name: HAILO-8L AI ACC M.2 B+M KEY MODULE EXT TMP ---- -NOTE: The AI HAT+ devices may show `` for `Serial Number`, `Part Number` and `Product Name` above. This is expected, and will not affect device functionality. + +NOTE: AI HAT+ devices may show `` for `Serial Number`, `Part Number` and `Product Name`. This is expected, and does not impact functionality. + Additionally, you can run `dmesg | grep -i hailo` to check the kernel logs, which should yield output similar to the following: + @@ -97,7 +98,7 @@ The `rpicam-apps` suite of camera applications implements a xref:camera_software 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, ensure you have the latest `rpicam-apps` software package installed with: +To begin, run the following command to install the latest `rpicam-apps` software package: [source,console] ---- @@ -156,7 +157,7 @@ $ rpicam-hello -t 0 --post-process-file /usr/share/rpi-camera-assets/hailo_yolov === Alternative Package Versions -The AI Kit/HAT+ devices will not function if there is a version mismatch between the Hailo software packages and device drivers. In addition, Hailo's neural network tooling may also require particular a version for the generated model file. At the time of writing, the latest package version is 4.19, but if earlier versions are required, the following steps should be followed: +The AI Kit and AI HAT+ do not function if there is a version mismatch between the Hailo software packages and device drivers. In addition, Hailo's neural network tooling may also require particular a version for the generated model file. If you require an specific version, complete the following steps to install the proper versions of all of the dependencies: . If you have previously used `apt-mark` to hold any of the relevant packages, you may need to unhold them: + @@ -165,26 +166,37 @@ The AI Kit/HAT+ devices will not function if there is a version mismatch between $ sudo apt-mark unhold hailo-tappas-core hailort hailo-dkms ---- -. Install the required version of the software packages +. Install the required version of the software packages: + [tabs%sync] -==== +====== v4.18:: +To install version 4.18 of Hailo's neural network tooling: ++ + [source,console] ---- $ sudo apt install hailo-tappas-core=3.29.1 hailort=4.18.0 hailo-dkms=4.18.0-2 +---- ++ +[source,console] +---- $ sudo apt-mark hold hailo-tappas-core hailort hailo-dkms ---- v4.17:: +To install version 4.17 of Hailo's neural network tooling: + [source,console] ---- $ sudo apt install hailo-tappas-core-3.28.2 hailort=4.17.0 hailo-dkms=4.17.0-1 +---- ++ +[source,console] +---- $ sudo apt-mark hold hailo-tappas-core hailort hailo-dkms ---- -==== +====== === Further Resources From 0ff632be6bb10d4e9dcdae45cf5f88eed99f1db1 Mon Sep 17 00:00:00 2001 From: nate contino Date: Tue, 10 Dec 2024 15:11:17 +0000 Subject: [PATCH 5/8] Apply suggestions from code review --- documentation/index.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/index.json b/documentation/index.json index d57d2689c8..d0000060fe 100644 --- a/documentation/index.json +++ b/documentation/index.json @@ -54,7 +54,7 @@ "subpath": "camera_software.adoc" }, { - "title": "AI Kit/Hat+ software", + "title": "AI Kit and AI HAT+ software", "description": "Software and libraries for artificial intelligence on a Raspberry Pi hardware", "image": "full-sized/ai.png", "subpath": "ai.adoc" From 32c6a2c49277a0955cf490d96cf9cfd81f2f7f9b Mon Sep 17 00:00:00 2001 From: nate contino Date: Tue, 10 Dec 2024 15:33:34 +0000 Subject: [PATCH 6/8] Update documentation/asciidoc/computers/ai/getting-started.adoc --- documentation/asciidoc/computers/ai/getting-started.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/asciidoc/computers/ai/getting-started.adoc b/documentation/asciidoc/computers/ai/getting-started.adoc index 0bd7bc380b..08f43b7cb6 100644 --- a/documentation/asciidoc/computers/ai/getting-started.adoc +++ b/documentation/asciidoc/computers/ai/getting-started.adoc @@ -102,7 +102,7 @@ To begin, run the following command to install the latest `rpicam-apps` software [source,console] ---- -$ sudo apt install rpicam-apps +$ sudo apt update && sudo apt install rpicam-apps ---- ==== Object Detection From 01799f8666ea4a65b7e6b585f9f5449f79af8d43 Mon Sep 17 00:00:00 2001 From: nate contino Date: Tue, 10 Dec 2024 15:34:08 +0000 Subject: [PATCH 7/8] Update documentation/asciidoc/computers/ai/getting-started.adoc --- documentation/asciidoc/computers/ai/getting-started.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/asciidoc/computers/ai/getting-started.adoc b/documentation/asciidoc/computers/ai/getting-started.adoc index 08f43b7cb6..f52f61d202 100644 --- a/documentation/asciidoc/computers/ai/getting-started.adoc +++ b/documentation/asciidoc/computers/ai/getting-started.adoc @@ -157,7 +157,7 @@ $ rpicam-hello -t 0 --post-process-file /usr/share/rpi-camera-assets/hailo_yolov === Alternative Package Versions -The AI Kit and AI HAT+ do not function if there is a version mismatch between the Hailo software packages and device drivers. In addition, Hailo's neural network tooling may also require particular a version for the generated model file. If you require an specific version, complete the following steps to install the proper versions of all of the dependencies: +The AI Kit and AI HAT+ do not function if there is a version mismatch between the Hailo software packages and device drivers. In addition, Hailo's neural network tooling may require a particular version for generated model files. If you require an specific version, complete the following steps to install the proper versions of all of the dependencies: . If you have previously used `apt-mark` to hold any of the relevant packages, you may need to unhold them: + From d50cc5887231d43ddae5c0c3e031c206d9b7c870 Mon Sep 17 00:00:00 2001 From: nate contino Date: Tue, 10 Dec 2024 15:34:42 +0000 Subject: [PATCH 8/8] Apply suggestions from code review --- documentation/asciidoc/accessories/ai-hat-plus/about.adoc | 2 +- documentation/asciidoc/accessories/ai-kit/about.adoc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/asciidoc/accessories/ai-hat-plus/about.adoc b/documentation/asciidoc/accessories/ai-hat-plus/about.adoc index 0ea4e2997c..98f1923bf5 100644 --- a/documentation/asciidoc/accessories/ai-hat-plus/about.adoc +++ b/documentation/asciidoc/accessories/ai-hat-plus/about.adoc @@ -72,4 +72,4 @@ image::images/ai-hat-plus-installation-02.png[width="60%"] == 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 the AI Kit/HAT+] guide. +To start running AI accelerated applications on your Raspberry Pi, check out our xref:../computers/ai.adoc[Getting Started with the AI Kit and AI HAT+] guide. diff --git a/documentation/asciidoc/accessories/ai-kit/about.adoc b/documentation/asciidoc/accessories/ai-kit/about.adoc index 0c0074ae2e..bc93a483f5 100644 --- a/documentation/asciidoc/accessories/ai-kit/about.adoc +++ b/documentation/asciidoc/accessories/ai-kit/about.adoc @@ -90,4 +90,4 @@ WARNING: Always disconnect your Raspberry Pi from power before connecting or dis == 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 the AI Kit/HAT+] guide. +To start running AI accelerated applications on your Raspberry Pi, check out our xref:../computers/ai.adoc[Getting Started with the AI Kit and AI HAT+] guide.