James
August 23, 2024, 8:19am
1
Running the detection example in hailo-rpi5-examples throws:
ModuleNotFoundError: No module named ‘hailo’
This example was working fine originally. However, I wanted to upgrade to HailoRT 4.18 to have access to the Python API. In order to upgrade, I used the instructions in the below link:
Guide: Installing HailoRT 4.18 and Driver on Raspberry Pi 5
This guide covers the manual installation of HailoRT 4.18 and its driver on a Raspberry Pi 5, including setup for the Python API.
Clean Installation
Step 1: Remove Old Installations
Run the following commands:
sudo dpkg --purge hailort hailo-all hailofw hailo-tappas-core-3.28.2 hailort-pcie-driver
Then, check for any remaining Hailo files:
find /usr/lib/ | grep hailo
Delete any remaining Hailo files found.
Step 2: Install DKMS
Ens…
There were no clear errors during the upgrade and inspection of gst-inspect-1.0 hailotools and gst-inspect-1.0 hailo show the expected results.
After the upgrade, I can no longer use the environment that was previously used for this example (hailo-rpi5-examples/doc/basic-pipelines.md at main · hailo-ai/hailo-rpi5-examples · GitHub ). Namely, the following message is now thrown when I try to source that environment
TAPPAS_VERSION is 3.29.1 not in the list of required versions 3.28.0 3.28.1 3.28.2.
omria
August 26, 2024, 7:08am
3
Hello
If the installation process completed successfully and the gst-inspect
command is working correctly, the issue you’re experiencing might be due to a version mismatch. It seems that the example you’re trying to run is configured for TAPPAS 3.28, while you had to install TAPPAS 3.29.1 to make the Python API work properly.
To resolve this, you’ll need to update the repository to use the latest TAPPAS 3.29.1 in the examples. You can do this by modifying the setup_env.sh
file. Here’s how you should update it:
#!/bin/bash
# TAPPAS CORE Definitions
CORE_VENV_NAME="venv_hailo_rpi5_examples"
CORE_REQUIRED_VERSION=("3.29.1")
# TAPPAS Definitions
TAPPAS_VENV_NAME="hailo_tappas_venv"
TAPPAS_REQUIRED_VERSION=("3.29.1")
Make sure to change both the CORE_REQUIRED_VERSION
and TAPPAS_REQUIRED_VERSION
to “3.29.1”. This should align the example with the version of TAPPAS you have installed, which should resolve the compatibility issue.
After making these changes, try running your example again by creating the environment. If you encounter any further issues, please let us know, and we’ll be happy to assist you further.
James
August 26, 2024, 4:15pm
4
Thanks for the suggestion.
Although that gets me past the “No module named hailo” error, I still get a pretty nasty error when I try to run the detection example in hailo-rpi5-examples.
(hailo_tappas_venv) Blah@Blah:~/hailo-rpi5-examples $ python basic_pipelines/detection.py --input resources/detection0.mp4
hailomuxer name=hmux filesrc location=resources/detection0.mp4 name=src_0 ! queue name=queue_dec264 max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! qtdemux ! h264parse ! avdec_h264 max-threads=2 ! video/x-raw, format=I420 ! queue name=queue_scale max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoscale n-threads=2 ! queue name=queue_src_convert max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoconvert n-threads=3 name=src_convert qos=false ! video/x-raw, format=RGB, width=640, height=640, pixel-aspect-ratio=1/1 ! tee name=t ! queue name=bypass_queue max-size-buffers=20 max-size-bytes=0 max-size-time=0 ! hmux.sink_0 t. ! queue name=queue_hailonet max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoconvert n-threads=3 ! hailonet hef-path=/home/KiLiMi/hailo-rpi5-examples/basic_pipelines/../resources/yolov6n.hef batch-size=2 nms-score-threshold=0.3 nms-iou-threshold=0.45 output-format-type=HAILO_FORMAT_TYPE_FLOAT32 force-writable=true ! queue name=queue_hailofilter max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hailofilter so-path=/home/KiLiMi/hailo-rpi5-examples/basic_pipelines/../resources/libyolo_hailortpp_post.so qos=false ! queue name=queue_hmuc max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hmux.sink_1 hmux. ! queue name=queue_hailo_python max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! queue name=queue_user_callback max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! identity name=identity_callback ! queue name=queue_hailooverlay max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hailooverlay ! queue name=queue_videoconvert max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoconvert n-threads=3 qos=false ! queue name=queue_hailo_display max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! fpsdisplaysink video-sink=xvimagesink name=hailo_display sync=true text-overlay=False signal-fps-measurements=true
[HailoRT] [error] CHECK failed - max_desc_page_size given 16384 is bigger than hw max desc page size 4096
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INTERNAL_FAILURE(8)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INTERNAL_FAILURE(8)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INTERNAL_FAILURE(8)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INTERNAL_FAILURE(8)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INTERNAL_FAILURE(8)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INTERNAL_FAILURE(8)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INTERNAL_FAILURE(8)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INTERNAL_FAILURE(8)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INTERNAL_FAILURE(8)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INTERNAL_FAILURE(8)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INTERNAL_FAILURE(8)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INTERNAL_FAILURE(8)
CHECK_EXPECTED failed with status=8
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.246: gst_queue_array_push_tail: assertion 'array != NULL' failed
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.246: gst_queue_array_push_tail: assertion 'array != NULL' failed
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.246: gst_queue_array_push_tail: assertion 'array != NULL' failed
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.247: gst_queue_array_push_tail: assertion 'array != NULL' failed
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.255: gst_queue_array_push_tail: assertion 'array != NULL' failed
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.257: gst_queue_array_push_tail: assertion 'array != NULL' failed
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.260: gst_queue_array_push_tail: assertion 'array != NULL' failed
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.263: gst_queue_array_push_tail: assertion 'array != NULL' failed
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.264: gst_queue_array_push_tail: assertion 'array != NULL' failed
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.268: gst_queue_array_push_tail: assertion 'array != NULL' failed
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.269: gst_queue_array_push_tail: assertion 'array != NULL' failed
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.273: gst_queue_array_push_tail: assertion 'array != NULL' failed
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.278: gst_queue_array_push_tail: assertion 'array != NULL' failed
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.285: gst_queue_array_push_tail: assertion 'array != NULL' failed
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.287: gst_queue_array_push_tail: assertion 'array != NULL' failed
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.290: gst_queue_array_push_tail: assertion 'array != NULL' failed
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.293: gst_queue_array_push_tail: assertion 'array != NULL' failed
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.295: gst_queue_array_push_tail: assertion 'array != NULL' failed
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.296: gst_queue_array_push_tail: assertion 'array != NULL' failed
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.299: gst_queue_array_push_tail: assertion 'array != NULL' failed
(Hailo Detection App:2712): GStreamer-Base-CRITICAL **: 16:59:50.303: gst_queue_array_push_tail: assertion 'array != NULL' failed
Given it seems others are having similar experiences with the Python API (HailoRT 4.18, RPI5 and rpi5 examples ), it seems that this is not an isolated issue. Although it sounds like some of this will (hopefully) be fixed in the next release (which is supposedly a week or 2 away given the comment from @giladn in the post above), it seems like the Python API is quite buggy as of right now. I wonder if I am better off trying the C++ API until things are a bit more stable.