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. YOLOv8 is designed to be fast, accurate, and easy to use, making it an excellent choice for a wide range of object detection and tracking, instance segmentation, image classification and pose estimation tasks.
We hope that the resources here will help you get the most out of YOLOv8. Please browse the YOLOv8 Docs for details, raise an issue on GitHub for support, questions, or discussions, become a member of the Ultralytics Discord , Reddit and Forums !
To request an Enterprise License please complete the form at Ultralytics Licensing .
See below for a quickstart installation and usage example, and see the YOLOv8 Docs for full documentation on training, validation, prediction and deployment.
Pip install the ultralytics package including all requirements in a Python>=3.8 environment with PyTorch>=1.8 .
pip install ultralytics
For alternative installation methods including Conda , Docker , and Git, please refer to the Quickstart Guide .
YOLOv8 may be used directly in the Command Line Interface (CLI) with a
yolo
command:
yolo predict model=yolov8n.pt source='https://ultralytics.com/images/bus.jpg'
yolo
can be used for a variety of tasks and modes and accepts additional arguments, i.e.
imgsz=640
. See the YOLOv8
CLI Docs
for examples.
YOLOv8 may also be used directly in a Python environment, and accepts the same arguments as in the CLI example above:
from ultralytics import YOLO
# Load a model
model = YOLO("yolov8n.pt")
# Train the model
train_results = model.train(
data="coco8.yaml", # path to dataset YAML
epochs=100, # number of training epochs
imgsz=640, # training image size
device="cpu", # device to run on, i.e. device=0 or device=0,1,2,3 or device=cpu
# Evaluate model performance on the validation set
metrics = model.val()
# Perform object detection on an image
results = model("path/to/image.jpg")
results[0].show()
# Export the model to ONNX format
path = model.export(format="onnx") # return path to exported model
See YOLOv8 Python Docs for more examples.
Ultralytics provides interactive notebooks for YOLOv8, covering training, validation, tracking, and more. Each notebook is paired with a YouTube tutorial, making it easy to learn and implement advanced YOLOv8 features.
Notebook YouTubeYOLOv8 Detect , Segment and Pose models pretrained on the COCO dataset are available here, as well as YOLOv8 Classify models pretrained on the ImageNet dataset. Track mode is available for all Detect, Segment and Pose models.
All Models download automatically from the latest Ultralytics release on first use.
Detection (COCO)
See Detection Docs for usage examples with these models trained on COCO , which include 80 pre-trained classes.
Model size(pixels) mAP val
50-95 Speed
CPU ONNX
(ms) Speed
A100 TensorRT
(ms) params
(M) FLOPs
(B)
Reproduce by
yolo val detect data=coco.yaml device=0
Reproduce by
yolo val detect data=coco.yaml batch=1 device=0|cpu
Segmentation (COCO)
See Segmentation Docs for usage examples with these models trained on COCO-Seg , which include 80 pre-trained classes.
Model size(pixels) mAP box
50-95 mAP mask
50-95 Speed
CPU ONNX
(ms) Speed
A100 TensorRT
(ms) params
(M) FLOPs
(B)
Reproduce by
yolo val segment data=coco-seg.yaml device=0
Reproduce by
yolo val segment data=coco-seg.yaml batch=1 device=0|cpu
Pose (COCO)
See Pose Docs for usage examples with these models trained on COCO-Pose , which include 1 pre-trained class, person.
Model size(pixels) mAP pose
50-95 mAP pose
50 Speed
CPU ONNX
(ms) Speed
A100 TensorRT
(ms) params
(M) FLOPs
(B)
Reproduce by
yolo val pose data=coco-pose.yaml device=0
Reproduce by
yolo val pose data=coco-pose.yaml batch=1 device=0|cpu
OBB (DOTAv1)
See OBB Docs for usage examples with these models trained on DOTAv1 , which include 15 pre-trained classes.
Model size(pixels) mAP test
50 Speed
CPU ONNX
(ms) Speed
A100 TensorRT
(ms) params
(M) FLOPs
(B)
Reproduce by
yolo val obb data=DOTAv1.yaml device=0 split=test
and submit merged results to
DOTA evaluation
.
Reproduce by
yolo val obb data=DOTAv1.yaml batch=1 device=0|cpu
Classification (ImageNet)
See Classification Docs for usage examples with these models trained on ImageNet , which include 1000 pretrained classes.
Model size(pixels) acc
top1 acc
top5 Speed
CPU ONNX
(ms) Speed
A100 TensorRT
(ms) params
(M) FLOPs
(B) at 640
Reproduce by
yolo val classify data=path/to/ImageNet device=0
Reproduce by
yolo val classify data=path/to/ImageNet batch=1 device=0|cpu
Our key integrations with leading AI platforms extend the functionality of Ultralytics' offerings, enhancing tasks like dataset labeling, training, visualization, and model management. Discover how Ultralytics, in collaboration with Roboflow , ClearML, Comet , Neural Magic and OpenVINO , can optimize your AI workflow.
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 visualize and debug predictions Run YOLOv8 inference up to 6x faster with Neural Magic DeepSparseExperience seamless AI with Ultralytics HUB ⭐, the all-in-one solution for data visualization, YOLOv5 and YOLOv8 🚀 model training and deployment, without any coding. Transform images into actionable insights and bring your AI visions to life with ease using our cutting-edge platform and user-friendly Ultralytics App . Start your journey for Free now!
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!
Ultralytics offers two licensing options to accommodate diverse use cases:
For Ultralytics bug reports and feature requests please visit GitHub Issues . Become a member of the Ultralytics Discord , Reddit , or Forums for asking questions, sharing projects, learning discussions, or for help with all things Ultralytics!
v8.2.96 - `ultralytics 8.2.96` new `results[0].to_df` Pandas, XML and CSV methods (#16267) Latest