tensorrtx
tensorrtx copied to clipboard
YOLOV9 wts转换错误
Env
- GPU, e.g. RTX2080
- OS, e.g. Ubuntu20.04
- Cuda version
- TensorRT version 8.5.1
About this repo
- which branch/tag/commit are you using?
- which model? yolov5, retinaface?
Your problem
thon gen_wts.py -w yolov9-c.pt -o yolov9-c.wts Generating .wts for detect model Loading yolov9-c.pt YOLOv5 🚀 2024-3-4 Python-3.8.13 torch-1.8.1+cu111 CPU
Traceback (most recent call last):
File "gen_wts.py", line 35, in
试下预训练的yolov9-c.pt?
使用了官方下载的预训练权重yolov9-c.pt依然报上方的错误。
@WuxinrongY 看下呢
35行修改为: model['model'].float(),随后我提交修改。
还有42和50行是否是要同步更改?
Generating .wts for detect model Loading yolov9-c.pt YOLOv5 🚀 2024-3-4 Python-3.8.13 torch-1.8.1+cu111 CPU
Traceback (most recent call last):
File "gen_wts.py", line 39, in
修改为: model['model'],全部更改以后报错:Generating .wts for detect model Loading yolov9-c.pt YOLOv5 🚀 2024-3-4 Python-3.8.13 torch-1.8.1+cu111 CPU
Traceback (most recent call last):
File "gen_wts.py", line 39, in
不好意思,写错了:35行:model = model['model'].float()
其他位置不修改。
使用最新版本tensorrtx进行engine转换时出现错误,并没有生成engine文件3/21/2024-14:21:36] [E] [TRT] 1: Unexpected exception _Map_base::at [03/21/2024-14:21:36] [E] [TRT] 2: [builder.cpp::buildSerializedNetwork::751] Error Code 2: Internal Error (Assertion engine != nullptr failed. ) Build engine successfully! yolov9: /home/tfboys/ws_usharing_102/TrafficLight/tensorrtx-master/yolov9/demo.cpp:31: void serialize_engine(unsigned int, std::__cxx11::string&, std::__cxx11::string&, std::__cxx11::string&): Assertion `serialized_engine != nullptr' failed.
使用官方预训练模型也是同样的报错
@WuxinrongY yolov9是不是最近有更新? 最好能固定用一个他的分支
我测试中使用的是YOLOv9发布的0.1版本,你可以把错误发送到我的邮箱我看一下,[email protected]。
已发送,请查收
在int8模型中需要设置量化数据集路径,确认一下config.h中量化数据集路径设置是否正确,量化数据集需要设置为目录,末尾要加"/",如"./calib/"。
Ok了
WuxinrongY @.***>于2024年3月22日 周五下午4:10写道:
在int8模型中需要设置量化数据集路径,确认一下config.h中量化数据集路径设置是否正确,量化数据集需要设置为目录,末尾要加"/",如"./calib/"。
— Reply to this email directly, view it on GitHub https://github.com/wang-xinyu/tensorrtx/issues/1463#issuecomment-2014552324, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR6FIIEMXPBLZU4S45BXHYDYZPRPZAVCNFSM6AAAAABFARLKV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJUGU2TEMZSGQ . You are receiving this because you authored the thread.Message ID: @.***>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.