What does hailonet do when an invalid batch-size is set (e.g., 20, outside the 0-16 range)?

Hi everyone,

I’m working on a GStreamer pipeline using the hailonet element for real-time inference on an RTSP stream with a Hailo AI accelerator. My pipeline is configured with a batch-size=20 in the hailonet element, but I receive a warning because the valid range for batch-size is 0-16, as shown in the gst-inspect-1.0 hailonet output (property: batch-size, type: Unsigned Integer, range: 0-16, default: 0).

The pipeline processes video frames at 4 FPS, using a circular buffer of 20 frames to compute inference scores for a custom model I developed. It includes components like rtspsrc, videorate (to enforce 4 FPS), and a custom callback for processing inference results. The warning occurs during pipeline creation with Gst.parse_launch.

My question is: What does the hailonet element do when an invalid batch-size (e.g., 20) is provided? Does it:

  • Use the maximum allowed value (16)?

  • Revert to the default value (0, which might imply automatic batch sizing)?

  • Discard frames?

  • Handle it in another way?

Any insights into how hailonet manages frame processing in this scenario would be greatly appreciated, especially regarding potential frame dropping or performance impacts. Has anyone encountered this issue or found documentation explaining this behavior?

Additional Context:

  • GStreamer version: 1.0

  • Plugin: libgsthailo.so (Hailo GStreamer plugin)

  • Hardware: Hailo AI accelerator

  • Model: Custom .hef file developed by me

  • Pipeline includes rtspsrc, videorate, and a custom callback for inference results

Thanks in advance for any help or pointers to relevant documentation!

Hey @Eliseo_Elorga,

You’re going to need to drop that batch size down from 20. The hailonet element has a hard cap at 16, and it’s pretty strict about it.

Basically, when you try to use a batch size of 20, a couple things can happen. First, GStreamer will validate the property you’re setting, and if it’s too high, it’ll reject it right at that stage. If it somehow gets past that initial check, the system will try to configure the network group and fail with an error telling you the batch size is too large.

The important thing to know is that the element won’t automatically cap it at 16, fall back to the default, or quietly drop frames. It will just fail and prevent your pipeline from starting.

So set it to 16 or lower and you should be good!

1 Like

Thank you for the reply Omria!