CLI Simplification (#449)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocher
2023-01-17 23:00:33 +01:00
committed by GitHub
parent 454191bd4b
commit 453b5f259a
16 changed files with 218 additions and 132 deletions

View File

@ -35,7 +35,7 @@ see the [Configuration](../config.md) page.
=== "CLI"
```bash
yolo task=classify mode=train data=mnist160 model=yolov8n-cls.pt epochs=100 imgsz=64
yolo classify train data=mnist160 model=yolov8n-cls.pt epochs=100 imgsz=64
```
## Val
@ -60,8 +60,8 @@ it's training `data` and arguments as model attributes.
=== "CLI"
```bash
yolo task=classify mode=val model=yolov8n-cls.pt # val official model
yolo task=classify mode=val model=path/to/best.pt # val custom model
yolo classify val model=yolov8n-cls.pt # val official model
yolo classify val model=path/to/best.pt # val custom model
```
## Predict
@ -85,8 +85,8 @@ Use a trained YOLOv8n-cls model to run predictions on images.
=== "CLI"
```bash
yolo task=classify mode=predict model=yolov8n-cls.pt source="https://ultralytics.com/images/bus.jpg" # predict with official model
yolo task=classify mode=predict model=path/to/best.pt source="https://ultralytics.com/images/bus.jpg" # predict with custom model
yolo classify predict model=yolov8n-cls.pt source="https://ultralytics.com/images/bus.jpg" # predict with official model
yolo classify predict model=path/to/best.pt source="https://ultralytics.com/images/bus.jpg" # predict with custom model
```
## Export
@ -110,8 +110,8 @@ Export a YOLOv8n-cls model to a different format like ONNX, CoreML, etc.
=== "CLI"
```bash
yolo mode=export model=yolov8n-cls.pt format=onnx # export official model
yolo mode=export model=path/to/best.pt format=onnx # export custom trained model
yolo export model=yolov8n-cls.pt format=onnx # export official model
yolo export model=path/to/best.pt format=onnx # export custom trained model
```
Available YOLOv8-cls export formats include:

View File

@ -35,7 +35,7 @@ the [Configuration](../config.md) page.
=== "CLI"
```bash
yolo task=detect mode=train data=coco128.yaml model=yolov8n.pt epochs=100 imgsz=640
yolo detect train data=coco128.yaml model=yolov8n.pt epochs=100 imgsz=640
```
## Val
@ -60,8 +60,8 @@ training `data` and arguments as model attributes.
=== "CLI"
```bash
yolo task=detect mode=val model=yolov8n.pt # val official model
yolo task=detect mode=val model=path/to/best.pt # val custom model
yolo detect val model=yolov8n.pt # val official model
yolo detect val model=path/to/best.pt # val custom model
```
## Predict
@ -85,8 +85,8 @@ Use a trained YOLOv8n model to run predictions on images.
=== "CLI"
```bash
yolo task=detect mode=predict model=yolov8n.pt source="https://ultralytics.com/images/bus.jpg" # predict with official model
yolo task=detect mode=predict model=path/to/best.pt source="https://ultralytics.com/images/bus.jpg" # predict with custom model
yolo detect predict model=yolov8n.pt source="https://ultralytics.com/images/bus.jpg" # predict with official model
yolo detect predict model=path/to/best.pt source="https://ultralytics.com/images/bus.jpg" # predict with custom model
```
## Export
@ -110,8 +110,8 @@ Export a YOLOv8n model to a different format like ONNX, CoreML, etc.
=== "CLI"
```bash
yolo mode=export model=yolov8n.pt format=onnx # export official model
yolo mode=export model=path/to/best.pt format=onnx # export custom trained model
yolo export model=yolov8n.pt format=onnx # export official model
yolo export model=path/to/best.pt format=onnx # export custom trained model
```
Available YOLOv8 export formats include:

View File

@ -35,7 +35,7 @@ arguments see the [Configuration](../config.md) page.
=== "CLI"
```bash
yolo task=segment mode=train data=coco128-seg.yaml model=yolov8n-seg.pt epochs=100 imgsz=640
yolo segment train data=coco128-seg.yaml model=yolov8n-seg.pt epochs=100 imgsz=640
```
## Val
@ -60,8 +60,8 @@ retains it's training `data` and arguments as model attributes.
=== "CLI"
```bash
yolo task=segment mode=val model=yolov8n-seg.pt # val official model
yolo task=segment mode=val model=path/to/best.pt # val custom model
yolo segment val model=yolov8n-seg.pt # val official model
yolo segment val model=path/to/best.pt # val custom model
```
## Predict
@ -85,8 +85,8 @@ Use a trained YOLOv8n-seg model to run predictions on images.
=== "CLI"
```bash
yolo task=segment mode=predict model=yolov8n-seg.pt source="https://ultralytics.com/images/bus.jpg" # predict with official model
yolo task=segment mode=predict model=path/to/best.pt source="https://ultralytics.com/images/bus.jpg" # predict with custom model
yolo segment predict model=yolov8n-seg.pt source="https://ultralytics.com/images/bus.jpg" # predict with official model
yolo segment predict model=path/to/best.pt source="https://ultralytics.com/images/bus.jpg" # predict with custom model
```
## Export
@ -110,8 +110,8 @@ Export a YOLOv8n-seg model to a different format like ONNX, CoreML, etc.
=== "CLI"
```bash
yolo mode=export model=yolov8n-seg.pt format=onnx # export official model
yolo mode=export model=path/to/best.pt format=onnx # export custom trained model
yolo export model=yolov8n-seg.pt format=onnx # export official model
yolo export model=path/to/best.pt format=onnx # export custom trained model
```
Available YOLOv8-seg export formats include: