-
OpenCV installation
We will need OpenCV library to run the example -> OpenCV installation guide
-
Clone ultralyrics repository
git clone https://github.com/ultralytics/ultralytics cd ultralytics
-
Get a YOLO model
We aslo will need a YOLO model in ONNX format.
Create and activate python venv
python -m venv <venv dir> source <venv dir>/bin/activate
Install ultralytics using pip
pip install ultralytics
Get a YOLO model
yolo export model=yolov8s.pt imgsz=480,640 format=onnx
-
Build and run the example
cd examples/YOLOv8-CPP-Inference cmake -S . -B build cd build make ./Yolov8CPPInference
Note that by default the CMake file will try to import the CUDA library to be used with the OpenCVs dnn (cuDNN) GPU Inference. If your OpenCV build does not use CUDA/cuDNN you can remove that import call and run the example on CPU.
generated from embedded-dev-research/cpp-project-template
-
Notifications
You must be signed in to change notification settings - Fork 5
License
embedded-dev-research/itlab_2024
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published