Why is the first label always lost on move during model inference

I noticed that the detection box of the first label has one more number in the lower left corner than the others, is this the reason? I moved all the tags back one place for my model and added an unused tag to the first one, and the other detections no longer looked sluggish, but there were times when there were obvious detection errors, and when displayed, the detection boxes of multiple labels overlapped and always showed 88% confidence, which really bothered me for a long time

Hey @S_X,

Welcome to the Hailo Community!

Looking at your annotation issue, yes – that extra number on the first line is definitely the culprit. Here’s what’s happening and how to resolve it:

The Problem:
YOLO’s annotation format requires exactly 5 values per line: <class_id> <x_center> <y_center> <width> <height>. When you have a sixth number, the parser reads the first 5 values correctly for the initial bounding box, but then interprets that extra value as the class_id for the subsequent box. This creates a cascading shift where all following annotations get misaligned – wrong coordinates and incorrect class assignments.

Why Your Tag Workaround Seemed to Help:
By adding a dummy class at position 0 and shifting your real classes down, you essentially compensated for the parsing offset. This explains why your detections stopped appearing sluggish, but you’re now seeing phantom detections from “class 0” with that consistent 0.88 confidence score.

The Fix:

  1. Clean up your annotation files – ensure every line contains exactly 5 numerical values
  2. Remove the dummy class from your labels.txt file
  3. Retrain/recompile your HEF model with the corrected class mapping
  4. Test your inference pipeline again

Hope this helps!