File size: 221 Bytes
5e0a271
 
 
 
 
 
 
1
2
3
4
5
6
7
from ultralytics import YOLO

# Load a model
model = YOLO("yolo11l-seg.pt")  # load a pretrained model (recommended for training)

# Train the model
results = model.train(data="data.yaml", epochs=500, imgsz=1024, batch=4)