• Hardware Platform (Jetson / GPU) : NVIDIA Jetson AGX Orin
• DeepStream Version : 7.1
• JetPack Version (valid for Jetson only) : 6.1
• TensorRT Version : 8.6.2.3
• Issue Type( questions, new requirements, bugs) : question
Hello,
I have a custom RetinaNet model that I would like to run in my DeepStream pipeline.
Here is my current configuration file for nvinfer
element.
[property]
gpu-id=0
model-color-format=0 # 0=RGB, 1=BGR
onnx-file=my-model.onnx
model-engine-file=my-model.onnx_b1_gpu0_fp16.engine
labelfile-path=abels.txt
infer-dims=3;1920;1080
batch-size=1
maintain-aspect-ratio=1
# Network settings
network-mode=2 # FP16 mode
network-type=0
num-detected-classes=4
process-mode=1
gie-unique-id=1
# Memory and buffer settings
workspace-size=4096
maintain-aspect-ratio=1
network-input-order=0 # NCHW format
output-blob-names=class_logits;box_regression
# Performance settings
custom-network-config=1
After successful model conversion to TensorRT during the inference i get such an error:
0:00:01.522554237 1354965 0xaaab12279260 ERROR
nvinfer gstnvinfer.cpp:678:gst_nvinfer_logger:<dw-nvinfer> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::parseBoundingBox() <nvdsinfer_context_impl_output_parsing.cpp:60> [UID = 1]: Could not find output coverage layer for parsing objects
0:00:01.522622247 1354965 0xaaab12279260 ERROR
nvinfer gstnvinfer.cpp:678:gst_nvinfer_logger:<dw-nvinfer> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::fillDetectionOutput() <nvdsinfer_context_impl_output_parsing.cpp:736> [UID = 1]: Failed to parse bboxes
Segmentation fault (core dumped)
This is obviously an error with my bounding box parsing. When running polygraphy on my onnx model this is what I get:
Name: main_graph | ONNX Opset: 17
---- 1 Graph Input(s) ----
{input [dtype=float32, shape=('batch_size', 3, 1920, 1080)]}
---- 2 Graph Output(s) ----
{class_logits [dtype=float32, shape=('batch_size', 'Concatclass_logits_dim_1', 2)],
box_regression [dtype=float32, shape=('batch_size', 'Concatbox_regression_dim_1', 4)]}
---- 195 Initializer(s) ----
---- 626 Node(s) ---
Question
From what I have read, I have to create a custom parser bbox function and add parse-bbox-func-name
to configuration file, however i cannot find resources how to create this. In this article Deploying to DeepStream for RetinaNet - NVIDIA Docs the references mostly redirect to main DeepStream documentation where is nothing written for custom bbox function. Do I have to create such a custom function for bounding box parsing and I cannot use the default one, if so could I write it in Python or it has to be written in C in some specific location? Could You point me to the right resource where I may find it?