Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU)
- Nvidia Jetson Xavier AGX
• DeepStream Version
- 6.3
• JetPack Version (valid for Jetson only) - Version: 5.1.2-b104
• TensorRT Version - 8.5.2-1+cuda11.4
• Issue Type( questions, new requirements, bugs) - Bug, Question
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing) - Files and description provided in post
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
SGIE Classifier output inconsistent in deepstream app
Background
I have a classification model, ResNet34, that I am running as an SGIE on the crops output from the PGIE detection model.
I have a modified version of deepstream-test2
, where the changes are that it can ingest .mp4
videos and it prints out the classification results per frame.
deepstream-infer-tensor-meta-test
was referenced for the probe which is used to print out the SGIE outputs.
Model does not work without output-tensor-meta: 1
When using this classifier in the deepstream-test2
app I found that I need to set output-tensor-meta: 1
in order to get any output from the classifier.
When using the sample classifier model, I am able to see the output of the classifer in classifier_meta_list
, however classifier_meta_list
is not populated when using my model.
When I set output-tensor-meta: 1
, I am able to extract classes from the tensor meta.
I have also noticed, that when attempting to use my classifier as the PGIE, it does not output obj_meta_list
or frame_user_meta_list
Question 1: Why does my model not output results that can be accessed in the default manor?
I have uploaded my model. It is resnet34, which should be very similar to the sample resnet18. Why doe smy model not work as expected?
What options do I have to diagnose this?
The model does not output expected values.
The output of the model running in this pipeline is different than expected. A classification is successfully extracted for each object, and looking at the raw class probabilities from float probability = outputCoverageBuffer
the values look fine, but when comparing the output with the ground truth or pre-trt model, the outputs are very different.
The outputs of the pytorch model, onnx model and the ground truth all match pretty closely – within ~30%.
However, the output of the same model converted to a TRT engine and run in this deepstream app results in drastically different results.
I have also used TRTexec to directly run the TRT engine on the frames from the video, and this somehow results in different values than when running the model in the deepstream_test2 app.
Question 2: Why does my model output different values than expected?
Why does the model produce different values than expected once converted to a trt engine?
I also have a regression model that has the same architecture (resnet34) except for the last layer, and the results of this model are consistent across pytorch<->onnx<->deepstream. The conversion process for this model is the same as for the classifier, but the classifier is not functioning correctly.
Resources
I have attached in this zip modified-test2.zip (36.4 KB):
- The modified
deepstream-test2
app - The configs I am using for the the
deepstream-test2
app
And the onnx model is available here: Dropbox
And I run the app with GST_DEBUG=3 ./deepstream-test2-app modified/dstest2_config.yml