Add missing CLI yolo commands for TASK and MODE in Docs - Quickstart and CLI Guide (#14882)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
229ec67879
commit
8e3d6685dd
3 changed files with 15 additions and 15 deletions
|
|
@ -47,7 +47,7 @@ PYTHON_VERSION = platform.python_version()
|
|||
TORCH_VERSION = torch.__version__
|
||||
TORCHVISION_VERSION = importlib.metadata.version("torchvision") # faster than importing torchvision
|
||||
HELP_MSG = """
|
||||
Usage examples for running YOLOv8:
|
||||
Usage examples for running Ultralytics YOLO:
|
||||
|
||||
1. Install the ultralytics package:
|
||||
|
||||
|
|
@ -58,25 +58,25 @@ HELP_MSG = """
|
|||
from ultralytics import YOLO
|
||||
|
||||
# Load a model
|
||||
model = YOLO('yolov8n.yaml') # build a new model from scratch
|
||||
model = YOLO("yolov8n.yaml") # build a new model from scratch
|
||||
model = YOLO("yolov8n.pt") # load a pretrained model (recommended for training)
|
||||
|
||||
# Use the model
|
||||
results = model.train(data="coco8.yaml", epochs=3) # train the model
|
||||
results = model.val() # evaluate model performance on the validation set
|
||||
results = model('https://ultralytics.com/images/bus.jpg') # predict on an image
|
||||
success = model.export(format='onnx') # export the model to ONNX format
|
||||
results = model("https://ultralytics.com/images/bus.jpg") # predict on an image
|
||||
success = model.export(format="onnx") # export the model to ONNX format
|
||||
|
||||
3. Use the command line interface (CLI):
|
||||
|
||||
YOLOv8 'yolo' CLI commands use the following syntax:
|
||||
Ultralytics 'yolo' CLI commands use the following syntax:
|
||||
|
||||
yolo TASK MODE ARGS
|
||||
|
||||
Where TASK (optional) is one of [detect, segment, classify]
|
||||
MODE (required) is one of [train, val, predict, export]
|
||||
ARGS (optional) are any number of custom 'arg=value' pairs like 'imgsz=320' that override defaults.
|
||||
See all ARGS at https://docs.ultralytics.com/usage/cfg or with 'yolo cfg'
|
||||
Where TASK (optional) is one of [detect, segment, classify, pose, obb]
|
||||
MODE (required) is one of [train, val, predict, export, benchmark]
|
||||
ARGS (optional) are any number of custom "arg=value" pairs like "imgsz=320" that override defaults.
|
||||
See all ARGS at https://docs.ultralytics.com/usage/cfg or with "yolo cfg"
|
||||
|
||||
- Train a detection model for 10 epochs with an initial learning_rate of 0.01
|
||||
yolo detect train data=coco8.yaml model=yolov8n.pt epochs=10 lr0=0.01
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue