Reformat Markdown code blocks (#12795)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
2af71d15a6
commit
fceea033ad
128 changed files with 1067 additions and 1018 deletions
|
|
@ -220,22 +220,22 @@ For example, users can load a model, train it, evaluate its performance on a val
|
|||
from ultralytics import YOLO
|
||||
|
||||
# Create a new YOLO model from scratch
|
||||
model = YOLO('yolov8n.yaml')
|
||||
model = YOLO("yolov8n.yaml")
|
||||
|
||||
# Load a pretrained YOLO model (recommended for training)
|
||||
model = YOLO('yolov8n.pt')
|
||||
model = YOLO("yolov8n.pt")
|
||||
|
||||
# Train the model using the 'coco8.yaml' dataset for 3 epochs
|
||||
results = model.train(data='coco8.yaml', epochs=3)
|
||||
results = model.train(data="coco8.yaml", epochs=3)
|
||||
|
||||
# Evaluate the model's performance on the validation set
|
||||
results = model.val()
|
||||
|
||||
# Perform object detection on an image using the model
|
||||
results = model('https://ultralytics.com/images/bus.jpg')
|
||||
results = model("https://ultralytics.com/images/bus.jpg")
|
||||
|
||||
# Export the model to ONNX format
|
||||
success = model.export(format='onnx')
|
||||
success = model.export(format="onnx")
|
||||
```
|
||||
|
||||
[Python Guide](usage/python.md){.md-button .md-button--primary}
|
||||
|
|
@ -259,7 +259,7 @@ To gain insight into the current configuration of your settings, you can view th
|
|||
print(settings)
|
||||
|
||||
# Return a specific setting
|
||||
value = settings['runs_dir']
|
||||
value = settings["runs_dir"]
|
||||
```
|
||||
|
||||
=== "CLI"
|
||||
|
|
@ -280,10 +280,10 @@ Ultralytics allows users to easily modify their settings. Changes can be perform
|
|||
from ultralytics import settings
|
||||
|
||||
# Update a setting
|
||||
settings.update({'runs_dir': '/path/to/runs'})
|
||||
settings.update({"runs_dir": "/path/to/runs"})
|
||||
|
||||
# Update multiple settings
|
||||
settings.update({'runs_dir': '/path/to/runs', 'tensorboard': False})
|
||||
settings.update({"runs_dir": "/path/to/runs", "tensorboard": False})
|
||||
|
||||
# Reset settings to default values
|
||||
settings.reset()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue