You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Glenn Jocher 6feba17760 Created using Colaboratory 2 years ago
.github Update docs with YOLOv8 banner (#160) 2 years ago
docker Add Dockerfiles and update Docs README (#124) 2 years ago
docs README and Docs updates (#166) 2 years ago
examples Created using Colaboratory 2 years ago
tests Return processed outputs from predictor (#161) 2 years ago
ultralytics Return processed outputs from predictor (#161) 2 years ago
.gitignore Integration of v8 segmentation (#107) 2 years ago
.pre-commit-config.yaml Add Dockerfiles and update Docs README (#124) 2 years ago
CITATION.cff Fix CITATION.cff typos (#64) 2 years ago
CONTRIBUTING.md Update docs with YOLOv8 banner (#160) 2 years ago
LICENSE Initial commit 2 years ago
MANIFEST.in Trainer + Dataloaders (#27) 2 years ago
README.md README and Docs updates (#166) 2 years ago
mkdocs.yml README and Docs updates (#166) 2 years ago
requirements.txt Add CoreML iOS updates (#121) 2 years ago
setup.cfg Flake8 updates (#66) 2 years ago
setup.py Map `ultralytics` and `yolo` CLI commands (#165) 2 years ago
tutorial.ipynb Created using Colaboratory 2 years ago

README.md

English | 简体中文

Ultralytics CI YOLOv8 Citation Docker Pulls
Run on Gradient Open In Colab Open In Kaggle

Ultralytics YOLOv8 is the latest version of the YOLO object detection and image segmentation model developed by Ultralytics. YOLOv8 is a cutting-edge, state-of-the-art (SOTA) model that builds upon the success of previous YOLO versions and introduces new features and improvements to further boost performance and flexibility.

The YOLOv8 models are designed to be fast, accurate, and easy to use, making them an excellent choice for a wide range of object detection, image segmentation and image classification tasks.

Whether you are a seasoned machine learning practitioner or new to the field, we hope that the resources on this page will help you get the most out of YOLOv8.

Documentation

See below for quickstart intallation and usage example, and see the YOLOv8 Docs for full documentation on training, validation, prediction and deployment.

Install

Pip install the ultralytics package including all requirements.txt in a Python>=3.7.0 environment, including PyTorch>=1.7.

pip install ultralytics
Usage

YOLOv8 may be used in a python environment:

from ultralytics import YOLO

model = YOLO("yolov8n.pt")  # load a pretrained YOLOv8n model

model.train(data="coco128.yaml")  # train the model
model.val()  # evaluate model performance on the validation set
model.predict(source="https://ultralytics.com/images/bus.jpg")  # predict on an image
model.export(format="onnx")  # export the model to ONNX format

Or with CLI yolo commands:

yolo task=detect    mode=train    model=yolov8n.pt        args...
          classify       predict        yolov8n-cls.yaml  args...
          segment        val            yolov8n-seg.yaml  args...
                         export         yolov8n.pt        format=onnx  args...

Models download automatically from the latest Ultralytics release.

Checkpoints

All YOLOv8 pretrained models are available here. Detection and Segmentation models are pretrained on the COCO dataset, while Classification models are pretrained on the ImageNet dataset.

Models download automatically from the latest Ultralytics release on first use.

Detection
Model size
(pixels)
mAPval
50-95
Speed
CPU
(ms)
Speed
T4 GPU
(ms)
params
(M)
FLOPs
(B)
YOLOv8n 640 37.3 - - 3.2 8.7
YOLOv8s 640 44.9 - - 11.2 28.6
YOLOv8m 640 50.2 - - 25.9 78.9
YOLOv8l 640 52.9 - - 43.7 165.2
YOLOv8x 640 53.9 - - 68.2 257.8
  • mAPval values are for single-model single-scale on COCO val2017 dataset.
    Reproduce by yolo mode=val task=detect data=coco.yaml device=0
  • Speed averaged over COCO val images using an Amazon EC2 P4d instance.
    Reproduce by yolo mode=val task=detect data=coco128.yaml batch=1 device=0/cpu
Segmentation
Model size
(pixels)
mAPbox
50-95
mAPmask
50-95
Speed
CPU
(ms)
Speed
T4 GPU
(ms)
params
(M)
FLOPs
(B)
YOLOv8n 640 36.7 30.5 - - 3.4 12.6
YOLOv8s 640 44.6 36.8 - - 11.8 42.6
YOLOv8m 640 49.9 40.8 - - 27.3 110.2
YOLOv8l 640 52.3 42.6 - - 46.0 220.5
YOLOv8x 640 53.4 43.4 - - 71.8 344.1
  • mAPval values are for single-model single-scale on COCO val2017 dataset.
    Reproduce by yolo mode=val task=detect data=coco.yaml device=0
  • Speed averaged over COCO val images using an Amazon EC2 P4d instance.
    Reproduce by yolo mode=val task=detect data=coco128.yaml batch=1 device=0/cpu
Classification
Model size
(pixels)
acc
top1
acc
top5
Speed
CPU
(ms)
Speed
T4 GPU
(ms)
params
(M)
FLOPs
(B) at 640
YOLOv8n 224 66.6 87.0 - - 2.7 4.3
YOLOv8s 224 72.3 91.1 - - 6.4 13.5
YOLOv8m 224 76.4 93.2 - - 17.0 42.7
YOLOv8l 224 78.0 94.1 - - 37.5 99.7
YOLOv8x 224 78.4 94.3 - - 57.4 154.8
  • mAPval values are for single-model single-scale on ImageNet dataset.
    Reproduce by yolo mode=val task=detect data=coco.yaml device=0
  • Speed averaged over ImageNet val images using an Amazon EC2 P4d instance.
    Reproduce by yolo mode=val task=detect data=coco128.yaml batch=1 device=0/cpu

Integrations




Roboflow ClearML NEW Comet NEW Neural Magic NEW
Label and export your custom datasets directly to YOLOv8 for training with Roboflow Automatically track, visualize and even remotely train YOLOv8 using ClearML (open-source!) Free forever, Comet lets you save YOLOv8 models, resume training, and interactively visualise and debug predictions Run YOLOv8 inference up to 6x faster with Neural Magic DeepSparse

Ultralytics HUB

Ultralytics HUB is our NEW no-code solution to visualize datasets, train YOLOv8 🚀 models, and deploy to the real world in a seamless experience. Get started for Free now! Also run YOLOv8 models on your iOS or Android device by downloading the Ultralytics App!

Contribute

We love your input! YOLOv5 and YOLOv8 would not be possible without help from our community. Please see our Contributing Guide to get started, and fill out our Survey to send us feedback on your experience. Thank you 🙏 to all our contributors!

License

YOLOv8 is available under two different licenses:

  • GPL-3.0 License: See LICENSE file for details.
  • Enterprise License: Provides greater flexibility for commercial product development without the open-source requirements of GPL-3.0. Typical use cases are embedding Ultralytics software and AI models in commercial products and applications. Request an Enterprise License at Ultralytics Licensing.

Contact

For YOLOv8 bugs and feature requests please visit GitHub Issues. For professional support please Contact Us.