Preprocessing for Deepstream CarColor, CarMake and VehicleTypes

I’d like to run in Python the Secondary_CarColor, Secondary_CarColor, Secondary_VehicleTypes provided in the samples of the DeepStream container. What is the necessary preprocessing for the data?

I mean, I can understand the requirements in terms of input type and size. But, what about the input value (e.g. normalization)?


Hey please share your setup with us.
For your question, you can refer Gst-nvinfer — DeepStream DeepStream Version: 5.0 documentation

Well I simply have some images loaded as numpy array of a certain shape, RGB channel order, and uint8 Dtype (value between 0 and 255). Do I need to normalize the values in the array (e.g. dividing by 255)?

@bcao from the link, I read that the formula should be
y = net scale factor*(x-mean)
However it is not clear where to find the value for mean for net scale factor

The info should from the model itself, I mean if you trained the model, then you should know the mean value very well.

These models are provided by Nvidia in the DeepStream’s container samples folder. I am running them with Python.

The models can be found in the directory /deepstream-5.0/samples/models

Then you should know the mean value from the corresponding config file.

I attached the files of one of the models from the DeepStream container for your convenience. Where do I see the mean value? (8.2 MB)

There is a mean.ppm under samples/models/Secondary_CarColor/ ?
Can you share your setup as required?
I think you need to read Gst-nvinfer — DeepStream DeepStream Version: 5.0 documentation firstly to be more familiar with DS nvinfer.