Skip to content

Commit 25cc074

Browse files
authored
ultralytics 8.0.55 unified YOLOv8 model YAMLs (ultralytics#1475)
1 parent 701fba4 commit 25cc074

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+203
-896
lines changed

.github/workflows/greetings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ jobs:
5252
5353
<a href="https://github.com/ultralytics/ultralytics/actions/workflows/ci.yaml?query=event%3Aschedule"><img src="https://github.com/ultralytics/ultralytics/actions/workflows/ci.yaml/badge.svg" alt="Ultralytics CI"></a>
5454
55-
If this badge is green, all [Ultralytics CI](https://github.com/ultralytics/ultralytics/actions/workflows/ci.yaml?query=event%3Aschedule) tests are currently passing. CI tests verify correct operation of all YOLOv8 modes and tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit.
55+
If this badge is green, all [Ultralytics CI](https://github.com/ultralytics/ultralytics/actions/workflows/ci.yaml?query=event%3Aschedule) tests are currently passing. CI tests verify correct operation of all YOLOv8 [Modes](https://docs.ultralytics.com/modes/) and [Tasks](https://docs.ultralytics.com/tasks/) on macOS, Windows, and Ubuntu every 24 hours and on every commit.

docs/tasks/classify.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,25 @@ see the [Configuration](../usage/cfg.md) page.
2626
from ultralytics import YOLO
2727
2828
# Load a model
29-
model = YOLO('yolov8n-cls.yaml') # build a new model from scratch
29+
model = YOLO('yolov8n-cls.yaml') # build a new model from YAML
3030
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)
31+
model = YOLO('yolov8n-cls.yaml').load('yolov8n-cls.pt') # build from YAML and transfer weights
3132
3233
# Train the model
3334
model.train(data='mnist160', epochs=100, imgsz=64)
3435
```
36+
3537
=== "CLI"
36-
38+
3739
```bash
40+
# Build a new model from YAML and start training from scratch
41+
yolo classify train data=mnist160 model=yolov8n-cls.yaml epochs=100 imgsz=64
42+
43+
# Start training from a pretrained *.pt model
3844
yolo classify train data=mnist160 model=yolov8n-cls.pt epochs=100 imgsz=64
45+
46+
# Build a new model from YAML, transfer pretrained weights to it and start training
47+
yolo classify train data=mnist160 model=yolov8n-cls.yaml pretrained=yolov8n-cls.pt epochs=100 imgsz=64
3948
```
4049

4150
## Val

docs/tasks/detect.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,24 @@ the [Configuration](../usage/cfg.md) page.
2626
from ultralytics import YOLO
2727
2828
# Load a model
29-
model = YOLO('yolov8n.yaml') # build a new model from scratch
29+
model = YOLO('yolov8n.yaml') # build a new model from YAML
3030
model = YOLO('yolov8n.pt') # load a pretrained model (recommended for training)
31+
model = YOLO('yolov8n.yaml').load('yolov8n.pt') # build from YAML and transfer weights
3132
3233
# Train the model
3334
model.train(data='coco128.yaml', epochs=100, imgsz=640)
3435
```
3536
=== "CLI"
3637

3738
```bash
39+
# Build a new model from YAML and start training from scratch
40+
yolo detect train data=coco128.yaml model=yolov8n.yaml epochs=100 imgsz=640
41+
42+
# Start training from a pretrained *.pt model
3843
yolo detect train data=coco128.yaml model=yolov8n.pt epochs=100 imgsz=640
44+
45+
# Build a new model from YAML, transfer pretrained weights to it and start training
46+
yolo detect train data=coco128.yaml model=yolov8n.yaml pretrained=yolov8n.pt epochs=100 imgsz=640
3947
```
4048

4149
## Val

docs/tasks/keypoints.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,24 @@ train an OpenPose model on a custom dataset, see the OpenPose Training page.
2828
from ultralytics import YOLO
2929
3030
# Load a model
31-
model = YOLO('yolov8n.yaml') # build a new model from scratch
31+
model = YOLO('yolov8n.yaml') # build a new model from YAML
3232
model = YOLO('yolov8n.pt') # load a pretrained model (recommended for training)
33+
model = YOLO('yolov8n.yaml').load('yolov8n.pt') # build from YAML and transfer weights
3334
3435
# Train the model
3536
model.train(data='coco128.yaml', epochs=100, imgsz=640)
3637
```
3738
=== "CLI"
3839

3940
```bash
41+
# Build a new model from YAML and start training from scratch
42+
yolo detect train data=coco128.yaml model=yolov8n.yaml epochs=100 imgsz=640
43+
44+
# Start training from a pretrained *.pt model
4045
yolo detect train data=coco128.yaml model=yolov8n.pt epochs=100 imgsz=640
46+
47+
# Build a new model from YAML, transfer pretrained weights to it and start training
48+
yolo detect train data=coco128.yaml model=yolov8n.yaml pretrained=yolov8n.pt epochs=100 imgsz=640
4149
```
4250

4351
## Val TODO

docs/tasks/segment.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,24 @@ arguments see the [Configuration](../usage/cfg.md) page.
2626
from ultralytics import YOLO
2727
2828
# Load a model
29-
model = YOLO('yolov8n-seg.yaml') # build a new model from scratch
29+
model = YOLO('yolov8n-seg.yaml') # build a new model from YAML
3030
model = YOLO('yolov8n-seg.pt') # load a pretrained model (recommended for training)
31+
model = YOLO('yolov8n-seg.yaml').load('yolov8n.pt') # build from YAML and transfer weights
3132
3233
# Train the model
3334
model.train(data='coco128-seg.yaml', epochs=100, imgsz=640)
3435
```
3536
=== "CLI"
3637

3738
```bash
39+
# Build a new model from YAML and start training from scratch
40+
yolo segment train data=coco128-seg.yaml model=yolov8n-seg.yaml epochs=100 imgsz=640
41+
42+
# Start training from a pretrained *.pt model
3843
yolo segment train data=coco128-seg.yaml model=yolov8n-seg.pt epochs=100 imgsz=640
44+
45+
# Build a new model from YAML, transfer pretrained weights to it and start training
46+
yolo segment train data=coco128-seg.yaml model=yolov8n-seg.yaml pretrained=yolov8n-seg.pt epochs=100 imgsz=640
3947
```
4048

4149
## Val

docs/usage/cfg.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ given task.
143143
| `agnostic_nms` | `False` | class-agnostic NMS |
144144
| `retina_masks` | `False` | use high-resolution segmentation masks |
145145
| `classes` | `None` | filter results by class, i.e. class=0, or class=[0,2,3] |
146-
| `box` | `True` | Show boxes in segmentation predictions |
146+
| `boxes` | `True` | Show boxes in segmentation predictions |
147147

148148
### Validation
149149

tests/test_engine.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,9 @@ def test_segment():
7474

7575

7676
def test_classify():
77-
overrides = {
78-
'data': 'imagenet10',
79-
'model': 'yolov8n-cls.yaml',
80-
'imgsz': 32,
81-
'epochs': 1,
82-
'batch': 64,
83-
'save': False}
77+
overrides = {'data': 'imagenet10', 'model': 'yolov8n-cls.yaml', 'imgsz': 32, 'epochs': 1, 'save': False}
8478
CFG.data = 'imagenet10'
8579
CFG.imgsz = 32
86-
CFG.batch = 64
8780
# YOLO(CFG_SEG).train(**overrides) # works
8881

8982
# Trainer

ultralytics/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ultralytics YOLO 🚀, GPL-3.0 license
22

3-
__version__ = '8.0.54'
3+
__version__ = '8.0.55'
44

55
from ultralytics.yolo.engine.model import YOLO
66
from ultralytics.yolo.utils.checks import check_yolo as checks

0 commit comments

Comments
 (0)