How to load Object Detection Custom data trained model in C++

Dear Experts,
I have trained my custom data in Jetson Nano. Jetson Nano generated the model and labels. Now i want to load the model and labels in my C++ function. If i am right, I am using

detectNet* net = detectNet::create(models/ssd-mobilenet.onnx,
models/labels.txt,0.7,input ,inputDims , output,numDetections,DEFAULT_MAX_BATCH_SIZE, TYPE_FASTEST, DEVICE_GPU,true);

To me, Unknown variables are input, inputDims, output and numDetections. How to set these variable to call create function in detectNet.

Thanks

Hi @jaganathan.comm, this is the correct C++ overload of detectNet::Create() to use to load your ONNX model:

https://github.com/dusty-nv/jetson-inference/blob/c7ca374dbaa1417fbdb5fe0836d5ae843d7365eb/c/detectNet.h#L260

So it would be like:

detectNet* net = detectNet::Create(NULL, "models/ssd-mobilenet.onnx", 0.0f, "models/labels.txt",
                                   DETECTNET_DEFAULT_CONFIDENCE_THRESHOLD, "input_0", "scores", "boxes");

Thanks. It works.

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