docs: fix wrong weights in segment and obb .load() examples (#24180)

This commit is contained in:
Aman Harsh 2026-04-09 18:08:47 +05:30 committed by GitHub
parent e5eee3e6a2
commit b1821192eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ Train YOLO26n-obb on the DOTA8 dataset for 100 [epochs](https://www.ultralytics.
# Load a model
model = YOLO("yolo26n-obb.yaml") # build a new model from YAML
model = YOLO("yolo26n-obb.pt") # load a pretrained model (recommended for training)
model = YOLO("yolo26n-obb.yaml").load("yolo26n.pt") # build from YAML and transfer weights
model = YOLO("yolo26n-obb.yaml").load("yolo26n-obb.pt") # build from YAML and transfer weights
# Train the model
results = model.train(data="dota8.yaml", epochs=100, imgsz=640)

View File

@ -54,7 +54,7 @@ Train YOLO26n-seg on the COCO8-seg dataset for 100 [epochs](https://www.ultralyt
# Load a model
model = YOLO("yolo26n-seg.yaml") # build a new model from YAML
model = YOLO("yolo26n-seg.pt") # load a pretrained model (recommended for training)
model = YOLO("yolo26n-seg.yaml").load("yolo26n.pt") # build from YAML and transfer weights
model = YOLO("yolo26n-seg.yaml").load("yolo26n-seg.pt") # build from YAML and transfer weights
# Train the model
results = model.train(data="coco8-seg.yaml", epochs=100, imgsz=640)