Get illegal class id from hailo8 output stream

I’m using hailo8 to test yolov5m and yolov8 by the test sample. I could run the sample successfully and see the detected objects. But when I print and check the output stream, I found some issues that the buffer may not exactly follows the specification.

Here is one example:

hailo8 output stream is: ( I only print non-zero id and values)

[0]-1.000000, [1]-0.249405, [2]-0.284980, [3]-0.410521, [4]-0.390595, [5]-0.517700, [32]-1.000000, [33]-0.000507, [34]-0.736037, [35]-0.194623, [36]-0.779737, [37]-0.213832, [72]-1.000000, [73]-0.063949, [74]-0.548161, [75]-0.149549, [76]-0.607560, [77]-0.527487, [96]-1.000000, [97]-0.501904, [98]-0.374667, [99]-0.601512, [100]-0.451392, [101]-0.203154,
-I- Class [person] box [248] conf: 0.5177: (182.387, 159.619, 249.981, 262.733)
-I- Class [tie] box [248] conf: 0.213832: (471.064, 0.324396, 499.032, 124.558)
-I- Class [tv] box [248] conf: 0.527487: (350.823, 40.9271, 388.838, 95.7113)
-I- Class [N/A] box [248] conf: 0.203154: (239.787, 321.219, 288.891, 384.968)

As the function in the demo, it will only detect class idx <= 80, it will miss the last object information, which has class id 82. The correct class id should be 72 I think.

There issue doesn’t happen a lot in yolov8m and yolov5m, but it happens more frequently in yolov5s. Can you please help me to check and figure it out?

Hi @dliu,
I’m happy to see that you’ve been able to get ahead with our examples.
The YOLOs that we have were trained on the COCO dataset, that contains only 80 classes (link), so these detectors, by definition, should not get index above 81 (80 classes +1 for background).
Is it possible that you’re using a detector that was trained on a different dataset?

Hi Nadav,

Thanks for you quick response.

Actually, I was testing with yolov8m.hef from hailo website, and get the anomaly output stream. I didn’t use the function of the hailo sample to parse the output stream, but print it out to parse by myself, and get the problem.

There are 903 frames in my test video, it happens in one frame only. But when I test with yolov5s, it happens a little more frequently.

Can you please test with this picture, and print out the output stream to verify? I get the buffer as shown below.

[0]-1.000000, [1]-0.249405, [2]-0.284980, [3]-0.410521, [4]-0.390595, [5]-0.517700, [32]-1.000000, [33]-0.000507, [34]-0.736037, [35]-0.194623, [36]-0.779737, [37]-0.213832, [72]-1.000000, [73]-0.063949, [74]-0.548161, [75]-0.149549, [76]-0.607560, [77]-0.527487, [96]-1.000000, [97]-0.501904, [98]-0.374667, [99]-0.601512, [100]-0.451392, [101]-0.203154

Hi Nadav,

I cannot post the media item in the reply, can you please let me know how can I send the test image to you?

Hi @dliu, can you attach it like in the original post?

Hi @dliu,
Thanks for sharing the original image. I’ve just tried it with the Model-Zoo’s yolov8m.
The results looks quite good:

I’ve used basically the same as in this post: