zylo117 / Yet-Another-EfficientDet-Pytorch

The pytorch re-implement of the official efficientdet with SOTA performance in real time and pretrained weights.
GNU Lesser General Public License v3.0
5.21k stars 1.27k forks source link

Did anyone have successfully converted to onnx or tensorrt? #454

Open angryhen opened 4 years ago

sainttelant commented 4 years ago

Not yet, even converted it to .pt file deployed in the c++ program, any ideas?

wxthss82 commented 4 years ago

Haven't converted to TensorRT.

romil611 commented 3 years ago

I was able to convert to onnx.

dav-ell commented 2 years ago

Upsample causing issues for me too, documenting here: https://github.com/NVIDIA/Torch-TensorRT/issues/961

kongyanye commented 2 years ago

I've successfully convert it to TensorRT version for inference. Kindly check it here: https://github.com/kongyanye/EfficientDet-TensorRT

romil611 commented 2 years ago

Also checkout https://github.com/NVIDIA/TensorRT/tree/main/samples/python/efficientdet

dav-ell commented 2 years ago

I've successfully convert it to TensorRT version for inference. Kindly check it here: https://github.com/kongyanye/EfficientDet-TensorRT

Amazing work! Thanks very much for sharing. I noticed, though, that you didn't include fold_constants=True in your export to ONNX -- I had to include that or else my conversion to TensorRT would fail. I also had to be running a version of TensorRT newer than 7.1.3. I'd also be curious to see what kind of performance boost you're getting and if you've tried it with Triton? Will leave an issue on your repo.

Also checkout https://github.com/NVIDIA/TensorRT/tree/main/samples/python/efficientdet

Yes, I've been aware of this one, but it's based on the TensorFlow version. It's not so important that EfficientDet itself is exported, but that a PyTorch version that I can make changes to is exported.


In a related note, does anyone know if TensorRT supports efficient separable convolutions? This model has tons of them, and it slightly slows down performance without a special optimization like they have in TensorFlow.