Using the Hailo-8 AI Compute Card
Testing Environment:
Hailo-8 AI Compute Card
LKD3588
Other Neardi products can also refer to this guide.
The Hailo-8 AI Compute Card is an accelerator module specifically designed for edge computing AI applications, providing up to 26 TOPS (trillion operations per second) of processing power.
Connecting the Hailo-8 Compute Stick
Attaching the Hailo-8 Heatsink
Firmware versions from October 2023 onwards support the Hailo-8 by default. To flash the latest Neardi-3588 firmware,download and support for the corresponding model,For the flashing method, please refer to the chapter《Using the Type-C Cable to Upgrade Firmware》.
Check the firmware version:
neardi@LPA3588:~$ cat /etc/os-release | grep BUILD_NAME
BUILD_NAME="LZ160_3588_ubuntu20.04_v1.0_20240205_1439"
Face Recognition and Attribute Detection
Download hailo8_ak_rockit
git clone https://gitee.com/ytlans/hailo8_ak_rockit
The source code structure is as follows:
neardi@LPA3588:~/hailo8/hailo8_ak_rockit$ ls -al
total 6036
drwxrwxr-x 5 neardi neardi 4096 Mar 1 06:36 .
drwxrwxr-x 4 neardi neardi 4096 Mar 1 06:36 ..
-rwxrwxr-x 1 neardi neardi 3065744 Mar 1 06:36 ak_rockit_demo
drwxrwxr-x 2 neardi neardi 4096 Mar 1 06:36 ak_rockit_demo_res
drwxrwxr-x 8 neardi neardi 4096 Mar 1 06:36 .git
-rw-rw-r-- 1 neardi neardi 59371 Mar 1 06:36 hailort.log
-rwxrwxr-x 1 neardi neardi 69784 Mar 1 06:36 libgraphic_lsf.so
-rwxrwxr-x 1 neardi neardi 2950456 Mar 1 06:36 librockit.so
drwxrwxr-x 2 neardi neardi 4096 Mar 1 06:36 model
-rw-rw-r-- 1 neardi neardi 0 Mar 1 06:36 README.md
-rwxrwxr-x 1 neardi neardi 43 Mar 1 06:36 run_demo.sh
Run:
neardi@LPA3588:~/hailo8/hailo8_ak_rockit$ ./run_demo.sh
This demo analyzes 16 channels of 1080P@fps30 H265 video streams. The successful screen is shown below:
Note: After killing the demo process, the screen may go black. In this case, re-plug the HDMI to restore it.
How to Read Video from Camera and Analyze
Download hailo8_yolo5_demo
git clone https://gitee.com/ytlans/hailo8_yolo5_demo
The source code structure is as follows:
neardi@LPA3588:~/hailo8/hailo8_yolo5_demo$ ls -al
total 6280
drwxrwxr-x 8 neardi neardi 4096 Mar 1 06:42 .
drwxrwxr-x 5 neardi neardi 4096 Mar 1 06:41 ..
drwxrwxr-x 3 neardi neardi 4096 Mar 1 06:42 Apps
drwxrwxr-x 8 neardi neardi 4096 Mar 1 06:42 .git
-rwxrwxr-x 1 neardi neardi 1065 Mar 1 06:42 LICENSE
drwxrwxr-x 4 neardi neardi 4096 Mar 1 06:42 MultiNetworkPipeline
drwxrwxr-x 2 neardi neardi 4096 Mar 1 06:42 Network
-rwxrwxr-x 1 neardi neardi 828 Mar 1 06:42 README.md
-rwxrwxr-x 1 neardi neardi 6387928 Mar 1 06:42 runme.4.14.0
drwxrwxr-x 2 neardi neardi 4096 Mar 1 06:42 SampledData
drwxrwxr-x 5 neardi neardi 4096 Mar 1 06:42 Utils
Install the build environment:
sudo apt update
sudo apt install build-essential cmake
Compile:
neardi@LPA3588:~/hailo8/hailo8_yolo5_demo/Apps/yolo$ ./build.sh
-I- Building aarch64
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/aarch64-linux-gnu-gcc
-- Check for working C compiler: /usr/bin/aarch64-linux-gnu-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
......
[100%] Linking CXX executable runme.4.14.0
[100%] Built target runme.4.14.0
After successful compilation, copy the generated executable file to the Apps/yolo directory, as follows:
neardi@LPA3588:~/hailo8/hailo8_yolo5_demo/Apps/yolo$ cp runme.4.14.0 ../../
In the Apps/yolo path, run the demo as follows:
neardi@LPA3588:~/hailo8/hailo8_yolo5_demo/Apps/yolo$ ./runme.4.14.0 -b 1 -n "yolov5s" -v "/dev/video22"
The successful screen is shown below:
Reference Links
Hailo API Documentation Registration required to view, follow the prompts to register for free.
Detailed documentation after successful registration is shown below: