About How padding works in Nvidia Deepstream

Please provide complete information as applicable to your setup.

**• Hardware Platform ------------------> GPU
**• DeepStream Version ----------------> 6.2
• TensorRT Version ------------------> 8.5
**• NVIDIA GPU Driver Version (valid for GPU only)----------------> 535

Hi, all
I want to understand how the padding works in deep-stream and what variable I need to add in Nvinfer config file.

  1. Is the padding working with detector ?
  2. Is the padding work with classifier ?
  3. “symmetric-padding” (for nvinfer config file ) is the flag to get padded image to classifier if require ?
  4. Any other parameter need to mention to enable or disable ?

1&2&3. please find symmetric-padding in nvinfer, padding can be used for all kinds of models.
3. please find “maintain-aspect-ratio” and “symmetric-padding” 's explanation in the link above.

Hi, @fanzh!

I am trying to use the “Symmetric-padding” in the config file, as mention in the document. But, I am unable to see the padding when I try to save the crops inside the folder.

I need to add padding and save the crops to a folder. What should I be doing, I can share my config file too.

nvidia_padding.txt (865 Bytes)

how did you save the crops ?

I save each frame’s detection using the obj meta’s rect parameters and use cv2.imwrite.

There is no update from you for a period, assuming this is not an issue any more. Hence we are closing this topic. If need further support, please open a new one. Thanks.
nvinfer plugin is opensource. please refer to dump_infer_input_to_file.patch.txt in DeepStream SDK FAQ - #9 by mchi, it will dump the input just before calling TRT inference. it includes padding.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.