Browse Source

上傳檔案到 'segment'

fatwolf 8 months ago
parent
commit
9cfa31a406
1 changed files with 8 additions and 0 deletions
  1. 8 0
      segment/seg_train.py

+ 8 - 0
segment/seg_train.py

@@ -0,0 +1,8 @@
+from ultralytics import YOLO
+
+# Load a model
+model = YOLO('yolov8n-seg.pt')  # build a new model from YAML
+
+
+# Train the model
+results = model.train(data='seg_magnet.yaml', epochs=150, imgsz=640)