Replies: 6 comments
-
你的onnx模型是怎么导出的呢? |
Beta Was this translation helpful? Give feedback.
-
参考 https://github.com/Linaom1214/tensorrt-python/issues/12#issuecomment-1211769328 |
Beta Was this translation helpful? Give feedback.
-
对的呀,我用官方的export转的onnx,用你的export转的trt。模型是我自己训练的,不知道是模型的问题还是我推理环境的问题 |
Beta Was this translation helpful? Give feedback.
-
官方的那个教程有点问题, 我猜测你是使用了 端到端模型 建议更新代码, 使用我今天更新的版本重新生成 |
Beta Was this translation helpful? Give feedback.
-
python python3 trt.py C++也有问题 |
Beta Was this translation helpful? Give feedback.
-
大家先读一下文档! cd yolov7 if you use the end2end model please modift the code as such origin_img = pred.inference(img_path, conf=0.5, end2end=True) |
Beta Was this translation helpful? Give feedback.
-
(yolo) D:\hskj\code\tensorrt-python-main\yolov7>python trt.py
[08/11/2022-17:42:29] [TRT] [E] 1: [pluginV2Runner.cpp::nvinfer1::rt::load::293] Error Code 1: Serialization (Serialization assertion creator failed.Cannot deserialize plugin since corresponding IPluginCreator not found in Plugin Registry)
[08/11/2022-17:42:29] [TRT] [E] 4: [runtime.cpp::nvinfer1::Runtime::deserializeCudaEngine::50] Error Code 4: Internal Error (Engine deserialization failed.)
Traceback (most recent call last):
File "trt.py", line 21, in
pred = Predictor(engine_path='D:/hskj/code/tensorrt-python-main/v7_last.engine')
File "trt.py", line 13, in init
super(Predictor, self).init(engine_path)
File "D:\hskj\code\tensorrt-python-main\yolov7..\utils\utils.py", line 22, in init
self.context = engine.create_execution_context()
AttributeError: 'NoneType' object has no attribute '
请问这个是我模型转换的不对么?
Beta Was this translation helpful? Give feedback.
All reactions