Yocto meta layer for building Hailo C++ inference applications on Astrial (NXP i.MX8MP) with the Hailo-8 AI accelerator. Based on the System Electronics scarthgap BSP branch.
| App | Binary | Description |
|---|---|---|
object_detection |
object_detection |
Generic object detection |
instance_segmentation |
instance_segmentation |
Instance segmentation with masks |
classification |
classifier |
Image classification |
semantic_segmentation |
semantic_segmentation |
Per-pixel scene segmentation |
pose_estimation |
pose_estimation |
Human pose estimation |
oriented_object_detection |
oriented_obj_det |
Object detection with rotation angles |
depth_estimation_mono |
mono_depth_estimation |
Monocular depth estimation |
depth_estimation_stereo |
stereo_depth_estimation |
Stereo depth estimation |
onnxrt_hailo_pipeline |
onnxrt_hailo_pipeline |
Hailo inference + ONNX Runtime postprocessing |
This is the standard way to include meta-hailo-apps when setting up a new build
from scratch using the Astrial manifest.
Before running the build, add the majedabu remote and meta-hailo-apps project
to your local manifest at .repo/local_manifests/astrial-6.6.52.xml:
<remote fetch="https://github.com/majedabu" name="majedabu"/>
<project name="meta-hailo-apps" remote="majedabu" revision="main" path="sources-extra/meta-hailo-apps"/>Then sync and add the layer to bblayers.conf before starting the full image build:
repo sync sources-extra/meta-hailo-apps
echo 'BBLAYERS += "${BSPDIR}/sources-extra/meta-hailo-apps"' >> build/conf/bblayers.conf
bitbake system-astrial-imageIf you already have a built Astrial image and want to add meta-hailo-apps
without rebuilding from scratch, follow these steps.
Add the majedabu remote and meta-hailo-apps project to
.repo/local_manifests/astrial-6.6.52.xml:
<remote fetch="https://github.com/majedabu" name="majedabu"/>
<project name="meta-hailo-apps" remote="majedabu" revision="main" path="sources-extra/meta-hailo-apps"/>cd /home/hailo/imx-yocto-bsp
repo sync sources-extra/meta-hailo-appscd sources-extra/meta-hailo-apps
git remote add origin https://github.com/majedabu/meta-hailo-apps.git
cd /home/hailo/imx-yocto-bspecho 'BBLAYERS += "${BSPDIR}/sources-extra/meta-hailo-apps"' \
>> build/conf/bblayers.confsource astrial-setup-env build
bitbake hailo-cpp-appsAll other packages are cached in sstate so this is fast:
bitbake system-astrial-imageOutput image:
build/tmp/deploy/images/astrial-8gb-imx8mp/system-astrial-image-astrial-8gb-imx8mp.rootfs.wic.zst
After flashing, apps are installed at /root/hailo-apps/:
/root/hailo-apps/
├── object_detection/object_detection
├── instance_segmentation/instance_segmentation
├── classification/classifier
├── semantic_segmentation/semantic_segmentation
├── pose_estimation/pose_estimation
├── oriented_object_detection/oriented_obj_det
├── depth_estimation_mono/mono_depth_estimation
├── depth_estimation_stereo/stereo_depth_estimation
│ ├── left.jpg
│ └── right.jpg
└── onnxrt_hailo_pipeline/
├── onnxrt_hailo_pipeline
└── yolov8m-seg_post.onnx
./object_detection/object_detection -i usbThe apps support -i csi for the IMX219 CSI camera on Astrial.
The ISP daemon must be running before launching any app with CSI input:
# Start the ISP daemon first
cd /opt/imx8-isp/bin && ./run.sh -lm -c dual_imx219_1080p60 &
# Then run any app with CSI input
./object_detection/object_detection -i csi
./classification/classifier -i csi./object_detection/object_detection -i /path/to/video.mp4cd /root/hailo-apps/depth_estimation_stereo
./stereo_depth_estimation -i left.jpgmeta-oe(openembedded-layer)meta-hailo-imx— provideslibhailort,xtl,xtensormeta-imx— providesopencv,onnxruntime