Skip to content

Commit b1d7d93

Browse files
committed
Add yolop tensorrt README.md
1 parent 2ace87e commit b1d7d93

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

toolkits/deploy/README.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
YoloP TensorRT Usage(简要说明)
2+
=====
3+
4+
5+
## 1. 准备构建环境 | Prepare building environments
6+
7+
Make sure you have install `c++`(support c++11)、 `cmake``opencv`(4.x)、`cuda`(10.x)、`nvinfer`(7.x).
8+
9+
Now, zedcam is not necessary!
10+
11+
And we can also use opencv that built without cuda.
12+
13+
## 2. 编译 | build
14+
15+
Go to `YOLOP/toolkits/deploy`.
16+
17+
```
18+
mkdir build
19+
cd build
20+
21+
cmake ..
22+
make
23+
```
24+
25+
Now you can get `yolov5` and `libmyplugins.so`.
26+
If you have Zed installed, you can get `yolop`.
27+
28+
29+
## 3. 生成和测试 trt | Generate and test trt
30+
31+
Go to build dir (`YOLOP/toolkits/deploy/build`).
32+
33+
### 3.1 gen wts
34+
```
35+
python3 ../gen_wts.py
36+
```
37+
38+
### 3.2 gen trt
39+
```
40+
./yolov5 -s yolop.wts yolop.trt s
41+
```
42+
43+
### 3.3 test trt
44+
```
45+
mkdir ../results
46+
./yolov5 -d yolop.trt ../../../inference/images/
47+
```
48+
49+
It will output like as follow if successful! (`Jetson Xavier NX - Jetpack 4.4`)
50+
```
51+
1601ms
52+
26ms
53+
26ms
54+
26ms
55+
26ms
56+
28ms
57+
```
58+
59+
![](build/results/_3c0e7240-96e390d2.jpg)
60+
61+
62+
63+

0 commit comments

Comments
 (0)