2023-DnB-Project/train.py

9 lines
202 B
Python
Raw Normal View History

2023-06-26 17:18:00 +08:00
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)