Padding with fixed shape is decimating our accuracy. Is there anyway to dynamically change the input shape of the SGIE neural network?
Hey, can you share your setup with us?
For your question, do you mean change the input frame dimensions to be enqueued in the network?
Pgie( detector) -> Sgie (inference on detector results, on Pytorch the 2nd NN model adjusts shape according to BBOX ratio so that there is no wasted space via padding).
Similar problem as this post from 2020 Jul -> Can deepstream5.0 support dynamic input in second gie or what should I do to support dynamic input in second gie?
I think nvinfer(sgie) will resize the cropped object based on detector results, you can choose enable padding or not by setting maintain-aspect-ratio config, refer https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvinfer.html
Padding and or resizing is killing the accuracy, it would be great of the nvinfer(sgie) could change shape according to the BBOX aspect ratio like Pytorch models do during inference.
We had maintain-aspect-ratio config, does that meet your target?
I didn’t get, how to maitain the aspect ratio if there is no padding?
Pytorch models can dynamically reshape their NN model dims to fit the aspect ratio of the in coming image, so that there is no black space being inferred due to padding and so stretching of the image to fit a certain input aspect ratio. On DS, if padding is added, it wastes NN output resolution, causing inferred heatmap has stark black regions, which in turn confuses our parser.
Ok, got it, currently DS cannot support this feature.