Feng Wang
commited on
Commit
·
5dee035
1
Parent(s):
3dd0091
fix(demo): revert #1786 and update trt doc (#1792)
Browse files- demo/TensorRT/cpp/README.md +10 -0
- demo/TensorRT/cpp/yolox.cpp +2 -2
demo/TensorRT/cpp/README.md
CHANGED
@@ -46,3 +46,13 @@ or
|
|
46 |
./yolox <path/to/your/engine_file> -i <path/to/image>
|
47 |
```
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
./yolox <path/to/your/engine_file> -i <path/to/image>
|
47 |
```
|
48 |
|
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
CHANGED
@@ -31,8 +31,8 @@ using namespace nvinfer1;
|
|
31 |
static const int INPUT_W = 640;
|
32 |
static const int INPUT_H = 640;
|
33 |
static const int NUM_CLASSES = 80;
|
34 |
-
const char* INPUT_BLOB_NAME = "
|
35 |
-
const char* OUTPUT_BLOB_NAME = "
|
36 |
static Logger gLogger;
|
37 |
|
38 |
cv::Mat static_resize(cv::Mat& img) {
|
|
|
31 |
static const int INPUT_W = 640;
|
32 |
static const int INPUT_H = 640;
|
33 |
static const int NUM_CLASSES = 80;
|
34 |
+
const char* INPUT_BLOB_NAME = "input_0";
|
35 |
+
const char* OUTPUT_BLOB_NAME = "output_0";
|
36 |
static Logger gLogger;
|
37 |
|
38 |
cv::Mat static_resize(cv::Mat& img) {
|