You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I export the pt to onnx,then convert then onnx to tensorrt model, the use the tensorrt model to forward, all yolov5 and yolov6 is ok, but when yolov7 forward,
const int inputIndex = engine.getBindingIndex(INPUT_BLOB_NAME); //return -1
const int outputIndex = engine.getBindingIndex(OUTPUT_BLOB_NAME); //return -1
yolov5 is:
const char* INPUT_BLOB_NAME = "data";
const char* OUTPUT_BLOB_NAME = "prob";
yolov6 is:
const char* INPUT_BLOB_NAME = "image_arrays";
const char* OUTPUT_BLOB_NAME = "outputs";
yolov7 input is images and output is putput
const char* INPUT_BLOB_NAME = "images";
const char* OUTPUT_BLOB_NAME = "output";
yolov7, use the above, all is -1, as below:
IRuntime* runtime = createInferRuntime(gLogger);
assert(runtime != nullptr);
ICudaEngine* engine = runtime->deserializeCudaEngine(trtModelStream, size);
assert(engine != nullptr);
IExecutionContext* context = engine->createExecutionContext();
assert(context != nullptr);
delete[] trtModelStream;
const ICudaEngine& engine = context.getEngine();
const int inputIndex = engine.getBindingIndex(INPUT_BLOB_NAME); //return -1
const int outputIndex = engine.getBindingIndex(OUTPUT_BLOB_NAME); //return -1
The text was updated successfully, but these errors were encountered: