How to change the multi_stream_detection_rtsp.sh from multiple stream in one network to one stream one network

The default application architecture is like:

What I expect:

What I have already done:

  1. Change the class name to customised class and compile it using install_hailo_gstreamer.sh
  2. Run multiple stream to one network inferencing and using hailozmq for catching up the data in json format.

If anyone has experience with this or knows how to approach it, I would greatly appreciate your guidance and advice. Thank you so much in advance for your time and help! :blush:

Hey @hari.gao ,

Thanks for reaching out!
Let me help you modify the architecture from multi-stream to single-stream per network.

The key changes needed are:

Instead of running multiple streams through one network, you’ll want to set up independent pipelines. You can do this by:

  1. Creating separate GStreamer pipelines for each stream with its own hailonnet element:
gst-launch-1.0 \
    rtspsrc location=rtsp://stream1_url ! decodebin ! videoconvert ! hailonnet model=network1.hef ! fakesink \
    rtspsrc location=rtsp://stream2_url ! decodebin ! videoconvert ! hailonnet model=network2.hef ! fakesink
  1. Setting up unique ZMQ endpoints for each stream to avoid conflicts:
hailonet ! hailozmq publish-endpoint=tcp://127.0.0.1:5555  # Stream 1
hailonet ! hailozmq publish-endpoint=tcp://127.0.0.1:5556  # Stream 2
  1. If needed, you can also run multiple script instances in parallel, each handling one stream and network.

Make sure to test each stream independently after the changes to verify everything’s working correctly. Let me know if you run into any issues or need more specific examples!

Hi omria,

If this is the case, what could we use multiple hailfilter aswell with the same .so file with the same function name? I know the default is filter function, and there is no default config file at all, all need creates new YoloParamsNMS.

Hi omria,

Also I just compile second post process code for this one, and wish to use the filter and net concurrently from 2 stream, and that would cause the out of bond problem, except I use different static label.cpp file for running that should be fine.