'NMS Issues or Model Issues?

I'm currently trying to get yolov5s.onnx working in Unity. I've written a script that should, in theory, be working perfectly. Only, it isn't.

At this point, I have the issue narrowed down to being one of two things: a non max suppression failure or an issue with the model itself. I want to ask for help on figuring out which it is.

I know that, by default, the model has no problems. I'm able to use it in a python script just fine. Works perfectly. Does exactly what it's supposed to.

Python Output (what it's supposed to look like):

It's so beautiful. I could watch this run for hours.

But when I load the model into Unity, I get these four warnings:

Because of course Unity has a problem with the model.

Which makes me wonder if my issues are a problem rooted in some inability of Unity/Barracuda to properly handle the model.

On the other hand, this is the output I get within Unity. Which makes me thing it's an issue with my non max suppression (or my post-processing in general).

Errors everywhere!

So, given this, could anyone please help? (I can also show my post-processing code, including my non max suppression code, but it's pretty lengthy so I'll only do that if someone asks.)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source