Bounding box of HEF disoriented in comparison to PT

Hi,

I’m new to the Raspberry Pi world and have spent the past three months working with a Raspberry Pi 5, the Raspberry Pi AI Kit, and the Raspberry Pi Camera Module 3. My project involves building a customized object detection model for a specific building block using the Raspberry Pi and comparing the performance between a PT model and an HEF model.

After a lot of troubleshooting, I successfully generated both the PT and HEF files. While the bounding boxes in the PT model display to my liking, those in the HEF model appear too large.

Since I’ve struggled so much over the past few months to get to this point (I even had to completely reset the operating system at one stage), I now have a tight deadline.

I modified the following script for me and changed the size to 800x800 since the model was trained in 800x800 it was also the only script that I tried and found that let me resize it to 800x800 and actually worked: picamera2/examples/hailo/detect.py at main · raspberrypi/picamera2 · GitHub


If anyone could help me resolve this issue, I would greatly appreciate it! @omria @Nadav @pierrem

Hi @moon2701,
This can be rooted in a few places:

  1. We don’t know what is the model, and the input to the model (compared to the input to the pipeline). Could be that the conversion of the coordinates back to the image dimensions is not right.
  2. Optimization is not fully done. How have you optimized the model? how many image were used, have you used any special alls commands?
  3. have you tried the detection pipeline from the hialo git?