Welcome to Jetson AGX Orin repository
当製品の日本語版マニュアル資料は、こちらからご取得ください。
08.Model Conversion
Model Conversion
Model Conversion1、jetson yolo26(Benchmark Test)2、Enable Maximum Board Performance2.1、Enable MAX Power Mode2.2、Enable Jetson Clocks3、Model Conversion3.1、CLI:pt → onnx → engine 3.2、Python:pt → onnx → engine4、Model PredictionCLI UsageReferences
1、jetson yolo26(Benchmark Test)
yolo26 benchmark test data source from Ultralytics team, testing various model formats (data for reference only).

According to the test parameters provided by the Ultralytics team for different format models, we can find that using TensorRT for inference provides the best performance!
Reference link:
https://docs.ultralytics.com/guides/nvidia-jetson
2、Enable Maximum Board Performance
2.1、Enable MAX Power Mode
Enabling MAX Power Mode on Jetson will ensure all CPU and GPU cores are enabled:
xxxxxxxxxxsudo nvpmodel -m 0
2.2、Enable Jetson Clocks
Enabling Jetson Clocks will ensure all CPU and GPU cores run at maximum frequency:
xxxxxxxxxxsudo jetson_clocks
3、Model Conversion
First-time use of yolo26 export mode will automatically install some dependencies, just wait for the automatic completion! Choose one of the two methods: CLI and Python.
3.1、CLI:pt → onnx → engine
Convert PyTorch format model to TensorRT: The conversion process will automatically generate ONNX model
xxxxxxxxxxcd /home/jetson/ultralytics/ultralytics
xxxxxxxxxxyolo export model=yolo26n.pt format=engine# yolo export model=yolo26n-seg.pt format=engine# yolo export model=yolo26n-pose.pt format=engine# yolo export model=yolo26n-cls.pt format=engine# yolo export model=yolo26n-obb.pt format=engine

3.2、Python:pt → onnx → engine
Convert PyTorch format model to TensorRT: The conversion process will automatically generate ONNX model
xxxxxxxxxxcd /home/jetson/ultralytics/ultralytics/yahboom_yolo26
xxxxxxxxxxpython3 model_pt_onnx_engine.py
xfrom ultralytics import YOLO# Load a yolo26n PyTorch model# model = YOLO("/home/jetson/ultralytics/ultralytics/yolo26n.pt")model = YOLO("/home/jetson/ultralytics/ultralytics/yolo26n-seg.pt")# model = YOLO("/home/jetson/ultralytics/ultralytics/yolo26n-pose.pt")# model = YOLO("/home/jetson/ultralytics/ultralytics/yolo26n-cls.pt")# model = YOLO("/home/jetson/ultralytics/ultralytics/yolo26n-obb.pt")# Export the model to TensorRTmodel.export(format="engine")
Note: The converted model files are located in the converted model file location

4、Model Prediction
CLI Usage
CLI currently only supports calling USB cameras.
xxxxxxxxxxcd /home/jetson/ultralytics/ultralytics