CoolFace
Modelpublic

Ultralytics/YOLOv8

sourceHugging Faceagpl-3.0updated 3mo agoView on Hugging Face
386likes11kdownloads
Model Card

![Ultralytics YOLO banner](https://platform.ultralytics.com/?utmsource=huggingface&utmmedium=referral&utmcampaign=platformlaunch&utmcontent=banner&utmterm=ultralytics_github)

中文 | 한국어 | 日本語 | Русский | Deutsch | Français | Español | Português | Türkçe | Tiếng Việt | العربية

![Ultralytics CI](https://github.com/ultralytics/ultralytics/actions/workflows/ci.yml) ![Ultralytics Downloads](https://clickpy.clickhouse.com/dashboard/ultralytics) ![Ultralytics Discord](https://discord.com/invite/ultralytics) ![Ultralytics Forums](https://community.ultralytics.com/) ![Ultralytics Reddit](https://www.reddit.com/r/ultralytics/)

![Run on Gradient](https://console.paperspace.com/github/ultralytics/ultralytics) ![Open In Colab](https://colab.research.google.com/github/ultralytics/ultralytics/blob/main/examples/tutorial.ipynb) ![Open In Kaggle](https://www.kaggle.com/models/ultralytics/yolov8) ![Launch Binder](https://mybinder.org/v2/gh/ultralytics/ultralytics/HEAD?labpath=examples%2Ftutorial.ipynb)

Ultralytics creates cutting-edge, state-of-the-art (SOTA) YOLO models built on years of foundational research in computer vision and AI. Constantly updated for performance and flexibility, our models are fast, accurate, and easy to use. They excel at object detection, tracking, instance segmentation, semantic segmentation, image classification, and pose estimation tasks.

Find detailed documentation in the Ultralytics Docs. Get support via GitHub Issues. Join discussions on Discord, Reddit, and the Ultralytics Community Forums!

Request an Enterprise License for commercial use at Ultralytics Licensing.

<a href="https://platform.ultralytics.com/ultralytics/yolov8" target="_blank"> <img width="100%" src="https://raw.githubusercontent.com/ultralytics/assets/main/yolov8/yolo-comparison-plots.png" alt="YOLOv8 performance plots"> </a>

📄 Documentation

See below for quickstart installation and usage examples. For comprehensive guidance on training, validation, prediction, and deployment, refer to our full Ultralytics Docs.

<details open> <summary>Install</summary>

Install the ultralytics package, including all requirements, in a **Python>=3.8** environment with **PyTorch>=1.8**.

![PyPI - Version](https://pypi.org/project/ultralytics/) ![Ultralytics Downloads](https://clickpy.clickhouse.com/dashboard/ultralytics) ![PyPI - Python Version](https://pypi.org/project/ultralytics/)

bash
pip install ultralytics

For alternative installation methods, including Conda, Docker, and building from source via Git, please consult the Quickstart Guide.

![Conda Version](https://anaconda.org/conda-forge/ultralytics) ![Docker Image Version](https://hub.docker.com/r/ultralytics/ultralytics) ![Ultralytics Docker Pulls](https://hub.docker.com/r/ultralytics/ultralytics)

</details>

<details open> <summary>Usage</summary>

CLI

You can use Ultralytics YOLO directly from the Command Line Interface (CLI) with the yolo command:

bash
# Predict using a pretrained YOLO model (e.g., YOLOv8n) on an image
yolo predict model=yolov8n.pt source='https://ultralytics.com/images/bus.jpg'

The yolo command supports various tasks and modes, accepting additional arguments like imgsz=640. Explore the YOLO CLI Docs for more examples.

Python

Ultralytics YOLO can also be integrated directly into your Python projects. It accepts the same configuration arguments as the CLI:

python
from ultralytics import YOLO

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

# Train the model on the COCO8 dataset for 100 epochs
train_results = model.train(
    data="coco8.yaml",  # Path to dataset configuration file
    epochs=100,  # Number of training epochs
    imgsz=640,  # Image size for training
    device="cpu",  # Device to run on (e.g., 'cpu', 0, [0,1,2,3])
)

# Evaluate the model's performance on the validation set
metrics = model.val()

# Perform object detection on an image
results = model("path/to/image.jpg")  # Predict on an image
results[0].show()  # Display results

# Export the model to ONNX format for deployment
path = model.export(format="onnx")  # Returns the path to the exported model

Discover more examples in the YOLO Python Docs.

</details>

✨ Models

Ultralytics supports a wide range of YOLO models, from early versions like YOLOv3 to the latest YOLO26. The tables below showcase YOLOv8 models pretrained on COCO for Detection, Segmentation, and Pose Estimation. Classification models are pretrained on ImageNet. Tracking mode is compatible with Detection, Segmentation, and Pose models. All Models download automatically from the latest Ultralytics release on first use.

<a href="https://docs.ultralytics.com/tasks" target="_blank"> <img width="100%" src="https://raw.githubusercontent.com/ultralytics/assets/main/docs/ultralytics-yolov8-tasks-banner.avif" alt="Ultralytics YOLO supported tasks"> </a> <br> <br>

<details open><summary>Detection (COCO)</summary>

See Detection Docs for usage examples with these models trained on COCO, which include 80 pre-trained classes.

Modelsize<br><sup>(pixels)mAP<sup>val<br>50-95Speed<br><sup>CPU ONNX<br>(ms)Speed<br><sup>A100 TensorRT<br>(ms)params<br><sup>(M)FLOPs<br><sup>(B)
YOLOv8n64037.380.40.993.28.7
YOLOv8s64044.9128.41.2011.228.6
YOLOv8m64050.2234.71.8325.978.9
YOLOv8l64052.9375.22.3943.7165.2
YOLOv8x64053.9479.13.5368.2257.8
  • mAP<sup>val</sup> values are for single-model single-scale on COCO val2017 dataset. <br>Reproduce by yolo val detect data=coco.yaml device=0
  • Speed averaged over COCO val images using an Amazon EC2 P4d instance. <br>Reproduce by yolo val detect data=coco.yaml batch=1 device=0|cpu

</details>

<details><summary>Segmentation (COCO)</summary>

See Segmentation Docs for usage examples with these models trained on COCO-Seg, which include 80 pre-trained classes.

Modelsize<br><sup>(pixels)mAP<sup>box<br>50-95mAP<sup>mask<br>50-95Speed<br><sup>CPU ONNX<br>(ms)Speed<br><sup>A100 TensorRT<br>(ms)params<br><sup>(M)FLOPs<br><sup>(B)
YOLOv8n-seg64036.730.596.11.213.412.6
YOLOv8s-seg64044.636.8155.71.4711.842.6
YOLOv8m-seg64049.940.8317.02.1827.3110.2
YOLOv8l-seg64052.342.6572.42.7946.0220.5
YOLOv8x-seg64053.443.4712.14.0271.8344.1
  • mAP<sup>val</sup> values are for single-model single-scale on COCO val2017 dataset. <br>Reproduce by yolo val segment data=coco-seg.yaml device=0
  • Speed averaged over COCO val images using an Amazon EC2 P4d instance. <br>Reproduce by yolo val segment data=coco-seg.yaml batch=1 device=0|cpu

</details>

<details><summary>Classification (ImageNet)</summary>

See Classification Docs for usage examples with these models trained on ImageNet, which include 1000 pretrained classes.

Modelsize<br><sup>(pixels)acc<br><sup>top1acc<br><sup>top5Speed<br><sup>CPU ONNX<br>(ms)Speed<br><sup>A100 TensorRT<br>(ms)params<br><sup>(M)FLOPs<br><sup>(B) at 224
YOLOv8n-cls22469.088.312.90.312.74.3
YOLOv8s-cls22473.891.723.40.356.413.5
YOLOv8m-cls22476.893.585.40.6217.042.7
YOLOv8l-cls22478.394.2163.00.8737.599.7
YOLOv8x-cls22479.094.6232.01.0157.4154.8
  • acc values are model accuracies on the ImageNet dataset validation set. <br>Reproduce by yolo val classify data=path/to/ImageNet device=0
  • Speed averaged over ImageNet val images using an Amazon EC2 P4d instance. <br>Reproduce by yolo val classify data=path/to/ImageNet batch=1 device=0|cpu

</details>

<details><summary>Pose (COCO)</summary>

See Pose Docs for usage examples with these models trained on COCO-Pose, which include 1 pre-trained class, person.

Modelsize<br><sup>(pixels)mAP<sup>pose<br>50-95mAP<sup>pose<br>50Speed<br><sup>CPU ONNX<br>(ms)Speed<br><sup>A100 TensorRT<br>(ms)params<br><sup>(M)FLOPs<br><sup>(B)
YOLOv8n-pose64050.480.1131.81.183.39.2
YOLOv8s-pose64060.086.2233.21.4211.630.2
YOLOv8m-pose64065.088.8456.32.0026.481.0
YOLOv8l-pose64067.690.0784.52.5944.4168.6
YOLOv8x-pose64069.290.21607.13.7369.4263.2
YOLOv8x-pose-p6128071.691.24088.710.0499.11066.4
  • mAP<sup>val</sup> values are for single-model single-scale on COCO Keypoints val2017 dataset. <br>Reproduce by yolo val pose data=coco-pose.yaml device=0
  • Speed averaged over COCO val images using an Amazon EC2 P4d instance. <br>Reproduce by yolo val pose data=coco-pose.yaml batch=1 device=0|cpu

</details>

<details><summary>OBB (DOTAv1)</summary>

See OBB Docs for usage examples with these models trained on DOTAv1, which include 15 pre-trained classes.

Modelsize<br><sup>(pixels)mAP<sup>test<br>50Speed<br><sup>CPU ONNX<br>(ms)Speed<br><sup>A100 TensorRT<br>(ms)params<br><sup>(M)FLOPs<br><sup>(B)
YOLOv8n-obb102478.0204.773.573.123.3
YOLOv8s-obb102479.5424.884.0711.476.3
YOLOv8m-obb102480.5763.487.6126.4208.6
YOLOv8l-obb102480.71278.4211.8344.5433.8
YOLOv8x-obb102481.361759.1013.2369.5676.7
  • mAP<sup>test</sup> values are for single-model multiscale on DOTAv1 dataset. <br>Reproduce by yolo val obb data=DOTAv1.yaml device=0 split=test and submit merged results to DOTA evaluation.
  • Speed averaged over DOTAv1 val images using an Amazon EC2 P4d instance. <br>Reproduce by yolo val obb data=DOTAv1.yaml batch=1 device=0|cpu

</details>

🧩 Integrations

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 partners like Weights & Biases, Comet ML, Roboflow, and Intel OpenVINO, can optimize your AI workflow. Explore more at Ultralytics Integrations.

<a href="https://platform.ultralytics.com" target="_blank"> <img width="100%" src="https://github.com/ultralytics/assets/raw/main/yolov8/banner-integrations.png" alt="Ultralytics active learning integrations"> </a>

🤝 Contribute

We thrive on community collaboration! Ultralytics YOLO wouldn't be the SOTA framework it is without contributions from developers like you. Please see our Contributing Guide to get started. We also welcome your feedback—share your experience by completing our Survey. A huge Thank You 🙏 to everyone who contributes!

<!-- SVG image from https://opencollective.com/ultralytics/contributors.svg?width=1280 -->

![Ultralytics open-source contributors](https://github.com/ultralytics/ultralytics/graphs/contributors)

We look forward to your contributions to help make the Ultralytics ecosystem even better!

📜 License

Ultralytics offers two licensing options to suit different needs:

  • AGPL-3.0 License: This OSI-approved open-source license is perfect for students, researchers, and enthusiasts. It encourages open collaboration and knowledge sharing. See the LICENSE file for full details.
  • Ultralytics Enterprise License: For development and production use, this license enables seamless integration of Ultralytics software and AI models into business products and services, including internal tools, automated workflows, and production deployments, bypassing the open-source requirements of AGPL-3.0. To get started, please contact us via Ultralytics Licensing.

📞 Contact

For bug reports and feature requests related to Ultralytics software, please visit GitHub Issues. For questions, discussions, and community support, join our active communities on Discord, Reddit, and the Ultralytics Community Forums. We're here to help with all things Ultralytics!

<br>