duan8/yolop
2022-10-26 15:18:08 +08:00
..
CMakeLists.txt Feature: add modified yolop tensorrt implementation (#1129) 2022-10-26 15:04:27 +08:00
common.hpp Feature: add modified yolop tensorrt implementation (#1129) 2022-10-26 15:04:27 +08:00
cuda_utils.h Feature: add modified yolop tensorrt implementation (#1129) 2022-10-26 15:04:27 +08:00
gen_wts.py Feature: add modified yolop tensorrt implementation (#1129) 2022-10-26 15:04:27 +08:00
logging.h Feature: add modified yolop tensorrt implementation (#1129) 2022-10-26 15:04:27 +08:00
README.md Update README.md 2022-10-26 15:18:08 +08:00
utils.h Feature: add modified yolop tensorrt implementation (#1129) 2022-10-26 15:04:27 +08:00
yololayer.cu Feature: add modified yolop tensorrt implementation (#1129) 2022-10-26 15:04:27 +08:00
yololayer.h Feature: add modified yolop tensorrt implementation (#1129) 2022-10-26 15:04:27 +08:00
yolop.cpp Feature: add modified yolop tensorrt implementation (#1129) 2022-10-26 15:04:27 +08:00
yolop.hpp Feature: add modified yolop tensorrt implementation (#1129) 2022-10-26 15:04:27 +08:00

YoloP

The original pytorch model is from hustvl/YOLOP

Authors

1. Prepare building environments

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

2. build yolop

Go to yolop.

mkdir build
cd build

cmake ..
make

Now you can get yolop and libmyplugins.so.

3. Generate and test trt

Go to yolop/build.

3.1 generate yolop.wts

Download/Clone YOLOP

Edit gen_wts.py , change YOLOP_BASE_DIR to realpath of YOLOP.

# [WARN] Please download/clone YOLOP, then set YOLOP_BASE_DIR to the root of YOLOP
python3 ../gen_wts.py

3.2 generate yolop.trt

./yolop -s yolop.wts  yolop.trt

Now you have such files: libmyplugins.so yolop yolop.wts yolop.trt

3.3 test yolop.trt

mkdir ../results

YOLOP_BASE_DIR=/home/user/jetson/tmp/YOLOP
./yolop -d yolop.trt  $YOLOP_BASE_DIR/inference/images/

It will output like as follow if successful! ( test on Jetson Xavier NX - Jetpack 4.4)

1601ms # the fist time is slow
26ms   # then it is faster
29ms
27ms
29ms
29ms


@misc{2108.11250,
Author = {Dong Wu and Manwen Liao and Weitian Zhang and Xinggang Wang},
Title = {YOLOP: You Only Look Once for Panoptic Driving Perception},
Year = {2021},
Eprint = {arXiv:2108.11250},
}