train.py 283 Bytes
Newer Older
dengjb's avatar
dengjb committed
1
2
3
4
5
6
from ultralytics import YOLO

# Load a model
model = YOLO("yolov8s.yaml")  # build a new model from scratch
#model = YOLO("yolov8s.pt")  # load a pretrained model (recommended for training with a new dataset)
# Use the model
dengjb's avatar
dengjb committed
7
model.train(data="coco128.yaml", epochs=100,verbose=True)