cherrydata / ultralytics /refer.py
Voidljc
Your commit message
aa24fe8
Raw
History Blame Contribute Delete
364 Bytes
from ultralytics import YOLO
# Load a model # 三选一
# model = YOLO('yolov8n.yaml') # build a new model from YAML
# model = YOLO('yolov8n.pt') # load a pretrained model (recommended for training)
model = YOLO('yolov8n.yaml').load('yolov8n.pt') # build from YAML and transfer weights
# Train the model
model.train(data='train.yaml', epochs=100, imgsz=640)