megvii-research / MOTRv2

[CVPR2023] MOTRv2: Bootstrapping End-to-End Multi-Object Tracking by Pretrained Object Detectors
Other
348 stars 44 forks source link

Question about tensorrt model #10

Open hahapt opened 1 year ago

hahapt commented 1 year ago

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

vaesl commented 1 year ago

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.

hahapt commented 1 year ago

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.

vaesl commented 1 year ago

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.

hahapt commented 1 year ago

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?

vaesl commented 1 year ago

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.

HassanAliAnsari commented 1 year ago

Were you able to convert it to tensorrt?

danjump commented 4 months ago

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?)