[RPi5] Custom YOLOv5s HEF runs but no detections shown on frame

Hi Hailo Team,

I successfully trained a custom YOLOv5s model (1 class: barcode) and compiled it into a .hef using the Hailo Model Zoo pipeline with NMS enabled (nms: true in YAML). The .hef runs fine on my Raspberry Pi 5:


Model sanity check:

hailortcli run /home/jcyen/.../custom_yolov5s.hef

Output:

FPS: 123.37  
Frames count: 617  
Recv Rate: 6.39 Mbit/s  

→ This shows the model is functional.


:chart_decreasing: Problem:

  • Video plays
  • Frame count increases (e.g., Frame count: 409)
  • No error
  • But no detections are printed or drawn

Details:

  • .json file follows Hailo schema:
{
  "labels": ["barcode"],
  "num_classes": 1,
  "meta_arch": "yolo_v5",
  "device_pre_post_layers": { "nms": true }
}
  • Model trained with image size 640x640
  • Tested on video where barcodes are clearly visible

What I suspect:

  • NMS config not applied correctly?
  • Bounding box size out of frame?
  • Postprocess lib mismatch?

I would really appreciate your help—everything runs but detection results never show up. Thanks a lot!

Hi @SHENG-HSUN_CHEN
Did you check if the anchors are the same as the default anchors?