Ubuntu 18.04
TensorRT 7.1.0
CUDA 10.2
cuDNN 8.0.0
onnx 1.4.1
OpenCV 4.1.1
CMake 3.10.2
[net]
batch=1
subdivisions=8
width=416
height=416
...
[yolo]
mask = 0,1,2
anchors = ...
down_stride = 8
classes=80
infer_thresh = 0.25
num=9
jitter=.3
ignore_thresh = .7
truth_thresh = 1
scale_x_y = 1.2
iou_thresh=0.213
...
[yolo]
mask = 3,4,5
anchors = ...
down_stride = 16
infer_thresh = 0.25
classes=80
num=9
jitter=.3
ignore_thresh = .7
truth_thresh = 1
scale_x_y = 1.1
iou_thresh=0.213
...
[yolo]
mask = 6,7,8
anchors = ...
classes=80
down_stride = 32
infer_thresh = 0.25
num=9
jitter=.3
ignore_thresh = .7
truth_thresh = 1
random=1
scale_x_y = 1.05
iou_thresh=0.213
...
python3 tools/yolo_to_onnx.py --cfg model/yolov4.cfg --weights model/yolov4.weights --out model/yolov4.onnx
git clone https://github.com/hlld/tensorrt-yolov4.git
cd tensorrt-yolov4
mkdir build
cd build && cmake .. && make
cd ..
## YOLOv3
./buildEngine -i model/yolov3.onnx -o model/yolov3.engine -b 1 -m 0
./runDet -i model/yolov3.engine -p dog.jpg -v nuscenes_mini.mp4
### use web camera.
./videoDet -e model/yolov3.engine -c 1
## YOLOv4
./buildEngine -i model/yolov4.onnx -o model/yolov4.engine -b 1 -m 0
./runDet -i model/yolov4.engine -p dog.jpg -v nuscenes_mini.mp4
### use web camera.
./videoDet -e model/yolov4.engine -c 1