Welcome to Jetson AGX Orin repository
当製品の日本語版マニュアル資料は、こちらからご取得ください。
10.Model Training_Conversion
Model Training_Conversion
After completing the dataset annotation tutorial content, we can use the board to start training the model.
This tutorial only introduces CLI model training and conversion, you can refer to the official website for Python case modifications.
1、Model Training
Use CLI commands to directly train the model
xxxxxxxxxxcd /home/jetson/ultralytics/ultralytics/data/yahboom_data/orange_data
xxxxxxxxxxyolo detect train data=orange.yaml model=yolo26n.pt epochs=100 imgsz=640
data: Dataset configuration file
model: Pre-trained model file
epochs: Number of training rounds
imgsz: Specify input image size


Finally, the trained model-related files are stored in the /home/jetson/ultralytics/ultralytics/data/yahboom_data/orange_data/runs/detect/train folder.
Note: Each time training is run, the number after train will automatically increment by 1, please record this path, and use this new model path later.
2、Model Conversion
The final model will be generated in the runs folder: generally select the best.pt file for use
xxxxxxxxxx/home/jetson/ultralytics/ultralytics/data/yahboom_data/orange_data/runs
Convert PyTorch format model to TensorRT:
xxxxxxxxxxcd /home/jetson/ultralytics/ultralytics/data/yahboom_data/orange_data/runs/detect/train/weightsls
xxxxxxxxxxyolo export model=best.pt format=engine

Wait for the model conversion to complete, best.engine and best.onnx files will be generated in the current directory.
xxxxxxxxxxls
