Skip to content

Commit

Permalink
添加 yolop tensorrt 使用说明
Browse files Browse the repository at this point in the history
  • Loading branch information
ausk committed Oct 25, 2022
1 parent bdc1826 commit fd116ff
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions toolkits/deploy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
YoloP TensorRT Usage(简要说明)
=====


## 1. 准备构建环境 | Prepare building environments

Make sure you have install `c++`(support c++11)、 `cmake``opencv`(4.x)、`cuda`(10.x)、`nvinfer`(7.x).

Now, zedcam is not necessary!

And we can also use opencv that built without cuda.

## 2. 编译 | build

Go to `YOLOP/toolkits/deploy`.

```
mkdir build
cd build
cmake ..
make
```

Now you can get `yolov5` and `libmyplugins.so`.
If you have Zed installed, you can get `yolop`.


## 3. 生成和测试 trt | Generate and test trt

Go to build dir (`YOLOP/toolkits/deploy/build`).

### 3.1 gen wts
```
python3 ../gen_wts.py
```

### 3.2 gen trt
```
./yolov5 -s yolop.wts yolop.trt s
```

### 3.3 test trt
```
mkdir ../results
./yolov5 -d yolop.trt ../../../inference/images/
```

It will output like as follow if successful! (`Jetson Xavier NX - Jetpack 4.4`)
```
1601ms
26ms
26ms
26ms
26ms
28ms
```

![](build/results/_3c0e7240-96e390d2.jpg)




Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fd116ff

Please sign in to comment.