Skip to content

Latest commit

 

History

History
47 lines (37 loc) · 1.28 KB

yolo11-export.md

File metadata and controls

47 lines (37 loc) · 1.28 KB

YOLO11 Export Instructions

  • The process is the same for YOLOv8 and other models managed by Ultralytics in their library.

Install YOLO11 following Ultralytics official documentation and export the model in different formats using the following commands:

Torchscript

yolo export model=best.pt format=torchscript

Note: best.pt corresponds to your trained YOLO11n/s/m/x model.

OnnxRuntime

yolo export model=best.pt format=onnx

OpenVINO

yolo export model=best.pt format=openvino

TensorFlow

yolo export model=best.pt format=saved_model

After running, check that SignatureDefs serving_default is not empty:

saved_model_cli show --dir <your_yolo11_saved_model> --all

TensorRT

yolo export model=best.pt format=engine

Alternatively, use trtexec:

trtexec --onnx=best.onnx --saveEngine=best.engine

Export with dynamic axis example:

trtexec --onnx=yourmodel.onnx --minShapes=images:1x3x640x640 --optShapes=images:1x3x640x640 --maxShapes=images:32x3x640x640 --saveEngine=yourmodel.engine --fp16

Note: When using TensorRT, ensure that the version installed under Ultralytics python environment matches the C++ version you plan to use for inference.