lyuwenyu / RT-DETR

[CVPR 2024] Official RT-DETR (RTDETR paddle pytorch), Real-Time DEtection TRansformer, DETRs Beat YOLOs on Real-time Object Detection. 🔥 🔥 🔥
Apache License 2.0
2.31k stars 259 forks source link

Onnx slower than pytorch #201

Open wingvortex opened 7 months ago

wingvortex commented 7 months ago

Hi,

I tested an onnx model converted (by export_onnx.py) from a torch model (trained with config rtdetr_r50vd_6x). The onnx model is always much slower than the torch model, no matter the CPU, GPU, or batch process. Why does this happen?

lyuwenyu commented 7 months ago

It may relate to the ONNX inference engine, that is not as good as torch (e.g some op).