Update YOLOv8-ONNXRuntime-CPP example with GPU inference (#4328)

Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Onuralp SEZER 2023-08-13 18:34:39 +03:00 committed by GitHub
parent f6b58e9d75
commit b5d1af42d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 364 additions and 362 deletions

View file

@ -28,16 +28,23 @@ Alternatively, you can use the following command for exporting the model in the
yolo export model=yolov8n.pt opset=12 simplify=True dynamic=False format=onnx imgsz=640,640
```
## Download COCO.yaml file
In order to run example, you also need to download coco.yaml. You can download the file manually from [here](https://raw.githubusercontent.com/ultralytics/ultralytics/main/ultralytics/cfg/datasets/coco.yaml)
## Dependencies
| Dependency | Version |
| -------------------------------- | -------- |
| Onnxruntime(linux,windows,macos) | >=1.14.1 |
| OpenCV | >=4.0.0 |
| C++ | >=17 |
| Cmake | >=3.5 |
| Dependency | Version |
| -------------------------------- | ------------- |
| Onnxruntime(linux,windows,macos) | >=1.14.1 |
| OpenCV | >=4.0.0 |
| C++ | >=17 |
| Cmake | >=3.5 |
| Cuda (Optional) | >=11.4,\<12.0 |
| cuDNN (Cuda required) | =8 |
Note: The dependency on C++17 is due to the usage of the C++17 filesystem feature.
Note (2): Due to ONNX Runtime, we need to use CUDA 11 and cuDNN 8. Keep in mind that this requirement might change in the future.
## Usage