diff --git a/README.md b/README.md index 358e377..e31f145 100644 --- a/README.md +++ b/README.md @@ -86,12 +86,15 @@ YOLOv8 may also be used directly in a Python environment, and accepts the same [ ```python from ultralytics import YOLO -model = YOLO("yolov8n.pt") # load a pretrained YOLOv8n model - -model.train(data="coco128.yaml") # train the model -model.val() # evaluate model performance on the validation set -model.predict(source="https://ultralytics.com/images/bus.jpg") # predict on an image -model.export(format="onnx") # export the model to ONNX format +# Load a model +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="coco128.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 = YOLO("yolov8n.pt").export(format="onnx") # export a model to ONNX format ``` [Models](https://github.com/ultralytics/ultralytics/tree/main/ultralytics/yolo/v8/models) download automatically from the latest @@ -204,7 +207,7 @@ We love your input! YOLOv5 and YOLOv8 would not be possible without help from ou - + ##