Model conversion

Model conversion1. Model conversion1.1. CLI: pt → onnx2.2, Python: pt → onnx2. Model predictionCLI usageReferences

1. Model conversion

According to the test parameters of different formats provided by the Ultralytics team, we can find that the inference performance is best when using TensorRT!

1.1. CLI: pt → onnx

Convert the PyTorch format model to onnx and ncnn

image-20250317183755402

2.2, Python: pt → onnx

Convert pt model to onnx model:

Note: The converted model file is located in the converted model file location

image-20241231130524974

2. Model prediction

CLI usage

image-20241231141309294

References

https://docs.ultralytics.com/guides/nvidia-pi/

https://docs.ultralytics.com/integrations/tensorrt/