Improve Docs dataset layout issues (#15696)

Co-authored-by: Francesco Mattioli <Francesco.mttl@gmail.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Jan Knobloch 2024-08-22 19:56:12 +02:00 committed by GitHub
parent 90be5f7266
commit 62094bd03f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 83 additions and 57 deletions

View file

@ -99,24 +99,28 @@ The [Roboflow Package Segmentation Dataset](https://universe.roboflow.com/factor
### How do I train an Ultralytics YOLOv8 model on the Package Segmentation Dataset?
You can train an Ultralytics YOLOv8n model using both Python and CLI methods. For Python, use the snippet below:
You can train an Ultralytics YOLOv8n model using both Python and CLI methods. Use the snippets below:
```python
from ultralytics import YOLO
!!! Example "Train Example"
# Load a model
model = YOLO("yolov8n-seg.pt") # load a pretrained model
=== "Python"
```python
from ultralytics import YOLO
# Train the model
results = model.train(data="package-seg.yaml", epochs=100, imgsz=640)
```
# Load a model
model = YOLO("yolov8n-seg.pt") # load a pretrained model
For CLI:
# Train the model
results = model.train(data="package-seg.yaml", epochs=100, imgsz=640)
```
```bash
# Start training from a pretrained *.pt model
yolo segment train data=package-seg.yaml model=yolov8n-seg.pt epochs=100 imgsz=640
```
=== "CLI"
```bash
# Start training from a pretrained *.pt model
yolo segment train data=package-seg.yaml model=yolov8n-seg.pt epochs=100 imgsz=640
```
Refer to the model [Training](../../modes/train.md) page for more details.