Hello,
I’ve retrained SSD-Mobilenet-V1 using train_ssd.py.
I have been able to run object detection using I believe the python interface from the command line.
Now I’d like to use the retrained model in C++.
However I am having trouble specifying the output layer blob for the detectnet::create() function call. Below, are the major portions of code for initializing the model. What is giving me trouble is the “const char*output” parameter where I’ve passed in the character array “scores”. I am using scores because this seems to be the output layer labeled. I used the onnx library to get the names of the output layers from the onnx file generated. This check returns the output layer names “scores” and “boxes”. I’ve tried both but no luck.
const Dims3 input_dims;
detectNet * net = detectNet::Create("ssd-mobilenet.onnx", "labels.txt", 0.5, "input_0", input_dims, "scores", "10")
During initialization, I get the following error:
“INVALID_ARGUMENT: Cannot find binding of given name: 10
Failed to find requested output layer 10 in network.”
As mentioned, I’ve been successfully able to run the model using Python. So I think the issue is with the output blob character array that I am passing to the initialization function.
Thank you.