tensorrtx icon indicating copy to clipboard operation
tensorrtx copied to clipboard

yolov5.cpp:245: void APIToModel(unsigned int, nvinfer1::IHostMemory**, bool&, float&, float&, std::__cxx11::string&): Assertion `engine != nullptr' failed. 已放弃

Open goodworth1 opened this issue 2 years ago • 4 comments

Env

  • GPU, Xavier NX, .
  • OS, e.g. Ubuntu18.04,Jetpack 4.6.1
  • Cuda version 10.2.300
  • TensorRT version 8.2.1.8

About this repo

  • which model? yolov5, retinaface?
  • yolov5-5.0

Your problem

我用的是官方下载的yolov5-5.0,在生成引擎文件时出现问题,yolov5s.pt是从官方下载的,按照https://github.com/wang-xinyu/tensorrtx/tree/yolov5-v5.0/yolov5操作生成引擎文件在sudo ./yolov5 -s yolov5s.wts yolov5s.engine s遇到问题

2022-05-10 17-00-08屏幕截图

goodworth1 avatar May 10 '22 09:05 goodworth1

Strange error: Unknown embeded device detected.

Can you try other device/platform?

wang-xinyu avatar May 19 '22 06:05 wang-xinyu

请问你是转换为int8吗

XiantaoHu avatar Jun 24 '22 14:06 XiantaoHu

请问您解决这个问题了吗,我在Xavier NX 16G 版本(Ubuntu18.04,Jetpack 4.6.2,Cuda version 10.2.300,TensorRT version 8.2.1.8)也遇到了同样的问题

StrongandSurvive avatar Aug 11 '22 01:08 StrongandSurvive

also Xavier NX 16G .I also encountered this problem, it is very difficult, how can I solve it?

Taikonaut-llk avatar Aug 28 '22 13:08 Taikonaut-llk

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.

stale[bot] avatar Oct 27 '22 17:10 stale[bot]

Same problem with Jetson orin model quantization: void APIToModel(unsigned int, nvinfer1::IHostMemory**, bool&, float&, float&, std::string&): Assertion `engine != nullptr' failed

arielsolomon avatar Nov 27 '22 09:11 arielsolomon

@arielsolomon Did you try FP32 or FP16?

wang-xinyu avatar Nov 28 '22 02:11 wang-xinyu

No, will do I did try however with both your tutorial (meaning suggested yv5 version and yv5s model and data) and with my custom model and data. Both did not work It is an opportunity to thank your hard work!

On Mon, Nov 28, 2022 at 4:35 AM Wang Xinyu @.***> wrote:

@arielsolomon https://github.com/arielsolomon Did you try FP32 or FP16?

— Reply to this email directly, view it on GitHub https://github.com/wang-xinyu/tensorrtx/issues/998#issuecomment-1328450003, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALCFNJALDZTEEG5QO6QNXSLWKQK6DANCNFSM5VQ4NMHA . You are receiving this because you were mentioned.Message ID: @.***>

-- Dr. Ariel Solomon Mobile: 972-545-667301

arielsolomon avatar Nov 28 '22 05:11 arielsolomon

Sorry, wrong answer before, FP16 is the default so ofcourse I tried it and it was fine

On Mon, Nov 28, 2022 at 4:35 AM Wang Xinyu @.***> wrote:

@arielsolomon https://github.com/arielsolomon Did you try FP32 or FP16?

— Reply to this email directly, view it on GitHub https://github.com/wang-xinyu/tensorrtx/issues/998#issuecomment-1328450003, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALCFNJALDZTEEG5QO6QNXSLWKQK6DANCNFSM5VQ4NMHA . You are receiving this because you were mentioned.Message ID: @.***>

-- Dr. Ariel Solomon Mobile: 972-545-667301

arielsolomon avatar Nov 28 '22 12:11 arielsolomon

Okay, INT8 requires calibration, did you follow this https://github.com/wang-xinyu/tensorrtx/tree/master/yolov5#int8-quantization ?

wang-xinyu avatar Nov 29 '22 02:11 wang-xinyu

Step by step! Again both same as your tutorial (yolov5s model) and with my custom model and custom data

On Tue, Nov 29, 2022 at 4:26 AM Wang Xinyu @.***> wrote:

Okay, INT8 requires calibration, did you follow this https://github.com/wang-xinyu/tensorrtx/tree/master/yolov5#int8-quantization ?

— Reply to this email directly, view it on GitHub https://github.com/wang-xinyu/tensorrtx/issues/998#issuecomment-1329992706, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALCFNJGV473RMAAJLD6HUV3WKVSVXANCNFSM5VQ4NMHA . You are receiving this because you were mentioned.Message ID: @.***>

-- Dr. Ariel Solomon Mobile: 972-545-667301

arielsolomon avatar Nov 29 '22 06:11 arielsolomon

@arielsolomon Can you please open a new thread and paste all the details and logs?

wang-xinyu avatar Nov 30 '22 04:11 wang-xinyu

will do, thanks

בתאריך יום ד׳, 30 בנוב׳ 2022, 6:27, מאת Wang Xinyu ‏< @.***>:

@arielsolomon https://github.com/arielsolomon Can you please open a new thread and paste all the details and logs?

— Reply to this email directly, view it on GitHub https://github.com/wang-xinyu/tensorrtx/issues/998#issuecomment-1331629412, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALCFNJG5TQKINH3GUXXB5H3WK3JTBANCNFSM5VQ4NMHA . You are receiving this because you were mentioned.Message ID: @.***>

arielsolomon avatar Nov 30 '22 05:11 arielsolomon