• Hardware Platform (Jetson / GPU)
Orin AGX • DeepStream Version
6.0 • JetPack Version
5.0.2
Previously, we have converted ONNX files to TensorRT files for use in our solution.
Now we are attempting to use those models with the Nvidia’s inference plugin.
Attempt 1 (TRT):
Taking 1 mp4 video into a deepstream pipeline, I applied an .engine file and got complaints.
Error in NvDsInferContextImpl::parseBoundingBox() - Could not find output coverage layer for parsing object Error in NvDsInferContextImpl::fillDetectionOutput() - Failed to parse bboxes
Attempt 2 (ONNX):
Taking 1 mp4 video into a deepstream pipeline, I applied an .onnx file and got complaints. This version of the ONNX parser only supports TensorRT INetworkDefinitions with an explicit batch dimension. Please ensure the network was created using the EXPLICIT_BATCH NetworkDefinitionCreationFlag.
Any advice on how to proceed with either of these?
Would the custom output layer parser you mentioned be applied to the TRT output or the ONNX one? (ie would it help resolve Attempt 1 or Attempt 2 listed above?)
The ONNX model is OK. It is the postprocessing function in gst-nvinfer plugin does not match the model causes the problem. Please customize your own postprocessing.
There are three parts inside “gst-nvinfer" : preprocessing, inferenceing and postprocessing.
Inferencing is based on TensorRT, it can support ONNX, UFF, Caffe Model and Caffe Prototxt, …
Please read Gst-nvinfer — DeepStream 6.2 Release documentation and the source code in /opt/nvidia/deepstream/deepstream/sources/gst-plugins/gst-nvinfer, /opt/nvidia/deepstream/deepstream/sources/libs/nvdsinfer
Removed “force-implicit-batch-dim” and that seems to have helpeda bit.
Now the issue is:
Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32
Weights [name=Conv_214 + PWN(PWN(Sigmoid_215), Mul_216).weight] had the following issues when converted to FP16:
WARNING: [TRT]: - Subnormal FP16 values detected
Letting it run regardless of the warnings ended up throwing the same errors as the Attempt 1 (TRT) in my first post.
I will try and pursue some of the advice given on that.
ERROR: [TRT]: 3: Cannot find binding of given name: conv2d_bbox
0:19:49.046828174 74497 0xaaaaceb02c60 WARN nvinfer gstnvinfer.cpp:635:gst_nvinfer_logger:<nvinfer0> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::checkBackendParams() <nvdsinfer_context_impl.cpp:1868> [UID = 1]: Could not find output layer 'conv2d_bbox' in engine
ERROR: [TRT]: 3: Cannot find binding of given name: conv2d_cov/Sigmoid
0:19:49.046896175 74497 0xaaaaceb02c60 WARN nvinfer gstnvinfer.cpp:635:gst_nvinfer_logger:<nvinfer0> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::checkBackendParams() <nvdsinfer_context_impl.cpp:1868> [UID = 1]: Could not find output layer 'conv2d_cov/Sigmoid' in engine
0:19:49.580717551 74497 0xaaaace9af000 ERROR nvinfer gstnvinfer.cpp:632:gst_nvinfer_logger:<nvinfer0> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::parseBoundingBox() <nvdsinfer_context_impl_output_parsing.cpp:59> [UID = 1]: Could not find output coverage layer for parsing objects
0:19:49.580947441 74497 0xaaaace9af000 ERROR nvinfer gstnvinfer.cpp:632:gst_nvinfer_logger:<nvinfer0> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::fillDetectionOutput() <nvdsinfer_context_impl_output_parsing.cpp:735> [UID = 1]: Failed to parse bboxes
According to the post from @alex247 , your ONNX model output layer name is “output” but not “conv2d_bbox”, and the model is not resnet like model. You need to custmize your own postprocessing instead of using the default postprocessin inside gst-nvinfer. Your gst-nvinfer configuration is wrong. I think I’ve talked about your wrong postprocessing in the previous post.
Since your yolov7 model is generated by yourselves, please make sure you know how to parsing and do clustering with your model’s output layer and customize your own postprocessing. Please consult the guy who provide the model to you.