train.py 281 Bytes
Newer Older
dengjb's avatar
dengjb committed
1
2
3
4
5
6
7
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
model.train(data="coco.yaml", epochs=100,verbose=True)