Always use the Ultralytics pip package to export the model.
Export the model to ONNX using the following command:
yolo export model=best.pt format=onnx
Note: In this case, best.pt
is a trained RTDETR-L or RTDETR-X model.
Similar to the ONNX case, change format to torchscript:
yolo export model=best.pt format=torchscript
Same as explained for YOLOv8:
trtexec --onnx=yourmodel.onnx --saveEngine=yourmodel.engine
Or:
yolo export model=yourmodel.pt format=engine
For more information, visit: https://docs.ultralytics.com/models/rtdetr/