Skip to content

mlbo/yolov4-tiny-tensorrt

 
 

Repository files navigation

yolov4-tiny-tensorrt

yolov4-tiny-tensorrt

This project is based on https://github.com/wang-xinyu/tensorrtx and https://github.com/WongKinYiu/PyTorch_YOLOv4

This project has been tested on tensorrt 7

Another branch "trt5" for tensorrt 4 & 5: https://github.com/tjuskyzhang/yolov4-tiny-tensorrt/tree/trt5

(1) Generate yolov4-tiny.wts from pytorch implementation

git clone https://github.com/WongKinYiu/PyTorch_YOLOv4.git

// download yolov4-tiny.pt and copy it into PyTorch_YOLOv4/weights

// 链接:https://pan.baidu.com/s/1lEXCyDJyjL9B0WR-MKzAeg

// 提取码:ml0o

git clone https://github.com/tjuskyzhang/yolov4-tiny-tensorrt.git

cd PyTorch_YOLOv4

cp ../yolov4-tiny-tensorrt/gen_wts.py .

python gen_wts.py weights/yolov4-tiny.pt

// a file 'yolov4-tiny.wts' will be generated

cp yolov4-tiny.wts ../yolov4-tiny-tensorrt

(2) Build and run

cd yolov4-tiny-tensorrt

mkdir build

cd build

cmake ..

make

./yolov4-tiny -s

// serialize the model and generate yolov4-tiny.engine

./yolov4-tiny -d ../samples

// deserialize and generate the detection results _dog.jpg

About

yolov4-tiny-tensorrt

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 80.2%
  • Cuda 16.4%
  • CMake 2.2%
  • Python 1.2%