Hi,
I’m trying to set up a pipeline using hailonet in gstreamer and wanting to read the results. I can confirm the card / model / videos work fine as I can use the python sample object-detection to produce a video with objects highlighted as expected.
However, if I try and do the same thing using gstreamer & c++, I’m not able to get any metadata/tensors from the hailo_filter.cpp code (taken from tappas library).
Here’s what I am doing:
- Setting up a gstreamer pipeline and inserting the hailo_filter as below:
pipeline = gst_parse_launch("filesrc location=D:/test/video.mp4 ! \ decodebin ! \ videoscale qos=false n-threads=2 ! \ videoconvert qos=false n-threads=2 ! \ hailonet name=hailonet hef-path=D:/models/yolov8n.hef is-active=true batch-size=1 nms-score-threshold=0.3 nms-iou-threshold=0.45 output-format-type=3 ! \ autovideosink name=autoSink sync=false", NULL); GstElement* hailonet = gst_bin_get_by_name(GST_BIN(pipeline), "hailonet"); GstElement* hailoFilter = (GstElement*)g_object_new(GST_TYPE_HAILO_FILTER, NULL); GstElement* autoSink = gst_bin_get_by_name(GST_BIN(pipeline), "autoSink"); gst_bin_add(GST_BIN(pipeline), hailoFilter); gst_element_unlink(hailonet, autoSink); gst_element_link(hailonet, hailoFilter); gst_element_link(hailoFilter, autoSink); gst_element_sync_state_with_parent(hailoFilter);
-
The pipeline runs and I can see debug information showing that the hailo_filter’s gst_hailofilter_transform_ip function is being called as expected. The gsthailofilter.cpp class and it’s dependencies have been copied straight from the tappas repository - with the only modification to remove the call to the .so file. (I’m running on Windows 11 and using VS - otherwise I’d supply the .so as designed.)
-
Everything compiles & runs ok - however there are no objects detected. The same video with the same .hef file detects heaps using python.
-
If I add debug to the “get_tensors_from_meta(buffer, hailo_roi)” function - then I can see that “gst_buffer_get_meta(pmeta->buffer, g_type_from_name(TENSOR_META_API_NAME)” is returning false.
It does contain data though - the tensor name is “yolov8n/yolov8_nms_postprocess”. -
If I add debug to the “get_hailo_main_roi(buffer, true)” function - then I can see that gst_buffer_get_hailo_meta(buffer) returns NULL.
-
Hailort.log is below:
[2025-10-22 18:09:34.955] [9828] [HailoRT] [info] [vdevice.cpp:536] [hailort::VDevice::create] Creating vdevice with params: device_count: 1, scheduling_algorithm: ROUND_ROBIN, multi_process_service: false
[2025-10-22 18:09:34.957] [9828] [HailoRT] [info] [control.cpp:117] [hailort::control__parse_identify_results] firmware_version is: 4.22.0
[2025-10-22 18:09:34.957] [9828] [HailoRT] [info] [vdevice.cpp:682] [hailort::VDeviceBase::create] VDevice Infos: 0000:02:00.0
[2025-10-22 18:09:34.966] [9828] [HailoRT] [info] [hef.cpp:1995] [hailort::Hef::Impl::get_network_group_and_network_name] No name was given. Addressing all networks of default network_group: yolov8n
[2025-10-22 18:09:34.966] [9828] [HailoRT] [info] [hef.cpp:1995] [hailort::Hef::Impl::get_network_group_and_network_name] No name was given. Addressing all networks of default network_group: yolov8n
[2025-10-22 18:09:35.154] [4528] [HailoRT] [warning] [device_internal.cpp:800] [hailort::DeviceBase::check_clock_rate_for_hailo8] HEF was compiled assuming clock rate of 400 MHz, while the device clock rate is 200 MHz. FPS calculations might not be accurate.
[2025-10-22 18:09:35.156] [4528] [HailoRT] [warning] [device_internal.cpp:800] [hailort::DeviceBase::check_clock_rate_for_hailo8] HEF was compiled assuming clock rate of 400 MHz, while the device clock rate is 200 MHz. FPS calculations might not be accurate.
[2025-10-22 18:09:35.175] [4528] [HailoRT] [info] [internal_buffer_manager.cpp:75] [hailort::InternalBufferManager::print_execution_results] Default Internal buffer planner failed to meet requirements
[2025-10-22 18:09:35.175] [4528] [HailoRT] [info] [internal_buffer_manager.cpp:86] [hailort::InternalBufferManager::print_execution_results] Default Internal buffer planner executed successfully
[2025-10-22 18:09:35.192] [4528] [HailoRT] [info] [device_internal.cpp:57] [hailort::DeviceBase::configure] Configuring HEF took 36.3505 milliseconds
[2025-10-22 18:09:35.192] [4528] [HailoRT] [info] [vdevice.cpp:780] [hailort::VDeviceBase::configure] Configuring HEF on VDevice took 37.7274 milliseconds
[2025-10-22 18:09:35.192] [4528] [HailoRT] [info] [infer_model.cpp:419] [hailort::InferModelBase::configure] Configuring network group ‘yolov8n’ with params: batch size: 1, power mode: PERFORMANCE, latency: NONE
[2025-10-22 18:09:35.192] [4528] [HailoRT] [info] [multi_io_elements.cpp:754] [hailort::AsyncHwElement::create] Created (AsyncHwEl)
[2025-10-22 18:09:35.193] [4528] [HailoRT] [info] [queue_elements.cpp:450] [hailort::AsyncPushQueueElement::create] Created (EntryPushQEl0yolov8n/input_layer1 | timeout: 10s)
[2025-10-22 18:09:35.193] [4528] [HailoRT] [info] [filter_elements.cpp:101] [hailort::PreInferElement::create] Created (PreInferEl3yolov8n/input_layer1 | Reorder - src_order: RGB4, src_shape: (640, 640, 3), dst_order: NHCW, dst_shape: (640, 640, 3))
[2025-10-22 18:09:35.193] [4528] [HailoRT] [info] [queue_elements.cpp:450] [hailort::AsyncPushQueueElement::create] Created (PushQEl3yolov8n/input_layer1 | timeout: 10s)
[2025-10-22 18:09:35.193] [4528] [HailoRT] [info] [multi_io_elements.cpp:135] [hailort::NmsPostProcessMuxElement::create] Created (NmsPPMuxEl0YOLOV8-Post-Process | Op YOLOV8, Name: YOLOV8-Post-Process, Score threshold: 0.300, IoU threshold: 0.45, Classes: 80, Max bboxes per class: 100, Image height: 640, Image width: 640)
[2025-10-22 18:09:35.194] [4528] [HailoRT] [info] [queue_elements.cpp:942] [hailort::MultiPushQueue::create] Created (MultiPushQEl0YOLOV8-Post-Process | timeout: 10s)
[2025-10-22 18:09:35.194] [4528] [HailoRT] [info] [edge_elements.cpp:187] [hailort::LastAsyncElement::create] Created (LastAsyncEl0NmsPPMuxEl0YOLOV8-Post-Process)
[2025-10-22 18:09:35.194] [4528] [HailoRT] [info] [pipeline.cpp:891] [hailort::PipelineElement::print_deep_description] EntryPushQEl0yolov8n/input_layer1 | inputs: user | outputs: PreInferEl3yolov8n/input_layer1(running in thread_id: 5972)
[2025-10-22 18:09:35.194] [4528] [HailoRT] [info] [pipeline.cpp:891] [hailort::PipelineElement::print_deep_description] PreInferEl3yolov8n/input_layer1 | inputs: EntryPushQEl0yolov8n/input_layer1[0] | outputs: PushQEl3yolov8n/input_layer1
[2025-10-22 18:09:35.194] [4528] [HailoRT] [info] [pipeline.cpp:891] [hailort::PipelineElement::print_deep_description] PushQEl3yolov8n/input_layer1 | inputs: PreInferEl3yolov8n/input_layer1[0] | outputs: AsyncHwEl(running in thread_id: 7192)
[2025-10-22 18:09:35.194] [4528] [HailoRT] [info] [pipeline.cpp:891] [hailort::PipelineElement::print_deep_description] AsyncHwEl | inputs: PushQEl3yolov8n/input_layer1[0] | outputs: MultiPushQEl0YOLOV8-Post-Process MultiPushQEl0YOLOV8-Post-Process MultiPushQEl0YOLOV8-Post-Process MultiPushQEl0YOLOV8-Post-Process MultiPushQEl0YOLOV8-Post-Process MultiPushQEl0YOLOV8-Post-Process
[2025-10-22 18:09:35.194] [4528] [HailoRT] [info] [pipeline.cpp:891] [hailort::PipelineElement::print_deep_description] MultiPushQEl0YOLOV8-Post-Process | inputs: AsyncHwEl[0] AsyncHwEl[1] AsyncHwEl[2] AsyncHwEl[3] AsyncHwEl[4] AsyncHwEl[5] | outputs: NmsPPMuxEl0YOLOV8-Post-Process(running in thread_id: 5960)
[2025-10-22 18:09:35.194] [4528] [HailoRT] [info] [pipeline.cpp:891] [hailort::PipelineElement::print_deep_description] NmsPPMuxEl0YOLOV8-Post-Process | inputs: MultiPushQEl0YOLOV8-Post-Process[0] | outputs: LastAsyncEl0NmsPPMuxEl0YOLOV8-Post-Process
[2025-10-22 18:09:35.195] [4528] [HailoRT] [info] [pipeline.cpp:891] [hailort::PipelineElement::print_deep_description] LastAsyncEl0NmsPPMuxEl0YOLOV8-Post-Process | inputs: NmsPPMuxEl0YOLOV8-Post-Process[0] | outputs: user
[2025-10-22 18:09:35.205] [4528] [HailoRT] [info] [hef.cpp:1995] [hailort::Hef::Impl::get_network_group_and_network_name] No name was given. Addressing all networks of default network_group: yolov8n
So my questions are: Why is the hailonet element not providing the detections in the metadata? How can I debug this further?
Thanks!!