NMS is not working correctly?

Hi guys,

I was playing with async_detection_inference example and I’ve noticed that NMS might not work correctly:

As you can see, the bounding boxes around given object are not suppressed. I am using HAILO8 and model yolov6n.hef taken from model zoo.

Is there anything else I need to turn on for NMS to kick in?

Thanks for any advice.

Hi @Chuck_Rhoades,

Thanks for reporting this issue with the duplicate detections. There are two potential scenarios we need to investigate:

  1. We might be getting two legitimate detections that are being placed very close to each other
  2. There could be a bug where we’re accidentally drawing the same detection twice

Let me look into this more deeply and I’ll get back to you with our findings and a solution.

Best regards,
Omria

Hi @omria

many thanks for checking that out. I reported badly the Hailo type that I have. It is HAILO8L (sorry, I could not edit my post).

I’ve also experienced the same issue with different model: yolov8n.hef

If you need me to do any more test or I can help in any other way, please late me know.

Hi @Chuck_Rhoades
Is this happening on a video stream or even on a single image?

Hi @shashi this is happening on a single image.

I’ve modified C++ async example to do the inference only on one frame. Here is the result:

And then, I took the same frame and passed it to Python object_detection example, and here is the result:

So I think the problem lies in C++ code not in the model itself. I’ve used the same model.

Hi @Chuck_Rhoades
We tried multiple models from the model zoo using our PySDK and did not notice it. Perhaps you can try with PySDK once: User Guide 3: Simplifying Object Detection on a Hailo Device Using DeGirum PySDK. Alternatively, if you provide original image and the model name, I can try it on my side.

dear @shashi it is because you’ve tried it via Python, and as I wrote in my subsequent post, in Python it works for me too. It is probably something in the code for C++ (Hailo’s “common”?) that is messing things up.

@Chuck_Rhoades
You are probably right. Hopefully someone from Hailo can help on this.

Any updates on a fix for this? I’m using the visdrone dataset and noticing this too, despite using the nms config file from the official repo (adapted for visdrone)

You can see some boxes below have severe overlap, e.g. the motorcycle on the road at the bottom of the picture, or the couple walking on the street towards the lower rightside (the person on the right has 2 boxes)