Welcome to Jetson Orin NANO Developer Kit repository
10.Model training conversion
Model Training and Conversion
After completing the dataset annotation tutorial, we can use the mainboard to start training the model.
This tutorial only covers model training and conversion with the CLI; you can refer to the official website to adapt the Python examples yourself
1. Model Training
Use the standalone YOLO26 CLI to train the model. The pretrained weights are already in the model directory, so there is no need to copy them into the dataset directory:
xxxxxxxxxxcd /home/jetson/ultralytics_yolo26/data/yahboom_data/orange_data/
xxxxxxxxxxyolo26 detect train data=orange.yaml model=yolo26n.pt epochs=100 imgsz=640
data: dataset configuration file
model: pretrained model file
epochs: number of training epochs
imgsz: specifies the input image size


2. Model Conversion
The final model is generated by default under the runs folder in the dataset directory; generally choose best.pt for use:
xxxxxxxxxx/home/jetson/ultralytics_yolo26/data/yahboom_data/orange_data/runs/detect/train/weights
If train already exists, Ultralytics will automatically generate train2, train3, and other directories. Go by the Results saved to entry in the current training log; do not blindly assume train2.
Convert the pt model into an engine model:
xxxxxxxxxxcd /home/jetson/ultralytics_yolo26/data/yahboom_data/orange_data/runs/detect/train/weights
xxxxxxxxxxyolo26 export model=best.pt format=engine
After a successful conversion, best.engine is located in the same directory as best.pt. A TensorRT Engine can only be used in a compatible TensorRT and device environment; it should be re-converted after a system or runtime upgrade.
