Back to Ultralytics

Ultralytics YOLO Examples

examples/README.md

8.4.7111.1 KB
Original Source

<a href="https://www.ultralytics.com/" target="_blank"></a>

Ultralytics YOLO Examples

[!WARNING] The examples in this directory are community-contributed and showcase creative ways to use Ultralytics YOLO models. While we truly appreciate these contributions, they may not always reflect the latest best practices or receive regular updates. To help streamline our codebase and focus our resources on maintaining comprehensive, up-to-date official documentation and guides, we plan to retire these examples in a future Ultralytics release.

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 YOLO26 for tasks like object detection, instance segmentation, semantic 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. All C++ examples are grouped together under ./cpp with a combined build-and-test guide.

C++

All C++ examples live under ./cpp and support every YOLO task and generation. See the C++ examples guide for a combined build-and-test walkthrough.

TitleBackendContributor
YOLO OpenCV DNN CPPOpenCV DNNJustas Bartnykas
YOLO ONNX Runtime CPPONNX RuntimeDennisJcy, Onuralp Sezer
YOLO LibTorch CPPLibTorchMyyura
YOLO OpenVINO CPPOpenVINOErlangga Yudi Pradana
YOLO MNN CPPMNNKhoi VN
YOLO Triton CPPTritonAhmet Selim Demirel, Doğan Mehmet Başoğlu, Enes Uzun, Mevlüt Ardıç

Python

TitleBackendContributor
YOLO OpenCV ONNX DetectionOpenCV / ONNXFarid Inawan
YOLOv8 ONNX RuntimeONNX RuntimeSemih Demirel
RTDETR ONNX RuntimeONNX RuntimeSemih Demirel
YOLOv8 Segmentation ONNX RuntimeONNX Runtimejamjamjon
YOLOv8 INT8 TFLiteTFLiteWamiq Raza (See also TFLite Export)
YOLOv8 SAHI Video InferenceSAHIMuhammad Rizwan Munawar (See also SAHI Guide)
YOLOv8 Region CounterRegion CountingMuhammad Rizwan Munawar (See also Region Counting Guide)
YOLOv8 on NVIDIA Jetson (TensorRT and DeepStream)TensorRT / DeepStreamLakshantha (See also DeepStream Guide)

Rust

TitleBackendContributor
YOLOv8 All Tasks ONNX Runtime RustONNX Runtimejamjamjon
YOLOv5-YOLO11 ONNX Runtime RustONNX Runtimejamjamjon

C# / .NET

TitleBackendContributor
YOLO C# ONNX Runtime (YoloSharp)ONNX RuntimeCompunet
YOLO .NET ONNX Detection (Yolov8.Net)ONNXSamuel Stainback
RTDETR ONNX Runtime C#ONNX RuntimeKayzwer

🤝 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 Platform for streamlined model training and deployment.