Welcome to Jetson Orin NX Developer Kit repository
当製品の日本語版マニュアル資料は、こちらからご取得ください。
10.Model training conversion
Model training and conversion
After completing the tutorial content of the dataset annotation, we can use the mainboard to start training the model.
This tutorial only introduces the CLI model training and conversion. You can refer to the official website to modify the Python case yourself.
1. Model training
Use the CLI command to train the model directly: copy the yolo11n.pt file to the directory where the configuration file is located, and then open the terminal in the directory where the configuration file is located:
xxxxxxxxxxcd /home/jetson/ultralytics/ultralytics/data/yahboom_data/orange_data
xxxxxxxxxxyolo detect train data=orange.yaml model=yolo11n.pt epochs=100 imgsz=640 amp=False
data: the dataset configuration file
model: the pre-trained model file
epochs: the number of training epochs
imgsz: the specified input image size



Finally, the printed model-related files after training are stored in the runs/detect/train folder under the current directory.
Note: each time the training is run, the number after train in the path automatically increases by 1. Please record this path and use the new path of this model later.
2. Model conversion
The final model is generated under the runs folder: generally the best.pt file is chosen for use
xxxxxxxxxx/home/jetson/ultralytics/ultralytics/data/yahboom_data/orange_data/runs/detect/train/weights
Convert the PyTorch format model into TensorRT:
xxxxxxxxxxcd /home/jetson/ultralytics/ultralytics/data/yahboom_data/orange_data/runs/detect/train/weights
xxxxxxxxxxyolo export model=best.pt format=engine

