CASIA-IVA-Lab / FastSAM

Fast Segment Anything
GNU Affero General Public License v3.0
7.35k stars 687 forks source link

Hello, when exporting to tensorrt (engine), an error is reported: export running on CPU but must be on GPU. How to fix it? #54

Open orderer0001 opened 1 year ago

orderer0001 commented 1 year ago

Hello, when exporting to tensorrt (engine), an error is reported: export running on CPU but must be on GPU. How to fix it?

orderer0001 commented 1 year ago

I added the parameter device=0 according to the error message, and then the error message disappeared, but there was a new error message: export failure 0.0s: No module named 'tensorrt'

an-yongqi commented 1 year ago

Hey @orderer0001,

You can refer to FastSAM_Awesome_TensorRT provided by ChuRuaNh0. After our test, this link can complete the conversion of TensorRT model, feel free to communicate with us if you have any questions!

orderer0001 commented 1 year ago

Hello, can the trace also give an example of tensorrt deployment?

xiangw369 commented 10 months ago

Great work, thank you so much for your efforts. Can I share the code related to C++ inference tensorrt acceleration