Coder Social home page Coder Social logo

yolo8推理报错 about tensorrt-alpha HOT 7 OPEN

feiyull avatar feiyull commented on May 13, 2024
yolo8推理报错

from tensorrt-alpha.

Comments (7)

johQin avatar johQin commented on May 13, 2024 1

是的,我也遇到了相同的问题。不同的是我使用的是tensorrt8.6.1.6,没有使用8.4.不知道是否存在影响。
参考:
https://blog.csdn.net/qq_42190134/article/details/135365945

from tensorrt-alpha.

johQin avatar johQin commented on May 13, 2024

这个有得到解决吗?同样的问题

from tensorrt-alpha.

johQin avatar johQin commented on May 13, 2024

[E] [TRT] 3: [runtime.cpp::nvinfer1::Runtime::~Runtime::346] Error Code 3: API Usage Error (Parameter check failed at: runtime.cpp::nvinfer1::Runtime::~Runtime::346, condition: mEngineCounter.use_count() == 1. Destroying a runtime before destroying deserialized engines created by the runtime leads to undefined behavior.
),不知道为什么,出错了还能推理,但性能应该下降了

from tensorrt-alpha.

johQin avatar johQin commented on May 13, 2024

我有观察到,它在YOLOV8::init中报错了,Parameter check failed在网上有回答说,是因为trt和实际的模型结构不一致导致的,这个希望FeiYull能够解答一下

from tensorrt-alpha.

YiXuan-52 avatar YiXuan-52 commented on May 13, 2024

是的,我也遇到了相同的问题。不同的是我使用的是tensorrt8.6.1.6,没有使用8.4.不知道是否存在影响。

from tensorrt-alpha.

ZJDATY avatar ZJDATY commented on May 13, 2024

是的,我也遇到了相同的问题。不同的是我使用的是tensorrt8.6.1.6,没有使用8.4.不知道是否存在影响。
参考:
https://blog.csdn.net/qq_42190134/article/details/135365945

你好 ,我用的也是8.6 ,也是这个错误。我看了你说的顺序问题导致的报错,但是我看默认的顺序就是对的啊。请问应该如何修改代码

from tensorrt-alpha.

YiXuan-52 avatar YiXuan-52 commented on May 13, 2024

是的,我也遇到了相同的问题。不同的是我使用的是tensorrt8.6.1.6,没有使用8.4.不知道是否存在影响。
参考:
https://blog.csdn.net/qq_42190134/article/details/135365945

你好 ,我用的也是8.6 ,也是这个错误。我看了你说的顺序问题导致的报错,但是我看默认的顺序就是对的啊。请问应该如何修改代码

我的问题是因为在模型转换时出现的问题,如果使用Ultralytics yolo 命令进行转换的engine模型,会在模型头部加一大堆这个模型的信息,前4字节是这个信息的长度跳过去脚好了。大概就是下面这样的情况

with open(weights_path, 'rb') as f, trt.Runtime(logger) as runtime:
meta_len = int.from_bytes(f.read(4), byteorder='little') # read metadata length
metadata = json.loads(f.read(meta_len).decode('utf-8')) # read metadata
if 'description' not in metadata: # Ultralytics YOLOv8 engine
print(" trtexec YOLOv8 engine model")
f.seek(0)
else: # Trtexec yolov8 engine
print(" Ultralytics YOLOv8 engine model")
self.model = runtime.deserialize_cuda_engine(f.read()) # read engine

from tensorrt-alpha.

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.