Tappas detection.sh not working with yolox_s_leaky

I compiled yolox_s_leaky using the hailo model zoo and I copied yolox_s_leaky.hef to my Tappas docker’s location /local/workspace/tappas/apps/h8/gstreamer/general/detection/resources
I modified the file /local/workspace/tappas/apps/h8/gstreamer/general/detection.sh script to support yolox.
I did the following changes:

  1. Changed line 14 to: readonly DEFAULT_NETWORK_NAME=“yolox”
  2. Changed line 17 to: readonly DEFAULT_HEF_PATH=“$RESOURCES_DIR/yolox_s_leaky.hef”

But executing the detection.sh produces the following error:

terminate called after throwing an instance of ‘std::invalid_argument’
what(): No tensor with name yolox_nms_postprocess
Aborted (core dumped)

What did I miss ?

There is some name hardcoding in our Tappas post-processing library that is causing the issue, even when you correctly set the function name to yolox.

To fix it, edit the file:
local/workspace/tappas/core/hailo/libs/postprocesses/detection/yolohailort.cpp and change line 62 to:

auto post = HailoNMSDecode(roi->get_tensor(“yolox_s_leaky/yolox_nms_postprocess”), common::coco_eighty);

The yolox_s_leaky/ is the part that was missing.

After editing, rebuild the postprocessing library by running:

and you should be good.

In the future if such an error happens, you can find out the last layer’s name by running the command “hailortcli parse-hef”.


hailortcli parse-hef yolox_s_leaky.hef
Architecture HEF was compiled for: HAILO8
Network group name: yolox_s_leaky, Multi Context - Number of contexts: 2
Network name: yolox_s_leaky/yolox_s_leaky
VStream infos:
Input yolox_s_leaky/input_layer1 UINT8, NHWC(640x640x3)
Output yolox_s_leaky/yolox_nms_postprocess FLOAT32, HAILO NMS(number of classes: 80, maximum bounding boxes per class: 100, maximum frame size: 160320)
Name: YOLOX-Post-Process
Score threshold: 0.200
IoU threshold: 0.65
Classes: 80
Cross classes: false
Max bboxes per class: 100
Image height: 640
Image width: 640