2023-DnB-Project/train.py
2023-06-26 17:21:08 +08:00

9 lines
202 B
Python

from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n.pt') # load a pretrained model (recommended for training)
# Train the model
model.train(data='coco128.yaml', epochs=100, imgsz=640)