Skip to content

Commit 8a577d3

Browse files
committed
changed readme
1 parent e19a08f commit 8a577d3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ cd tensorRT_cpp
146146
make yolo -j32
147147
```
148148

149+
149150
## YoloX的支持
150151
- https://github.com/Megvii-BaseDetection/YOLOX
151152
- 你可以选择直接make run,会从镜像地址下载onnx并推理运行看到效果。不需要自行导出
@@ -190,6 +191,7 @@ model.head.decode_in_inference = True
190191
191192
3. 导出onnx模型
192193
```bash
194+
193195
# 下载模型,或许你需要翻墙
194196
# wget https://github.com/Megvii-BaseDetection/YOLOX/releases/download/0.1.1rc0/yolox_m.pth
195197
@@ -335,6 +337,7 @@ auto int8process = [](int current, int count, vector<string>& images, shared_ptr
335337
}
336338
};
337339
340+
338341
// 编译模型指定为INT8
339342
auto model_file = "yolov5m.int8.trtmodel";
340343
TRT::compile(
@@ -367,7 +370,7 @@ auto image = imread("demo.jpg");
367370
auto input = engine->input(0);
368371
auto output = engine->output(0);
369372
370-
// 把图像塞到input tensor中,这里是减去均值,除以标准差
373+
// 把图像塞到input tensor中,这里是减去均值,并除以标准差
371374
float mean[] = {0, 0, 0};
372375
float std[] = {1, 1, 1};
373376
input->set_norm_mat(i, image, mean, std);

0 commit comments

Comments
 (0)