Adapting a custom YOLOv8 pose model to run on the Hailo-8L

Hi all, I’m running a custom YOLOv8 pose model on the Hailo-8L to track 3 keypoints from both video and live camera feed. My 640x640 model works correctly after HEF conversion with a custom C++ postprocessor. I’ve now trained a 640x480 version on the same dataset to match my camera’s native resolution, but the keypoint tracking is broken and I’m unsure how to adapt the postprocessing for the non-square input dimensions. Any guidance appreciated!

Hi @Mia_Sawyer ,

The issue is in your C++ postprocessor - it almost certainly has network_dims = {640, 640} hardcoded. With a 640x480 model, the keypoint coordinates get normalized by the wrong dimension, which scrambles the Y-axis tracking.

Key changes needed in your postprocess:

  1. Fix network_dims to match your model: {640, 480} (width, height)
  2. Fix the keypoints reshape - the default assumes 17 COCO keypoints. Change it to 3:
xt::xarray<uint16_t> quantized_keypoints = xt::reshape_view(
    output_keypoints_quantized, {num_proposals_keypoints, 3, 3});
  1. Update JOINT_PAIRS to only reference your 3 keypoint indices (0–2).

The bbox and keypoint decoding both divide by network_dims[0] for x and network_dims[1 for y to get normalized [0,1] coordinates. Once those dims are correct, the keypoint tracking should work the same as your square model.

Also - if your pipeline letterboxes the input (e.g., camera isn’t exactly 4:3), make sure you’re using the letterbox-aware filter variant so the scaling bbox is applied correctly.

Thanks,