TLT different results

Hi we are working on a azure instance on T4 card, and a jetson nx.
We use TLT v3 to train, eval and make inference with our int8 mask rcnn model.
On T4 results seems perfect (CUDA 11.2 Tensor RT 7.2), with tlt-converter (one available for our jetpack version 4.5 CUDA 10.2 TensorRT 7.1.3) we convert to engine and we lost detections and precission.

Diferent versions may affect and cause this precission lost? How can we go further? Create a docker on t4 with version matched with jetson nx or Update jetson nx, with a new version of TRT (no GA available i think)

Thanks.

PD: Of course i read other threads in order to find a solution, but nothing seems work.

How did you get the perfect result in T4? Run tlt maskrcnn inference ?

How did you run inference in nx? With deepstream? If yes, can you share command, spec file and log?
And can you deploy etlt model with deepstream?

Yes perfect result was running
tlt maskrcnn inference
Inference on nx was done with tensorrt c++ API, following uff maskrcnn sample. We cannot use deepstream in this case.

Thanks for your time

Could you share the link?

Hi Thanks!

First of all i convert etlt with next command:
tlt-converter model.step-5000.etlt -k key -c calibration.cal -t int8 -e int8b1z.engine -m 1 -d 3,768,1280

calibration.cal (10.0 KB)
as you can see on calibration header its done for TensorRT 7201.

then i use result engine on c++ code

main.cpp (10.5 KB)

original code from maskrcnnuff was here, in my code i read jpg images with opencv instead PPM.

thanks!

Please refer to the preprocessing in deepstream_tao_apps/pgie_peopleSegNetv2_tlt_config.txt at release/tlt3.0 · NVIDIA-AI-IOT/deepstream_tao_apps · GitHub

Sorry but i don´t undestand your answer? Why? What you think its the problem? As i tell you i we dont use deepstream! Thanks

Please note that the preprocessing and postprocessing are different between TLT maskrcnn and your mentioned link here.

So, please modify the preprocessing according to the hint in deepstream_tlt_apps/pgie_peopleSegNetv2_tlt_config.txt at release/tlt3.0 · NVIDIA-AI-IOT/deepstream_tlt_apps · GitHub

net-scale-factor=0.017507
offsets=123.675;116.280;103.53
model-color-format=0

Similar to https://github.com/keras-team/keras-applications/blob/master/keras_applications/imagenet_utils.py#L47
if mode == ‘torch’:
x /= 255.
mean = [0.485, 0.456, 0.406]
std = [0.224, 0.224, 0.224]

Here are the preprocessing steps in TLT.
1. For a given image, keep its aspect ratio and rescale the image to make it the largest rectangle to be bounded by the rectangle specified by the target_size.
2. Pad the rescaled image such that the height and width of the image become the smallest multiple of the stride that is larger or equal to the desired output dimension.
3. As mentioned above, will scale pixels between 0 and 1 and then will normalize each channel

1 Like

Ok!

Thanks we found the problem, first of all we need to scale rgb values from 0-255 to 0-1, then as you suggest us, calculate the diference with mean and divide by std.

Thanks

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