ONNX model with Jetson-Inference using GPU

…and yet another step ahead:

I figured out that the parameter output-blob-names would probably have to be output-blob-names=boxes. Then just the problem with the “Failed to parse bboxes” remains, which probably really needs that custom parser…

EDIT: Maybe a better fit would be

output-blob-names=boxes;scores

EDIT 2: Not sure, if I now have moved forward or back again. I found a bbox parser in /opt/nvidia/deepstream/deepstream-5.1/sources/objectDetector_SSD/nvdsinfer_custom_impl_ssd and patched that a bit (namely the CUDA version in the Makefile and the number of classes in nvdsparsebbox_ssd.cpp. I built it, copied the lib to my working directory and adapted the config. But I’m still having the “Failed to parse bbox crash”.

My current config (the lib is loaded, I’m pretty sure):

[property]
workspace-size=800
gpu-id=0
model-color-format=0
net-scale-factor=0.003921569790691137
onnx-file=/home/ubuntu/dragonfly-safety/jetson-inference/models/primary-detector-nano/ssd-mobilenet.onnx
labelfile-path=/home/ubuntu/dragonfly-safety/jetson-inference/models/primary-detector-nano/labels_onnx.txt
model-engine-file=/home/ubuntu/dragonfly-safety/jetson-inference/models/primary-detector-nano/ssd-mobilenet.onnx_b1_gpu0_fp16.engine
batch-size=1
network-mode=2
num-detected-classes=10
maintain-aspect-ratio=1
gie-unique-id=1
is-classifier=0
output-blob-names=boxes;scores
parse-bbox-func-name=NvDsInferParseCustomSSD
custom-lib-path=/home/ubuntu/dragonfly-safety/jetson-inference/models/primary-detector-nano/libnvdsinfer_custom_impl_ssd.so

There is still a mile to go :)

EDIT 3: The error is btw: “Could not find NMS layer buffer while parsing” and it comes from the lib… Whatever this means

EDIT 4: OK, now I’m stuck. Following this thread Onnx model on deepstream5.0: Nvinfer error: Could not find NMS layer buffer while parsing - #4 by haneesh24199 I changed the two appearances of NMS to boxes and scores and now the whole thing crashes with segfault w/o further notice… :(

BTW: I also fixed the wrong number of “num-detected-classes” to 9 meanwhile…

EDIT 5: Solution for EDIT 4: Onnx model on deepstream5.0: Nvinfer error: Could not find NMS layer buffer while parsing - #13 by foreverneilyoung