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:
Glenn Jocher 2024-05-18 18:58:06 +02:00 committed by GitHub
parent 2af71d15a6
commit fceea033ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
128 changed files with 1067 additions and 1018 deletions

View file

@ -57,15 +57,15 @@ Validate trained YOLOv8n model accuracy on the COCO8 dataset. No argument need t
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n.pt') # load an official model
model = YOLO('path/to/best.pt') # load a custom model
model = YOLO("yolov8n.pt") # load an official model
model = YOLO("path/to/best.pt") # load a custom model
# Validate the model
metrics = model.val() # no arguments needed, dataset and settings remembered
metrics.box.map # map50-95
metrics.box.map # map50-95
metrics.box.map50 # map50
metrics.box.map75 # map75
metrics.box.maps # a list contains map50-95 of each category
metrics.box.maps # a list contains map50-95 of each category
```
=== "CLI"
@ -108,17 +108,12 @@ The below examples showcase YOLO model validation with custom arguments in Pytho
```python
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n.pt')
model = YOLO("yolov8n.pt")
# Customize validation settings
validation_results = model.val(data='coco8.yaml',
imgsz=640,
batch=16,
conf=0.25,
iou=0.6,
device='0')
validation_results = model.val(data="coco8.yaml", imgsz=640, batch=16, conf=0.25, iou=0.6, device="0")
```
=== "CLI"