Disable scaling in streammux

I am getting image data in batches. The streammux scales the frames to given resolution. I want to store frames in their original resolution. How can I disable this scaling of frames by streammux? I tried to change height and widht to 0, but it threw error saying - invalid height and width for streammux.

You can change streammux resolution in the config same as source resolution,

[streammux]
gpu-id=0
width=1920
height=1080
if your source is 1080p, then streammux set as width 1920 height 1080.

Hi amycao, I have two sources with different resolution each. one is 1920x1080 and other is 1280x720. Actually these resolution won’t be a problem, if I get correct results from Primary inference model. What I have seen is that the PGIE processes on original resolution, but the image that I save to disk is of scaled resolution. Hence when I draw the bounding boxes on the frame saved to disk, it doesn’t coincide with the objects. However resizing the frame written to disk to its original resolution and then drawing bounding boxes gave expected results- I could see boxes coinciding with objects. Hence saving frames to original resolution would solve the problem.

Glad to know.

I think I didn’t put it right. The solution you provided won’t work for multiple sources of different resolution. So how can I get original resolution of all frames in the buffer, even if they are of different resolutions?

In the current design, we do not support streammux output different resolution frame batch, it will scale to the resolution you set in the config, and nvinfer will also scale the input frame to model network resolution.