MOTRv2 icon indicating copy to clipboard operation
MOTRv2 copied to clipboard

Question about tensorrt model

Open hahapt opened this issue 2 years ago • 8 comments

Can MOTRv2 model be converted to tensorrt? Can you share the pth trained with MOT20?

hahapt avatar Dec 21 '22 09:12 hahapt

Yes, the MOTRv2 model can be converted to tensorrt. In our practice, it can run at 14ms with int8 bit. In the future, we may release the tensorrt version of it. As for the MOT20, we have not conducted the exps on this dataset.

vaesl avatar Dec 26 '22 07:12 vaesl

Yes, the MOTRv2 model can be converted to tensorrt. In our practice, it can run at 14ms with int8 bit. In the future, we may release the tensorrt version of it. As for the MOT20, we have not conducted the exps on this dataset.

Sorry, I mean the MOT17 mentioned in paper.

hahapt avatar Dec 26 '22 07:12 hahapt

Since the paper is still under review, I think it will also be released in the near future based on the submission result. Currently, we simply released the DanceTrack one.

vaesl avatar Dec 28 '22 07:12 vaesl

Since the paper is still under review, I think it will also be released in the near future based on the submission result. Currently, we simply released the DanceTrack one.

OK fine. So how to convert the MOTRv2 model to tensorrt? I try to convert it by first convert to onnx model, but I'm confused about the input dict. Can the MOTRv2 model be converted to tensorrt directly by trtexec?

hahapt avatar Dec 28 '22 07:12 hahapt

We first convert the MOTRv2 to onnx model and then convert the onnx to trt one. As for the input dict question, you may rethink the forward process and refer to https://github.com/talebolano/Tensorrt-Deformable-Detr. One more detail is that the DETR and QIM parts are converted to the trt models, respectively.

vaesl avatar Dec 28 '22 08:12 vaesl

Were you able to convert it to tensorrt?

HassanAliAnsari avatar Apr 24 '23 12:04 HassanAliAnsari

We first convert the MOTRv2 to onnx model and then convert the onnx to trt one. As for the input dict question, you may rethink the forward process and refer to https://github.com/talebolano/Tensorrt-Deformable-Detr. One more detail is that the DETR and QIM parts are converted to the trt models, respectively.

Can you give any more guidance of the process to convert MOTRv2 to onnx? Do you have any example code from this codebase (or how to adapt this model code to follow a process similar to the link you reference?)

danjump avatar Feb 23 '24 17:02 danjump