Input Resolution of default deepstream caffe model

I wish to know the input resolution of default detectnetv2 caffe model for nano which comes with deepstream and is consumed by the reference app. The config file has streammux properties stated as this -

width=1920
height=1080

And the streammux output is directly fed to the nvinfer plugin. So, is it safe to say that the default model has also been trained for 1920x1080 input size or some rescaling happens internal to nvinfer ?

Hi,

The size you shared is the streammux output size.

The resolution of Primary_Detector is 640x368.
There is a resizer within nvinfer to scale the image into the network input size.

Thanks.

So that essentially means, specifying streammux output size has not much to do with the actual inference and doesn’t have much affect on the whole deepstream pipeline ?

Also, how is this resizing happening internally ? Does the aspect ratio of the original input is preserved ?

Hi,

Please noticed that GStreamer is a component-based frameworks.
The width/height parameter is specified the output resolution of streammux, which is used by the streammux component only.
As a result, if the input have identical resolution, you can use the same size of input camera/video.

The resizer inside nvinfer is general resizer, doesn’t preserve aspect ratio.
Thanks.

Hi,

Sorry that there are some incorrect message in my previous comment.

You can check the resizer implementation directly in our Deepstream source:
/opt/nvidia/deepstream/deepstream-4.0/sources/libs/nvdsinfer/

For the aspect ratio, yes, it can be preserved.
Please check this document for the nvinfer property:
https://docs.nvidia.com/metropolis/deepstream/plugin-manual/index.html#page/DeepStream_Plugin_Manual%2Fdeepstream_plugin_details.02.01.html%23wwpID0E0QX0HA

The aspect ratio can be persevered with this configure:

maintain-aspect-ratio=1

Th