Jetson Nano TensorRT加速Yolov5

1、笔记本电脑生成wts文件

git clone -b v7.0 https://github.com/ultralytics/yolov5.git
git clone -b yolov5-v7.0 https://github.com/wang-xinyu/tensorrtx.git
cd yolov5/
wget https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5s.pt
cp ~/tensorrtx/yolov5/gen_wts.py ./
python gen_wts.py -w yolov5s.pt -o yolov5s.wts

2、Nano平台运行

cd ~/tensorrtx/yolov5/
mkdir build
cd build
cp ~/yolov5s.wts . 
cmake ..
make

3、Jetson Nano 内运行

cd ~/tensorrtx/yolov5/build
./yolov5_det -s yolov5s.wts yolov5s.engine s
./yolov5_det -d yolov5s.engine ../images

你可能感兴趣的:(YOLO,jetson,nano,tensorrt)