yuchuli 32ea896c67 change some code for deploy in orin. 10 月之前
..
python b08a1ae8de 修改读取图片的方式 1 年之前
yaml 246d03fd67 change code. 1 年之前
README.md 54c07eda80 车道线检测 1 年之前
cuda_utils.h 54c07eda80 车道线检测 1 年之前
gen_wts.py 54c07eda80 车道线检测 1 年之前
imageBuffer.h 806d27e714 add imageBuffe 1 年之前
laneATT_trt.pro 32ea896c67 change some code for deploy in orin. 10 月之前
laneatt.cc 54c07eda80 车道线检测 1 年之前
laneatt.hh 54c07eda80 车道线检测 1 年之前
laneatt_to_onnx.py 54c07eda80 车道线检测 1 年之前
logging.h 54c07eda80 车道线检测 1 年之前
main.cpp 2d69b8c4e9 adjust laneATT image input size 1 年之前
nms.cpp 54c07eda80 车道线检测 1 年之前
nms_kernel.cu 54c07eda80 车道线检测 1 年之前
para.hpp 54c07eda80 车道线检测 1 年之前
utils.h 54c07eda80 车道线检测 1 年之前
yololayer.cu 54c07eda80 车道线检测 1 年之前
yololayer.h 54c07eda80 车道线检测 1 年之前
yolop.cpp 246d03fd67 change code. 1 年之前
yolop.hpp 54c07eda80 车道线检测 1 年之前
yolop_model.cpp 54c07eda80 车道线检测 1 年之前
yolop_model.hpp 54c07eda80 车道线检测 1 年之前
yolop_trt.py 54c07eda80 车道线检测 1 年之前

README.md

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. Test in C++

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

4. Test in python3

Go to yolop.

Make sure you have install pycuda tensorrt; and modify image_dir to your image dir.

# usage: xxx <engine file> <plugin file> <image dir>

python3 yolop_trt.py  build/yolop.trt  build/libmyplugins.so /home/user/jetson/tmp/YOLOP/inference/images

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

usage: xxx <engine file> <plugin file> <image dir>
[WARN] preaprea you image_dir, such as: samples, or /home/user/jetson/tmp/YOLOP/inference/images
bingding:  data (3, 384, 640)
bingding:  det (6001, 1, 1)
bingding:  seg (1, 360, 640)
bingding:  lane (1, 360, 640)
batch size is 1
warm_up->(384, 640, 3), time->1070.87ms
input->['/home/user/jetson/tmp/YOLOP/inference/images/3c0e7240-96e390d2.jpg'], time->25.94ms, saving into output/
input->['/home/user/jetson/tmp/YOLOP/inference/images/adb4871d-4d063244.jpg'], time->25.34ms, saving into output/
input->['/home/user/jetson/tmp/YOLOP/inference/images/8e1c1ab0-a8b92173.jpg'], time->25.03ms, saving into output/
input->['/home/user/jetson/tmp/YOLOP/inference/images/7dd9ef45-f197db95.jpg'], time->25.45ms, saving into output/
input->['/home/user/jetson/tmp/YOLOP/inference/images/9aa94005-ff1d4c9a.jpg'], time->24.93ms, saving into output/
input->['/home/user/jetson/tmp/YOLOP/inference/images/0ace96c3-48481887.jpg'], time->25.33ms, saving into output/
done!

Notice : The results of c++ and python are not aligned for now!


@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},
}