Files
HSAP/algorithms/dms_yolo/code.embedded.bak/examples/YOLOv8-OpenVINO-CPP-Inference
Chengfang Lu e72bc061c5 feat: HSAP platform v2 — modular navigation, quality review, audit log, world model simulation
Major changes:
- New frontend (platform/web/): Vite + React 18 + TypeScript + Tailwind
- 4-module navigation: 数据送标 / 模型管理 / 车队管理 / 系统管理
- Data catalog with charts (DMS/ADAS/Lane 3-tab view)
- Quality review workflow (标注质检): Good/Fine/Bad scoring with auto-advance
- Audit enhancements: batch operations, rejection categories, Feishu notifications
- Operation audit log (操作日志)
- World model simulation studio (仿真工坊)
- Dataset version management with snapshots and diff
- ADAS 7-class dataset integration (138K images organized + compressed)
- User management with Feishu integration and pagination
- CRUD/search/filter on all pages, card layout redesign
- PIL-optimized image overlay rendering
- Auto-snapshot on build, in_review workflow stage
- Removed embedded algorithm code (now in workspace)
2026-06-03 11:40:21 +08:00
..

YOLOv8 OpenVINO Inference in C++

Welcome to the Ultralytics YOLOv8 OpenVINO Inference example in C++! This guide will help you get started with leveraging the powerful YOLOv8 models using the Intel OpenVINO™ toolkit and OpenCV API in your C++ projects. Whether you're looking to enhance performance on Intel hardware or add flexibility to your applications, this example provides a solid foundation. Learn more about optimizing models on the Ultralytics blog.

🌟 Features

📋 Dependencies

To ensure smooth execution, please make sure you have the following dependencies installed:

Dependency Version
OpenVINO >=2023.3
OpenCV >=4.5.0
C++ >=14
CMake >=3.12.0

⚙️ Build Instructions

Follow these steps to build the project:

  1. Clone the Ultralytics repository:

    git clone https://github.com/ultralytics/ultralytics.git
    cd ultralytics/examples/YOLOv8-OpenVINO-CPP-Inference
    
  2. Create a build directory and compile the project using CMake:

    mkdir build
    cd build
    cmake ..
    make
    

🛠️ Usage

Once built, you can run inference on an image using the compiled executable. Provide the path to your model file (either .xml for OpenVINO IR or .onnx) and the path to your image:

# Example using an OpenVINO IR model
./detect path/to/your/model.xml path/to/your/image.jpg

# Example using an ONNX model
./detect path/to/your/model.onnx path/to/your/image.jpg

This command will process the image using the specified YOLOv8 model and display the object detection results. Explore various Ultralytics Solutions for real-world applications.

🔄 Exporting YOLOv8 Models

To use your Ultralytics YOLOv8 model with this C++ example, you first need to export it to the OpenVINO IR or ONNX format. Use the yolo export command available in the Ultralytics Python package. Find detailed instructions in the Export mode documentation.

# Export to OpenVINO format (generates .xml and .bin files)
yolo export model=yolov8s.pt imgsz=640 format=openvino

# Export to ONNX format
yolo export model=yolov8s.pt imgsz=640 format=onnx

For more details on exporting and optimizing models for OpenVINO, refer to the Ultralytics OpenVINO integration guide.

📸 Screenshots

Running Using OpenVINO Model

Running OpenVINO Model

Running Using ONNX Model

Running ONNX Model

❤️ Contributions

We hope this example helps you integrate YOLOv8 with OpenVINO and OpenCV into your C++ projects effortlessly. Contributions to improve this example or add new features are welcome! Please see the Ultralytics contribution guidelines for more information. Visit the main Ultralytics documentation for further guides and resources. Happy coding! 🚀