wang-xinyu / tensorrtx

Implementation of popular deep learning networks with TensorRT network definition API
MIT License
6.92k stars 1.77k forks source link

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

Closed goodworth1 closed 1 year ago

goodworth1 commented 2 years ago

Env

About this repo

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屏幕截图

wang-xinyu commented 2 years ago

Strange error: Unknown embeded device detected.

Can you try other device/platform?

XiantaoHu commented 2 years ago

请问你是转换为int8吗

StrongandSurvive commented 2 years ago

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

Taikonaut-llk commented 2 years ago

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

stale[bot] commented 1 year ago

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.

arielsolomon commented 1 year ago

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

wang-xinyu commented 1 year ago

@arielsolomon Did you try FP32 or FP16?

arielsolomon commented 1 year ago

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 commented 1 year ago

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

wang-xinyu commented 1 year ago

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

arielsolomon commented 1 year ago

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

wang-xinyu commented 1 year ago

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

arielsolomon commented 1 year ago

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: @.***>