ultralytics/examples
..
RTDETR-ONNXRuntime-Python
YOLO-Interactive-Tracking-UI
YOLO-Series-ONNXRuntime-Rust
YOLOv8-Action-Recognition
YOLOv8-CPP-Inference
YOLOv8-LibTorch-CPP-Inference
YOLOv8-MNN-CPP
YOLOv8-ONNXRuntime
YOLOv8-ONNXRuntime-CPP
YOLOv8-ONNXRuntime-Rust
YOLOv8-OpenCV-ONNX-Python
YOLOv8-OpenVINO-CPP-Inference
YOLOv8-Region-Counter
YOLOv8-SAHI-Inference-Video
YOLOv8-Segmentation-ONNXRuntime-Python
YOLOv8-TFLite-Python
README.md
heatmaps.ipynb
hub.ipynb
object_counting.ipynb
object_tracking.ipynb
tutorial.ipynb

README.md

Ultralytics logo

Ultralytics YOLO Examples

Welcome to the Ultralytics examples directory! This collection showcases practical applications and detailed walkthroughs for integrating Ultralytics YOLO models into various real-world projects. Explore Python scripts and Jupyter notebooks designed to help you leverage the power of models like Ultralytics YOLOv8 for tasks like object detection, instance segmentation, pose estimation, and more.

Whether you're deploying models on edge devices using formats like ONNX with ONNX Runtime, optimizing with TensorRT on NVIDIA Jetson, using OpenVINO for Intel hardware, or integrating with frameworks like OpenCV, these examples provide valuable insights and code snippets. Find inspiration for your next computer vision project and see how others are using Ultralytics YOLO to build innovative AI solutions on platforms ranging from C++ and C# to Python and Rust.

💡 Example Applications

Browse through the community-contributed examples below. These projects demonstrate various use cases and deployment strategies for Ultralytics YOLO models across different platforms and programming languages.

Title Format Contributor
YOLO ONNX Detection Inference with C++ C++/ONNX Justas Bartnykas
YOLO OpenCV ONNX Detection Python OpenCV/Python/ONNX Farid Inawan
YOLO C# ONNX-Runtime .NET/ONNXRuntime Compunet
YOLO .Net ONNX Detection C# C# .Net Samuel Stainback
YOLOv8 on NVIDIA Jetson (TensorRT and DeepStream) Python/TensorRT/DeepStream Lakshantha (See also DeepStream Guide)
YOLOv8 ONNXRuntime Python Python/ONNXRuntime Semih Demirel
RTDETR ONNXRuntime Python Python/ONNXRuntime Semih Demirel
YOLOv8 ONNXRuntime CPP C++/ONNXRuntime DennisJcy, Onuralp Sezer
RTDETR ONNXRuntime C# C#/ONNX Kayzwer
YOLOv8 SAHI Video Inference Python/SAHI Muhammad Rizwan Munawar (See also SAHI Guide)
YOLOv8 Region Counter Python Muhammad Rizwan Munawar (See also Region Counting Guide)
YOLOv8 Segmentation ONNXRuntime Python Python/ONNXRuntime jamjamjon
YOLOv8 LibTorch CPP C++/LibTorch Myyura (See also TorchScript Export)
YOLOv8 OpenCV INT8 TFLite Python Python/TFLite Wamiq Raza (See also TFLite Export)
YOLOv8 All Tasks ONNXRuntime Rust Rust/ONNXRuntime jamjamjon
YOLOv8 OpenVINO CPP C++/OpenVINO Erlangga Yudi Pradana (See also OpenVINO Export)
YOLOv8 MNN CPP C++/MNN Khoi VN
YOLOv5-YOLO11 ONNXRuntime Rust Rust/ONNXRuntime jamjamjon

🤝 How to Contribute

We actively encourage contributions from our vibrant community! Sharing your examples, applications, and guides helps others learn and build amazing things with Ultralytics. If you have a project you'd like to share, please follow these steps:

  1. Fork the Repository: Start by forking the main Ultralytics repository on GitHub.
  2. Create Your Example: Add your project folder within the examples/ directory of your forked repository.
  3. Prepare Your Submission: Ensure your project meets the following criteria:
    • It utilizes the ultralytics pip package.
    • Includes a README.md file with clear, step-by-step instructions for setup and execution. Explain the purpose of the example and any prerequisites.
    • Avoid committing large files or extensive dependencies. If necessary, provide instructions for users to download them separately (e.g., using ultralytics.utils.downloads.safe_download()).
    • As a contributor, be prepared to offer support and address issues related to your example.
  4. Submit a Pull Request: Create a pull request (PR) targeting the main branch of the official Ultralytics repository. Use the title prefix [Example] (e.g., [Example] Add YOLOv8 Pose Estimation on Raspberry Pi).

For more comprehensive guidelines on contributing code, documentation, or examples, please refer to our Contributing Guide. We appreciate your efforts to enhance the Ultralytics ecosystem! If you have questions, feel free to open an issue or PR, and the team will be happy to assist. Check out the Ultralytics Blog for more insights and updates, and explore Ultralytics HUB for streamlined model training and deployment.