Hi everyone,
I’m looking for guidance on the recommended production architecture for two continuous, simultaneous video streams on a single Hailo-8 PCIe device using HailoRT 4.x (C++ API + VStreams).
Setup
-
Chip: Hailo-8, single device over PCIe.
-
Model: semantic segmentation, SegFormer-based, around 30M parameters.
-
Compiled HEF: 3 contexts reported by DFC compilation.
-
Input resolution: 512x512 per frame.
-
Goal: run 2 independent camera streams continuously and in real time, both using the same model.
-
Deployment: headless embedded system, output goes to shared memory / downstream processing.
The single-stream version works well. Now I need to extend this to two simultaneous camera inputs, each inference running continuously with minimal latency.
Approaches I tried
1. HailoRT scheduler with two configured network groups
I load the same HEF twice as two separate ConfiguredNetworkGroup instances on a VDevice, and let the scheduler time-multiplex them.
auto vdevice = VDevice::create(params);
auto hef = Hef::create("model.hef");
auto ng1 = vdevice->configure(hef.value());
auto ng2 = vdevice->configure(hef.value());
auto vstreams1 = VStreamsBuilder::create_vstreams(*ng1[0], ...);
auto vstreams2 = VStreamsBuilder::create_vstreams(*ng2[0], ...);
This seems straightforward, but I’m not sure if it is the best long-term production path.
2. Multi-network single HEF
I compiled two copies of the same model into one HEF as two named networks. My assumption was that one ConfiguredNetworkGroup containing both networks might allow better utilization or even true parallelism.
auto hef = Hef::create("dual_model.hef");
auto ng = vdevice->configure(hef.value());
auto net_infos = ng[0]->get_network_infos();
auto vs_net1 = VStreamsBuilder::create_vstreams(*ng[0], {}, FORMAT_TYPE, net_infos[0].name);
auto vs_net2 = VStreamsBuilder::create_vstreams(*ng[0], {}, FORMAT_TYPE, net_infos[1].name);
auto activated = ng[0]->activate();
I’m not sure whether this actually gives me parallel execution, or just makes the runtime switch between contexts internally.
3. TAPPAS multi-stream pipeline
I also looked at TAPPAS/GStreamer multi-stream examples using a funnel into hailonet and then streamiddemux.
4. TAPPAS parallel networks
I also considered the pattern where two separate hailonet elements are fed with tee.
My questions
-
Feasibility: Can a 30M parameter / 3-context model realistically be duplicated on a single Hailo-8 for true parallelism, or is that likely beyond the device budget?
-
Scheduler vs multi-network HEF: For two continuous cameras using the same model, is the recommended path:
-
two configured network groups with scheduler time-multiplexing,
-
or a multi-network HEF,
-
or a GStreamer/TAPPAS multi-stream setup?
-
-
hailonetbehavior: Doeshailonetinternally use the same HailoRT scheduler /VDevicelogic as the C++ API, meaning the GStreamer path is mainly a convenience layer rather than a different execution model? -
Production recommendation: Given my constraints, which architecture would you recommend for production:
-
raw HailoRT C++ with VStreams,
-
TAPPAS/GStreamer,
-
or a different multi-stream pattern?
-
Current results with switched network groups
For reference, here’s what I’m currently getting with approach 1 (two configured network groups, scheduler time-multiplexed):
-I=====================================================================
-I- DUAL INFERENCE SUMMARY
-I=====================================================================
-I- Total wall-clock time: 5781 ms
-I- [inst0] Images: 34 Avg: 170 ms/image
-I- [inst1] Images: 34 Avg: 170 ms/image
-I- Combined throughput: 11.7627 frames/sec (68 total frames)
-I=====================================================================
Compared to single-stream inference, this is roughly a bit less than half the original frames/sec
If anyone has experience with dual camera inference on a single Hailo-8, especially with a segmentation model and multiple contexts, I’d really appreciate advice on the best architecture and whether there is a reference design I should follow.
Honestly, I’d love it if someone from Hailo itself could weigh in on this — official guidance on the “right” architecture for this kind of multi-context, multi-stream setup would save a lot of trial and error, and I suspect I’m not the only one hitting this question.
Thanks in advance!