Scale_factor and channel_offsets

• Hardware Platform (Jetson / GPU) NVIDIA GeForce RTX 3090
• DeepStream Version 6.3
• JetPack Version (valid for Jetson only)
• TensorRT Version 8.4.0
• NVIDIA GPU Driver Version (valid for GPU only) 535.113.01
• Issue Type(questions, new requirements, bugs) questions

Hello,

I am using nvinferserver in deepstream Python to infer a model which requires a preprocessing (in torch) like this:

T.Resize([256, 128]),
T.ToTensor(),
T.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])

I want to do the same thing in the config file. I found I have to calculate scale factor and channel offsets. How can I do this?!

If you are using PyTorch, the formula is here Normalize — Torchvision 0.16 documentation (pytorch.org)

Unfortunately, the gst-nvinfer scale factor is applied to all channels, you may implement per channel scale factors by yourself since gst-nvinfer is open source.

1 Like

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