Coder Social home page Coder Social logo

YOLOV9 wts转换错误 about tensorrtx HOT 16 OPEN

hu874 avatar hu874 commented on May 24, 2024
YOLOV9 wts转换错误

from tensorrtx.

Comments (16)

WuxinrongY avatar WuxinrongY commented on May 24, 2024 1

不好意思,写错了:35行:model = model['model'].float()

from tensorrtx.

wang-xinyu avatar wang-xinyu commented on May 24, 2024

试下预训练的yolov9-c.pt?

from tensorrtx.

hu874 avatar hu874 commented on May 24, 2024

使用了官方下载的预训练权重yolov9-c.pt依然报上方的错误。

from tensorrtx.

wang-xinyu avatar wang-xinyu commented on May 24, 2024

@WuxinrongY 看下呢

from tensorrtx.

WuxinrongY avatar WuxinrongY commented on May 24, 2024

35行修改为: model['model'].float(),随后我提交修改。

from tensorrtx.

hu874 avatar hu874 commented on May 24, 2024

还有42和50行是否是要同步更改?

from tensorrtx.

hu874 avatar hu874 commented on May 24, 2024

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
anchor_grid = model.model[-1].anchors * model.model[-1].stride[..., None, None]
AttributeError: 'dict' object has no attribute 'model'

from tensorrtx.

hu874 avatar hu874 commented on May 24, 2024

修改为: 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
anchor_grid = model['model'][-1].anchors * model.model[-1].stride[..., None, None]
TypeError: 'DetectionModel' object is not subscriptable

from tensorrtx.

WuxinrongY avatar WuxinrongY commented on May 24, 2024

其他位置不修改。

from tensorrtx.

hu874 avatar hu874 commented on May 24, 2024

使用最新版本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.

from tensorrtx.

hu874 avatar hu874 commented on May 24, 2024

使用官方预训练模型也是同样的报错

from tensorrtx.

wang-xinyu avatar wang-xinyu commented on May 24, 2024

@WuxinrongY yolov9是不是最近有更新? 最好能固定用一个他的分支

from tensorrtx.

WuxinrongY avatar WuxinrongY commented on May 24, 2024

我测试中使用的是YOLOv9发布的0.1版本,你可以把错误发送到我的邮箱我看一下,[email protected]

from tensorrtx.

hu874 avatar hu874 commented on May 24, 2024

已发送,请查收

from tensorrtx.

WuxinrongY avatar WuxinrongY commented on May 24, 2024

在int8模型中需要设置量化数据集路径,确认一下config.h中量化数据集路径设置是否正确,量化数据集需要设置为目录,末尾要加"/",如"./calib/"。

from tensorrtx.

hu874 avatar hu874 commented on May 24, 2024

from tensorrtx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.