PyCharm Docs Inspect fixes (#18432)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
ef16c56c99
commit
f7b9009c91
15 changed files with 52 additions and 50 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# YOLOv8/YOLOv5 Inference C++
|
||||
|
||||
This example demonstrates how to perform inference using YOLOv8 and YOLOv5 models in C++ with OpenCV's DNN API.
|
||||
This example demonstrates how to perform inference using YOLOv8 and YOLOv5 models in C++ with OpenCV DNN API.
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
@ -27,13 +27,13 @@ make
|
|||
|
||||
To export YOLOv8 models:
|
||||
|
||||
```commandline
|
||||
```bash
|
||||
yolo export model=yolov8s.pt imgsz=480,640 format=onnx opset=12
|
||||
```
|
||||
|
||||
To export YOLOv5 models:
|
||||
|
||||
```commandline
|
||||
```bash
|
||||
python3 export.py --weights yolov5s.pt --img 480 640 --include onnx --opset 12
|
||||
```
|
||||
|
||||
|
|
@ -45,6 +45,6 @@ yolov5s.onnx:
|
|||
|
||||

|
||||
|
||||
This repository utilizes OpenCV's DNN API to run ONNX exported models of YOLOv5 and YOLOv8. In theory, it should work for YOLOv6 and YOLOv7 as well, but they have not been tested. Note that the example networks are exported with rectangular (640x480) resolutions, but any exported resolution will work. You may want to use the letterbox approach for square images, depending on your use case.
|
||||
This repository utilizes OpenCV DNN API to run ONNX exported models of YOLOv5 and YOLOv8. In theory, it should work for YOLOv6 and YOLOv7 as well, but they have not been tested. Note that the example networks are exported with rectangular (640x480) resolutions, but any exported resolution will work. You may want to use the letterbox approach for square images, depending on your use case.
|
||||
|
||||
The **main** branch version uses Qt as a GUI wrapper. The primary focus here is the **Inference** class file, which demonstrates how to transpose YOLOv8 models to work as YOLOv5 models.
|
||||
|
|
|
|||
|
|
@ -30,6 +30,6 @@ make
|
|||
|
||||
To export YOLOv8 models:
|
||||
|
||||
```commandline
|
||||
```bash
|
||||
yolo export model=yolov8s.pt imgsz=640 format=torchscript
|
||||
```
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ Once built, you can run inference on an image using the following command:
|
|||
|
||||
To use your YOLOv8 model with OpenVINO, you need to export it first. Use the command below to export the model:
|
||||
|
||||
```commandline
|
||||
```bash
|
||||
yolo export model=yolov8s.pt imgsz=640 format=openvino
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue