Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support yolov5 #190

Merged
merged 37 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
dev
  • Loading branch information
upvenly committed Aug 9, 2023
commit 8748e80b566f565b876d6e1cd24a4e48f0b5ea6f
5 changes: 2 additions & 3 deletions inference/benchmarks/yolov5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ find ./val -name "*JPEG" | wc -l
### 2. 模型与权重

* 模型实现
* pytorch:yolov5l-bs64.onnx
* pytorch:yolov5l-bs96.onnx
* 权重下载
* pytorch:https://model.baai.ac.cn/model-detail/100097
upvenly marked this conversation as resolved.
Show resolved Hide resolved

Expand Down Expand Up @@ -76,5 +76,4 @@ find ./val -name "*JPEG" | wc -l

| 推理工具 | precision | bs | e2e_time | p_val_whole | \*p_val_core | p_infer_whole | \*p_infer_core | acc | mem |
| ----------- | --------- | ---- | -------- | ----------- | ---------- | ------------- | ------------ | ----------- | ---------- |
| tensorrt | fp16 | 256 | 613.4 | 1358.9 | 4263.3 | 1391.4 | 11483.0 | 76.2/76.2 | 19.7/40.0 |
| tensorrt | fp32 | 256 | 474.4 | 1487.3 | 2653.2 | 1560.3 | 6091.6 | 76.2/76.2 | 28.86/40.0 |
| tensorrt | fp32 | 96 | 733.8 | / | / | 53.8 | 361.4 | 0.45 | 35.44/40.0 |
11 changes: 5 additions & 6 deletions inference/configs/yolov5/configurations.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
batch_size: 1
# 3*224*224(1 item in x)
input_size: 409600
batch_size: 128
upvenly marked this conversation as resolved.
Show resolved Hide resolved
fp16: False
flops: 5.45e10
compiler: tensorrt
num_workers: 8
log_freq: 30
repeat: 1
repeat: 5
# skip validation(will also skip create_model, export onnx). Assert exist_onnx_path != null
no_validation: True
# set a real onnx_path to use exist, or set it to anything but null to avoid export onnx manually(like torch-tensorrt)
exist_onnx_path: True
exist_onnx_path: /FlagPerf/inference/yolov5l-bs128.onnx
# set a exist path of engine file like resnet50.trt/resnet50.plan/resnet50.engine
exist_compiler_path: /workspace/inference/yolov5l-cor.engine
exist_compiler_path: null
3 changes: 1 addition & 2 deletions inference/configs/yolov5/parameters.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# contain case-specified parameters, like max_seq_length in BERT.
# There is no parameters for resnet50 case.
conf_thres: 0.05
iou_thres: 0.2
iou_thres: 0.2
max_det: 1000
number_boxes: 85
hidden_size: 25200