diff --git a/demo/TensorRT/cpp/README.md b/demo/TensorRT/cpp/README.md index 0158e7dac..e3dee80ce 100644 --- a/demo/TensorRT/cpp/README.md +++ b/demo/TensorRT/cpp/README.md @@ -46,3 +46,13 @@ or ./yolox -i ``` +NOTE: for `trtexec` users, modify `INPUT_BLOB_NAME` and `OUTPUT_BLOB_NAME` as the following code. +``` +const char* INPUT_BLOB_NAME = "images"; +const char* OUTPUT_BLOB_NAME = "output"; +``` + +Here is the command to convert the small onnx model to tensorrt engine file: +``` +trtexec --onnx=yolox_s.onnx --saveEngine=yolox_s.trt +``` diff --git a/demo/TensorRT/cpp/yolox.cpp b/demo/TensorRT/cpp/yolox.cpp index e5d1ce73c..ed423380e 100644 --- a/demo/TensorRT/cpp/yolox.cpp +++ b/demo/TensorRT/cpp/yolox.cpp @@ -31,8 +31,8 @@ using namespace nvinfer1; static const int INPUT_W = 640; static const int INPUT_H = 640; static const int NUM_CLASSES = 80; -const char* INPUT_BLOB_NAME = "images"; -const char* OUTPUT_BLOB_NAME = "output"; +const char* INPUT_BLOB_NAME = "input_0"; +const char* OUTPUT_BLOB_NAME = "output_0"; static Logger gLogger; cv::Mat static_resize(cv::Mat& img) {