Ref my previous post, with a fresh Pi5 os installation and the latest hailo 4.19 libraries:
I have a Hailo8 (not a Hailo8L)
-:~/picamera2/examples/hailo $ python detect.py with default .hef I get the following warning:
[HailoRT] [warning] HEF was compiled for Hailo8L device, while the device itself is Hailo8. This will result in lower performance.
BUT DETECTIONS WORK
same program, but specifying a custom .hef compiled for Hailo8, that was working with 4.18, I don’t get the warning but I get:
File “/home/a/picamera2/examples/hailo/detect.py”, line 20, in extract_detections
score = detection[4]
~~~~~~~~~^^^
IndexError: invalid index to scalar variable.
@Nadav
After long testing, I found the issue. It is not related to 8 vs 8L.
I believe it is something you have changed / fixed going from 4.18 to 4.19
that broke some existing code:
~/picamera2/examples/hailo $ python detect.py
4.18:
detections = extract_detections(results[0], video_w, video_h, class_names, args.score_thresh)
4.19:
detections = extract_detections(results, video_w, video_h, class_names, args.score_thresh)
I just wish there were a place that describes the changes 4.18-4.19
I’ll investigate this error on my setup and test the fix you suggested. If the issue is related to a version change in our side, we’ll make sure to update our documentation accordingly.
Thanks for bringing this to our attention!
Note: this is a picamera2 app which is rpi software.