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
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:
xxxxxxxxxx
cd /home/jetson/ultralytics/ultralytics/data/yahboom_data/orange_data
xxxxxxxxxx
yolo 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
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:
xxxxxxxxxx
cd /home/jetson/ultralytics/ultralytics/data/yahboom_data/orange_data/runs/detect/train/weights
xxxxxxxxxx
yolo export model=best.pt format=engine