'batch-size' properties in nvstreammux *and* nvinfer?

I’m curious why both nvstreammux and nvinfer have ‘batch-size’ parameters. I can understand one or the other, but I wonder if I’m missing something, as I try to understand why one would want them in both places.

More specifically, does batching in nvstreammux even have any point?

Refs:

  1. https://docs.nvidia.com/metropolis/deepstream/plugin-manual/index.html#page/DeepStream_Plugin_Manual%2Fdeepstream_plugin_details.02.03.html%23wwpID0E0SS0HA
  2. https://docs.nvidia.com/metropolis/deepstream/plugin-manual/index.html#page/DeepStream_Plugin_Manual%2Fdeepstream_plugin_details.02.01.html%23wwpID0E0GX0HA

Hi,

GStreamer is a component based framework.
So you will want each component can be used independently.

Thanks.

Thank you for the reply, but that doesn’t resolve my uncertainty.

If nvinfer batches independently of whatever nvstreammux does, then what’s the point (or benefit) of using batching within nvstreammux?

I’m not trying to be difficult - I just want to make sure I properly understand any interplay between these settings, or maybe I’m missing something about how other elements are affected.

For instance, if I set batch-size=2 on nvstreammux, and then batch-size=4 on nvinfer, does nvinfer repackage the incoming frames into 4-frame-batches, for further downstream elements? Or, does it process in 4-frame-batches, but still output results in the same 2-frame batches as were provided at input?

Thanks, again.

Hi,
The following config file is a good example for the design:

source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt

There are three secondary-gie and you would like these to have ‘batch-size=16’ and then do inferring, making primary-gie(batch-size=4) have higher priority of accessing GPU.

For the case with only primary-gie, you can simply set the batch-size identical to streammux.