RPI5-Hailo8L with SSD mobilenet

Hello!
I’m currently using hailort8l with Raspberry Pi5 running detection.py (from basic_ pipelines) and it works very well for object detection with yolov8.
I’m wondering if there is a way to modify the demo to make it running with a ssd_mobilenet model: to make stuff as easier as possible I downloaded a ssd_mobilenet_v1.hef file from Hailo web site, but when I try to run the demo with it I got an error:

[HailoRT] [error] CHECK failed - There is no post-process metadata for ‘ssd_mobilenet_v1/nms1’
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INVALID_ARGUMENT(2)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INVALID_ARGUMENT(2)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INVALID_ARGUMENT(2)
CHECK_EXPECTED failed with status=2

I understood it is something connected with NMS post process: the HEF file is from Hailo web site so I consider it correct, but I don’t understand where and what should I modify… is anyone trying to run this demo with different models? Any suggest is welcome.

Thank you

Hey @giancarlo.perroni ,

Welcome to the Hailo Community!

yes, it’s absolutely possible to run different models beyond just YOLOv8. However, the key thing to keep in mind is that you’ll need to provide the appropriate post-processing steps for each model.

In the case of the error you encountered, here’s what’s going on under the hood: YOLOv8 models are optimized to run with our HailoRT-PP (post-processing) library directly on the Hailo chip. This makes YOLOv8 super fast and simple to deploy out of the box.

On the other hand, the SSD MobileNet model architecture includes a non-maximum suppression (NMS) post-processing step that happens outside of the compiled HEF file. So to get SSD MobileNet working, you’ll need to implement that NMS logic yourself in the callback function.

Best Regards,
Omri

Hi @omria,

thank you for the reply and the clarification!
Are you able to indicate to me where, in hailo-rpi5-examples, this callback function is located? My issue is that I didn’t find any python example for raspberry in which such NMS logic callback was implementated to study it and learn how to do.

Thank you in advance.

Best Regards,
Giancarlo

Hey @giancarlo.perroni,

You can find the callback function in the detection pipeline example:

Similar callback functions can be found in other pipeline examples within the same folder.

To provide more specific guidance on implementing NMS for your use case, it would be helpful if you could share some additional details:

  • Which model are you currently running?
  • What specific task or application are you trying to accomplish with the model?

Hi @omria,

thank you a lot for the reply. I saw this callback, but I was not able to use it for my specific case.
To reply to your questions:

  • I’ve dowloaded a ssd_mobilenet_v1.hef file from Hailo web site as is (so I’m using a ssd_mobilenet model),
  • with this model I would to implement an object detection task.

Basically I just want to take the object detection pipeline currently working with yolov8s and make it run with ssd_mobilnet_v1 too: is such a thing possibile? May be I’m making a macroscopic error, but I’m not able to identifiy it. Any suggestion and/or working example yould be helful.

Thank you in advance.
Kind Regards,