Skip to content

Commit

Permalink
fix(demo): revert #1786 and update trt doc (#1792)
Browse files Browse the repository at this point in the history
  • Loading branch information
FateScript authored Jul 30, 2024
1 parent 58c2dd0 commit f00a798
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions demo/TensorRT/cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,13 @@ or
./yolox <path/to/your/engine_file> -i <path/to/image>
```

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
```
4 changes: 2 additions & 2 deletions demo/TensorRT/cpp/yolox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f00a798

Please sign in to comment.