yolov10 icon indicating copy to clipboard operation
yolov10 copied to clipboard

Exporting tensorRT models is not supported

Open Haroldhy opened this issue 1 year ago • 3 comments

I use “yolo export model=yolov10n/s/m/b/l/x.pt format=onnx opset=13 simplify” to export onnx model. The exported model contains the fmod(Mod) operator, which is an operator supported by onnx but not by tensorRT, so when exporting the onnx model to a tensorRT model it will report an error. My target version of TensorRT is 8.4.1.

Haroldhy avatar May 30 '24 06:05 Haroldhy

Thanks for your interest! Does this issue #75 help?

jameslahm avatar May 30 '24 06:05 jameslahm

Thanks for your answer. The issue indicates that if I don't use the new version of tensorRT, I will need to remove the mod operator from the onnx model, then I will get a model with three outputs. 1x300x4, 1x300x1 and the output of the 1x300 shape that needs to be processed. Then just need to do a mod on the last output right?

Haroldhy avatar May 30 '24 07:05 Haroldhy

Yes, we think so.

jameslahm avatar May 30 '24 07:05 jameslahm

Please feel free to reopen this issue if you have further questions.

jameslahm avatar Jun 01 '24 02:06 jameslahm

If you're curious about the code to do this, I have a script called v10_fixer.py here that does this

jasonlytehouse avatar Jun 23 '24 06:06 jasonlytehouse