Complex-YOLOv4-Pytorch icon indicating copy to clipboard operation
Complex-YOLOv4-Pytorch copied to clipboard

TensorRT conversion

Open yangjin07 opened this issue 4 years ago • 5 comments

@maudzung Hi,Maudzung, nice work! I'm trying to use TensorRT to speed up the inference. Do you have some scripts that transfer the Complex-YOLOv4-Pytorch from pytorch(pth file) to TensorRT?

Thanks!

yangjin07 avatar Aug 24 '20 02:08 yangjin07

Hi @yangjin07 I didn't do it. Please contribute to the repo if you made it. Thank you so much!

maudzung avatar Aug 30 '20 09:08 maudzung

Hi, @maudzung I have tried to use the TRT to speed up the inference, but there is some trouble in the 'yolo_layer'. When I export ONNX model with yolo_layer, the 'x, y, w, l, im, re' in ONNX inference outputs are 0. When I export pytorch model to ONNX model, there are just some warnings, no errors. So I export the ONNX model without the 'yolo_layer', and add the yolo_layer in the post_process. That's work! This is my ONNX model without yolo_layer. image

PengfeiMa avatar Sep 09 '20 03:09 PengfeiMa

Hi @PengfeiMa That sounds good. Can you make a pull request to the repo? I'll check and merge your work into the repo. Thank you so much!

maudzung avatar Sep 09 '20 04:09 maudzung

@PengfeiMa Could you share some ideas about how to export onnx model without 'yolo layer' ? Thanks a lot.

YinRui1991 avatar May 10 '21 03:05 YinRui1991

Hi @PengfeiMa Can you share how to convert PTH to onnx without‘yolo layer’ ? Thank you so much!

MaxZJF avatar Oct 12 '21 05:10 MaxZJF