Update docs with YOLOv8 banner (#160)

Co-authored-by: Paula Derrenger <107626595+pderrenger@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocher 2023-01-09 15:24:01 +01:00 committed by GitHub
parent fdf294e4e8
commit 96fbf9ce58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 252 additions and 41 deletions

View file

@ -1,9 +1,12 @@
## Installation
!!! note "Latest Stable Release"
Install YOLOv8 via the `ultralytics` pip package for the latest stable release or by cloning the [https://github.com/ultralytics/ultralytics](https://github.com/ultralytics/ultralytics) repository for the most up-to-date version.
!!! note "pip install (recommended)"
```
pip install ultralytics
```
??? tip "Development and Contributing"
!!! note "git clone"
```
git clone https://github.com/ultralytics/ultralytics
cd ultralytics
@ -13,38 +16,41 @@
## CLI
The command line YOLO interface let's you simply train, validate or infer models on various tasks and versions.
CLI requires no customization or code. You can simply run all tasks from the terminal
!!! tip
The command line YOLO interface lets you simply train, validate or infer models on various tasks and versions.
CLI requires no customization or code. You can simply run all tasks from the terminal with the `yolo` command.
!!! note
=== "Syntax"
```bash
yolo task=detect mode=train model=s.yaml epochs=1 ...
... ... ...
segment infer s-cls.pt
classify val s-seg.pt
yolo task=detect mode=train model=yolov8n.yaml args...
classify predict yolov8n-cls.yaml args...
segment val yolov8n-seg.yaml args...
export yolov8n.pt format=onnx args...
```
=== "Example training"
```bash
yolo task=detect mode=train model=s.yaml
yolo task=detect mode=train model=yolov8n.pt data=coco128.yaml device=0
```
TODO: add terminal screen/gif
=== "Example training DDP"
=== "Example Multi-GPU training"
```bash
yolo task=detect mode=train model=s.yaml device=\'0,1,2,3\'
yolo task=detect mode=train model=yolov8n.pt data=coco128.yaml device=\'0,1,2,3\'
```
[CLI Guide](cli.md){ .md-button .md-button--primary}
## Python API
Ultralytics YOLO comes with pythonic Model and Trainer interface.
!!! tip
The Python API allows users to easily use YOLOv8 in their Python projects. It provides functions for loading and running the model, as well as for processing the model's output. The interface is designed to be easy to use, so that users can quickly implement object detection in their projects.
Overall, the Python interface is a useful tool for anyone looking to incorporate object detection, segmentation or classification into their Python projects using YOLOv8.
!!! note
```python
import ultralytics
from ultralytics import YOLO
model = YOLO("yolov8n-seg.yaml") # automatically detects task type
model = YOLO("yolov8n.pt") # load checkpoint
model.train(data="coco128-seg.yaml", epochs=1, lr0=0.01, ...)
model.train(data="coco128-seg.yaml", epochs=1, lr0=0.01, device="0,1,2,3") # DDP mode
model = YOLO('yolov8n.yaml') # build a new model from scratch
model = YOLO('yolov8n.pt') # load a pretrained model (recommended for best training results)
results = model.train(data='coco128.yaml') # train the model
results = model.val() # evaluate model performance on the validation set
results = model.predict(source='bus.jpg') # predict on an image
success = model.export(format='onnx') # export the model to ONNX format
```
[API Guide](sdk.md){ .md-button .md-button--primary}