Files
Seg_Data_Server/Tool-可视化/train.py
2026-05-20 15:05:35 +08:00

7 lines
197 B
Python

from ultralytics import YOLO
# Load a pretrained YOLO11 segment model
model = YOLO("yolo11n-seg.pt")
# Train the model
results = model.train(data="./my_dataset.yaml", epochs=100, imgsz=640)