You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Myyura a5735724c5
Add YOLOv8 LibTorch C++ inference example (#7090)
12 months ago
..
CMakeLists.txt Add YOLOv8 LibTorch C++ inference example (#7090) 12 months ago
README.md Add YOLOv8 LibTorch C++ inference example (#7090) 12 months ago
main.cc Add YOLOv8 LibTorch C++ inference example (#7090) 12 months ago

README.md

YOLOv8 LibTorch Inference C++

This example demonstrates how to perform inference using YOLOv8 models in C++ with LibTorch API.

Dependencies

Dependency Version
OpenCV >=4.0.0
C++ Standard >=17
Cmake >=3.18
Libtorch >=1.12.1

Usage

git clone ultralytics
cd ultralytics
pip install .
cd examples/YOLOv8-LibTorch-CPP-Inference

mkdir build
cd build
cmake ..
make
./yolov8_libtorch_inference

Exporting YOLOv8

To export YOLOv8 models:

yolo export model=yolov8s.pt imgsz=640 format=torchscript