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

@ -61,10 +61,10 @@ To train a YOLOv8n-pose model on the COCO-Pose dataset for 100 epochs with an im
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n-pose.pt') # load a pretrained model (recommended for training)
model = YOLO("yolov8n-pose.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data='coco-pose.yaml', epochs=100, imgsz=640)
results = model.train(data="coco-pose.yaml", epochs=100, imgsz=640)
```
=== "CLI"

View file

@ -34,10 +34,10 @@ To train a YOLOv8n-pose model on the COCO8-Pose dataset for 100 epochs with an i
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n-pose.pt') # load a pretrained model (recommended for training)
model = YOLO("yolov8n-pose.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data='coco8-pose.yaml', epochs=100, imgsz=640)
results = model.train(data="coco8-pose.yaml", epochs=100, imgsz=640)
```
=== "CLI"

View file

@ -72,10 +72,10 @@ The `train` and `val` fields specify the paths to the directories containing the
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n-pose.pt') # load a pretrained model (recommended for training)
model = YOLO("yolov8n-pose.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data='coco8-pose.yaml', epochs=100, imgsz=640)
results = model.train(data="coco8-pose.yaml", epochs=100, imgsz=640)
```
=== "CLI"
@ -132,7 +132,7 @@ Ultralytics provides a convenient conversion tool to convert labels from the pop
```python
from ultralytics.data.converter import convert_coco
convert_coco(labels_dir='path/to/coco/annotations/', use_keypoints=True)
convert_coco(labels_dir="path/to/coco/annotations/", use_keypoints=True)
```
This conversion tool can be used to convert the COCO dataset or any dataset in the COCO format to the Ultralytics YOLO format. The `use_keypoints` parameter specifies whether to include keypoints (for pose estimation) in the converted labels.

View file

@ -47,10 +47,10 @@ To train a YOLOv8n-pose model on the Tiger-Pose dataset for 100 epochs with an i
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n-pose.pt') # load a pretrained model (recommended for training)
model = YOLO("yolov8n-pose.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data='tiger-pose.yaml', epochs=100, imgsz=640)
results = model.train(data="tiger-pose.yaml", epochs=100, imgsz=640)
```
=== "CLI"