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

PaddleDetection的ppyoloe_seg算法的README.md缺乏 ONNX转换 + trtexec测试 #9289

Open
zjykzj opened this issue Jan 21, 2025 · 1 comment
Assignees

Comments

@zjykzj
Copy link

zjykzj commented Jan 21, 2025

文档链接&描述 Document Links & Description

在文档PP-YOLOE Instance segmentation中仅提供了该算法的训练记录,并没有相关的ONNX格式转换,以及trtexec测试,就像PP-YOLOE的实现

# 导出模型
python tools/export_model.py -c configs/ppyoloe/ppyoloe_plus_crn_s_80e_coco.yml -o weights=https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_s_80e_coco.pdparams exclude_nms=True trt=True

# 转化成ONNX格式
paddle2onnx --model_dir output_inference/ppyoloe_plus_crn_s_80e_coco --model_filename model.pdmodel --params_filename model.pdiparams --opset_version 12 --save_file ppyoloe_plus_crn_s_80e_coco.onnx

# 测试速度,半精度,batch_size=1
trtexec --onnx=./ppyoloe_plus_crn_s_80e_coco.onnx --saveEngine=./ppyoloe_s_bs1.engine --workspace=1024 --avgRuns=1000 --shapes=image:1x3x640x640,scale_factor:1x2 --fp16

# 测试速度,半精度,batch_size=32
trtexec --onnx=./ppyoloe_plus_crn_s_80e_coco.onnx --saveEngine=./ppyoloe_s_bs32.engine --workspace=1024 --avgRuns=1000 --shapes=image:32x3x640x640,scale_factor:32x2 --fp16

# 使用上边的脚本, 在T4 和 TensorRT 7.2的环境下,PPYOLOE-plus-s模型速度如下
# batch_size=1, 2.80ms, 357fps
# batch_size=32, 67.69ms, 472fps

是否可以补全这部分内容,ppyoloe_seg算法可以适用于大部分实时实例分割场景,非常感谢!!!

请提出你的建议 Please give your suggestion

No response

@Bobholamovic
Copy link
Member

你好,目前我们并不能保证所有模型都能够正常导出为ONNX格式并使用TensorRT推理。建议可以参考PP-YOLOE的文档,尝试对ppyoloe_seg模型进行导出和推理,如果遇到问题的话欢迎在这里交流~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants