ultralytics 8.0.141 create new SettingsManager (#3790)
This commit is contained in:
parent
42afe772d5
commit
20f5efd40a
215 changed files with 917 additions and 749 deletions
|
|
@ -52,20 +52,20 @@ Train a YOLOv8-pose model on the COCO128-pose dataset.
|
|||
!!! example ""
|
||||
|
||||
=== "Python"
|
||||
|
||||
|
||||
```python
|
||||
from ultralytics import YOLO
|
||||
|
||||
|
||||
# Load a model
|
||||
model = YOLO('yolov8n-pose.yaml') # build a new model from YAML
|
||||
model = YOLO('yolov8n-pose.pt') # load a pretrained model (recommended for training)
|
||||
model = YOLO('yolov8n-pose.yaml').load('yolov8n-pose.pt') # build from YAML and transfer weights
|
||||
|
||||
|
||||
# Train the model
|
||||
model.train(data='coco8-pose.yaml', epochs=100, imgsz=640)
|
||||
```
|
||||
=== "CLI"
|
||||
|
||||
|
||||
```bash
|
||||
# Build a new model from YAML and start training from scratch
|
||||
yolo pose train data=coco8-pose.yaml model=yolov8n-pose.yaml epochs=100 imgsz=640
|
||||
|
|
@ -90,14 +90,14 @@ training `data` and arguments as model attributes.
|
|||
!!! example ""
|
||||
|
||||
=== "Python"
|
||||
|
||||
|
||||
```python
|
||||
from ultralytics import YOLO
|
||||
|
||||
|
||||
# Load a model
|
||||
model = YOLO('yolov8n-pose.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
|
||||
|
|
@ -106,7 +106,7 @@ training `data` and arguments as model attributes.
|
|||
metrics.box.maps # a list contains map50-95 of each category
|
||||
```
|
||||
=== "CLI"
|
||||
|
||||
|
||||
```bash
|
||||
yolo pose val model=yolov8n-pose.pt # val official model
|
||||
yolo pose val model=path/to/best.pt # val custom model
|
||||
|
|
@ -119,19 +119,19 @@ Use a trained YOLOv8n-pose model to run predictions on images.
|
|||
!!! example ""
|
||||
|
||||
=== "Python"
|
||||
|
||||
|
||||
```python
|
||||
from ultralytics import YOLO
|
||||
|
||||
|
||||
# Load a model
|
||||
model = YOLO('yolov8n-pose.pt') # load an official model
|
||||
model = YOLO('path/to/best.pt') # load a custom model
|
||||
|
||||
|
||||
# Predict with the model
|
||||
results = model('https://ultralytics.com/images/bus.jpg') # predict on an image
|
||||
```
|
||||
=== "CLI"
|
||||
|
||||
|
||||
```bash
|
||||
yolo pose predict model=yolov8n-pose.pt source='https://ultralytics.com/images/bus.jpg' # predict with official model
|
||||
yolo pose predict model=path/to/best.pt source='https://ultralytics.com/images/bus.jpg' # predict with custom model
|
||||
|
|
@ -146,19 +146,19 @@ Export a YOLOv8n Pose model to a different format like ONNX, CoreML, etc.
|
|||
!!! example ""
|
||||
|
||||
=== "Python"
|
||||
|
||||
|
||||
```python
|
||||
from ultralytics import YOLO
|
||||
|
||||
|
||||
# Load a model
|
||||
model = YOLO('yolov8n-pose.pt') # load an official model
|
||||
model = YOLO('path/to/best.pt') # load a custom trained
|
||||
|
||||
|
||||
# Export the model
|
||||
model.export(format='onnx')
|
||||
```
|
||||
=== "CLI"
|
||||
|
||||
|
||||
```bash
|
||||
yolo export model=yolov8n-pose.pt format=onnx # export official model
|
||||
yolo export model=path/to/best.pt format=onnx # export custom trained model
|
||||
|
|
@ -183,4 +183,4 @@ i.e. `yolo predict model=yolov8n-pose.onnx`. Usage examples are shown for your m
|
|||
| [PaddlePaddle](https://github.com/PaddlePaddle) | `paddle` | `yolov8n-pose_paddle_model/` | ✅ | `imgsz` |
|
||||
| [ncnn](https://github.com/Tencent/ncnn) | `ncnn` | `yolov8n-pose_ncnn_model/` | ✅ | `imgsz`, `half` |
|
||||
|
||||
See full `export` details in the [Export](https://docs.ultralytics.com/modes/export/) page.
|
||||
See full `export` details in the [Export](https://docs.ultralytics.com/modes/export/) page.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue