Skip to content

Commit f00a798

Browse files
authored
fix(demo): revert #1786 and update trt doc (#1792)
1 parent 58c2dd0 commit f00a798

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

demo/TensorRT/cpp/README.md

+10
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,13 @@ or
4646
./yolox <path/to/your/engine_file> -i <path/to/image>
4747
```
4848

49+
NOTE: for `trtexec` users, modify `INPUT_BLOB_NAME` and `OUTPUT_BLOB_NAME` as the following code.
50+
```
51+
const char* INPUT_BLOB_NAME = "images";
52+
const char* OUTPUT_BLOB_NAME = "output";
53+
```
54+
55+
Here is the command to convert the small onnx model to tensorrt engine file:
56+
```
57+
trtexec --onnx=yolox_s.onnx --saveEngine=yolox_s.trt
58+
```

demo/TensorRT/cpp/yolox.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ using namespace nvinfer1;
3131
static const int INPUT_W = 640;
3232
static const int INPUT_H = 640;
3333
static const int NUM_CLASSES = 80;
34-
const char* INPUT_BLOB_NAME = "images";
35-
const char* OUTPUT_BLOB_NAME = "output";
34+
const char* INPUT_BLOB_NAME = "input_0";
35+
const char* OUTPUT_BLOB_NAME = "output_0";
3636
static Logger gLogger;
3737

3838
cv::Mat static_resize(cv::Mat& img) {

0 commit comments

Comments
 (0)