Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel
..
a5735724c5
Add YOLOv8 LibTorch C++ inference example (#7090)
1 year ago
f7b9009c91
PyCharm Docs Inspect fixes (#18432)
7 months ago
e668de6e02
Add BGR to RGB conversion in LibTorch example (#17864)
8 months ago

README.md

You have to be logged in to leave a comment. Sign In

# 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
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...