ultralytics 8.0.55 unified YOLOv8 model YAMLs (#1475)

This commit is contained in:
Glenn Jocher 2023-03-20 13:54:20 +01:00 committed by GitHub
parent 701fba4770
commit 25cc07401f
45 changed files with 203 additions and 896 deletions

View file

@ -26,8 +26,9 @@ arguments see the [Configuration](../usage/cfg.md) page.
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n-seg.yaml') # build a new model from scratch
model = YOLO('yolov8n-seg.yaml') # build a new model from YAML
model = YOLO('yolov8n-seg.pt') # load a pretrained model (recommended for training)
model = YOLO('yolov8n-seg.yaml').load('yolov8n.pt') # build from YAML and transfer weights
# Train the model
model.train(data='coco128-seg.yaml', epochs=100, imgsz=640)
@ -35,7 +36,14 @@ arguments see the [Configuration](../usage/cfg.md) page.
=== "CLI"
```bash
# Build a new model from YAML and start training from scratch
yolo segment train data=coco128-seg.yaml model=yolov8n-seg.yaml epochs=100 imgsz=640
# Start training from a pretrained *.pt model
yolo segment train data=coco128-seg.yaml model=yolov8n-seg.pt epochs=100 imgsz=640
# Build a new model from YAML, transfer pretrained weights to it and start training
yolo segment train data=coco128-seg.yaml model=yolov8n-seg.yaml pretrained=yolov8n-seg.pt epochs=100 imgsz=640
```
## Val