From 959c11b9bc5147a5ec7e90de377601365ace2a40 Mon Sep 17 00:00:00 2001 From: Onuralp Sezer Date: Wed, 11 Jan 2023 00:34:26 +0300 Subject: [PATCH] Docs: readme.md contributor image and quick start code fix (#213) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Glenn Jocher --- README.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) 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 - + ##
License