Welcome to ROSMASTER M1 repository
10.Model Training_Conversion
Model training_conversion
After completing the tutorial content of dataset annotation, we can use the motherboard to start training the model.
This tutorial only introduces the model training and conversion of CLI. You can refer to the official website to modify the Python case
1. Model training
Use 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
data: Dataset configuration file
model: Pre-trained model file
epochs: Number of training rounds
imgsz: Enter the specified image size



2. Model conversion
The final model will be generated in the runs folder: generally choose the best.pt file for use
xxxxxxxxxx/home/jetson/ultralytics/ultralytics/data/yahboom_data/orange_data/runs/detect/train/weights
Convert the PyTorch model to TensorRT:
xxxxxxxxxxcd /home/jetson/ultralytics/ultralytics/data/yahboom_data/orange_data/runs/detect/train/weights
xxxxxxxxxxyolo export model=best.pt format=engine

