Skip to content

Latest commit

 

History

History
68 lines (47 loc) · 2.12 KB

File metadata and controls

68 lines (47 loc) · 2.12 KB

YOLOv8-RKNN-Deployment

This ultarlytics-main project is an instance containing several improved YOLOv8 versions.

Requirements

First, download rknn_model_zoo

1.For Rknn conversion,create an environment named Rknn or whatever you like ,activate it and run this command:

pip install -r requirementsRknn.txt

2.For YOLOv8,create another environment,activate it and run this:

1.pip install -r requirementsYOLOv8.txt
2.cd ultralytics-main
3.pip install -e . ( 2 and 3 Optional,if you want to improve YOLOv8 by yourself,they are needed. )

Or just simple training YOLOv8:

1.conda install pytorch==2.0.0 torchvision==0.15.0 torchaudio==2.0.0 pytorch-cuda=11.8 -c pytorch -c nvidia
2.pip install ultralytics
3.pip install -e .

YOLOv8 Training

There are two main ways for training:

1. Writing Python script

2. Editing .yaml file (Recommended)

Both methods have examples in this project.

Usage Example:

yolo cfg=ultralytics/cfg/default.yaml

Format Conversion

  1. First, convert your best.pt to .ONNX after modifying:

  2. Then modify:

Conversion Command:

1.python exportONNX.py
2.python convert.py best.onnx rk3588

C++ Deployment on RK3588

You can refer to YOLOv8-NPU.

RKNN_API extraction code: bg8b

RKNN_C++_Reasoning extraction code: h77p

License

MIT