hustvl / TopFormer

TopFormer: Token Pyramid Transformer for Mobile Semantic Segmentation, CVPR2022
Other
373 stars 42 forks source link

onnx to tensorrt #19

Closed ke-dev closed 2 years ago

ke-dev commented 2 years ago

Hi, I used this command to get tmp.onnx. python3 tools/pytorch2onnx.py \ ./local_configs/topformer/topformer_tiny_448x448_160k_2x8_ade20k.py \ --input-img ./imgs/999438_0_B_0007_7680-3840-11776-7936.jpg \ --shape 2048 2048 \ --checkpoint ./work_dirs/topformer_tiny_448x448_160k_2x8_ade20k/latest.pth

then I got an error below when I try to convert tmp.onnx to tensorrt assert is_tensorrt_plugin_loaded(), 'TensorRT plugin should be compiled.' AssertionError: TensorRT plugin should be compiled.

my environment configuration is cuda : 10.1 tensorrt:8.4.0.6 I also try cuda 11.3, but get the same error,have you tried switching to tensorrt? what is the difference between this and the operation of mmsegmentation docs? https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/useful_tools.md

look forward to your reply.