Skip to content

Commit ff0fba3

Browse files
committed
Update demo
1 parent 585c2f1 commit ff0fba3

10 files changed

Lines changed: 31 additions & 17 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ width="180px" >
1919
[![Cuda](https://img.shields.io/badge/CUDA-11.3-%2376B900?logo=nvidia)](https://developer.nvidia.com/cuda-toolkit-archive)
2020
[![](https://img.shields.io/badge/TensorRT-8.6.0.12-%2376B900.svg?style=flat&logo=tensorrt)](https://developer.nvidia.com/nvidia-tensorrt-8x-download)
2121
[![](https://img.shields.io/badge/ubuntu-20.04-orange.svg?style=flat&logo=ubuntu)](https://releases.ubuntu.com/20.04/)
22+
2223
</div>
2324

2425
## 1.Introduction
@@ -112,9 +113,10 @@ cd bin
112113
> 1. The output of the model is required for post-processing is num_bboxes (imageHeight x imageWidth) x num_pred(num_cls + coordinates + confidence),while the output of YOLOv8 is num_pred x num_bboxes,which means the predicted values of the same box are not contiguous in memory.For convenience, the corresponding dimensions of the original pytorch output need to be transposed when exporting to ONNX model.
113114
> 2. The dynamic shape engine is convenient but sacrifices some inference speed compared with the static model of the same batchsize.Therefore, if you want to pursue faster inference speed, it is better to export the ONNX model of fixed batchsize, such as batchsize 32.
114115
116+
## 5.Results
117+
Bilibili Demo: [![](https://img.shields.io/badge/bilibili-blue.svg?logo=bilibili)](https://www.bilibili.com/video/BV1Th4y1d7z3/?spm_id_from=333.999.0.0&vd_source=bd091b2fb1789d450ff2736f81a6912a)
115118

116-
117-
## 5.Reference
119+
## 6.Reference
118120
[0].https://github.com/NVIDIA/TensorRT<br>
119121
[1].https://docs.nvidia.com/deeplearning/tensorrt/developer-guide/index.html#c_topics<br>
120122
[2].https://github.com/linghu8812/tensorrt_inference<br>

configs/rtdetr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ rtdetr:
44
type: "coco"
55
mode: "fp32"
66
dynamic: 1
7-
batchSize: 1
7+
batchSize: 8
88
imageWidth: 640
99
imageHeight: 640
1010
conf_thr: 0.5

configs/yolov5-seg.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ yolov5-seg:
44
type: "coco"
55
mode: "fp32"
66
dynamic: 1
7-
batchSize: 1
7+
batchSize: 8
88
imageWidth: 640
99
imageHeight: 640
1010
conf_thr: 0.25
1111
nms_thr: 0.45
1212
strides: [8, 16, 32]
1313
imgMean: [ 0, 0, 0 ]
14-
imgStd: [ 1, 1, 1 ]
14+
imgStd: [ 1, 1, 1 ]

configs/yolov5.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ yolov5:
44
type: "coco"
55
mode: "fp32"
66
dynamic: 1
7-
batchSize: 1
7+
batchSize: 8
88
imageWidth: 640
99
imageHeight: 640
1010
conf_thr: 0.25

configs/yolov6.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ yolov6:
44
type: "coco"
55
mode: "fp32"
66
dynamic: 1
7-
batchSize: 1
7+
batchSize: 8
88
imageWidth: 640
99
imageHeight: 640
1010
conf_thr: 0.25

configs/yolov7-p6.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ yolov7:
44
type: "coco"
55
mode: "fp32"
66
dynamic: 1
7-
batchSize: 1
7+
batchSize: 8
88
imageWidth: 1280
99
imageHeight: 1280
1010
conf_thr: 0.4

configs/yolov7.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ yolov7:
44
type: "coco"
55
mode: "fp32"
66
dynamic: 1
7-
batchSize: 1
7+
batchSize: 8
88
imageWidth: 640
99
imageHeight: 640
1010
conf_thr: 0.25

configs/yolov8-seg.yaml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
yolov8-seg:
2-
onnx_file: "../weights/yolov8/yolov8s-seg.onnx"
3-
engine_file: "../weights/yolov8/yolov8s-seg.trt"
2+
onnx_file: "../weights/yolov8/yolov8s1280-seg.onnx"
3+
engine_file: "../weights/yolov8/yolov8s1280-seg.trt"
44
type: "coco"
55
mode: "fp32"
66
dynamic: 1
7-
batchSize: 1
8-
imageWidth: 640
9-
imageHeight: 640
10-
conf_thr: 0.25
7+
batchSize: 8
8+
imageWidth: 1280
9+
imageHeight: 1280
10+
conf_thr: 0.45
1111
nms_thr: 0.45
1212
strides: [8, 16, 32]
1313
imgMean: [ 0, 0, 0 ]
1414
imgStd: [ 1, 1, 1 ]
15+
# onnx_file: "../weights/yolov8/yolov8s-seg.onnx"
16+
# engine_file: "../weights/yolov8/yolov8s-seg.trt"
17+
# type: "coco"
18+
# mode: "fp32"
19+
# dynamic: 1
20+
# batchSize: 8
21+
# imageWidth: 640
22+
# imageHeight: 640
23+
# conf_thr: 0.25
24+
# nms_thr: 0.45
25+
# strides: [8, 16, 32]
26+
# imgMean: [ 0, 0, 0 ]
27+
# imgStd: [ 1, 1, 1 ]

configs/yolov8.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ yolov8:
44
type: "coco"
55
mode: "fp32"
66
dynamic: 1
7-
batchSize: 1
7+
batchSize: 8
88
imageWidth: 640
99
imageHeight: 640
1010
conf_thr: 0.25

src/yolov8.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ std::vector<Segmentations> YOLOv8_seg::PostProcess(const std::vector<cv::Mat> &i
7979
ins.mask = mask;
8080
result.segs.emplace_back(ins);
8181
}
82-
// cuda_postprocess_destroy();
8382
vec_result.emplace_back(result);
8483
index++;
8584
}

0 commit comments

Comments
 (0)