Coder Social home page Coder Social logo

toumingl / rk3588-yolo-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kaylorchen/rk3588-yolo-demo

0.0 0.0 0.0 171.67 MB

The project is a multi-threaded inference demo of Yolo running on the RK3588 platform, which has been adapted for reading video files and camera feeds. The demo uses the Yolov8n model for file inference, with a maximum inference frame rate of up to 100 frames per second.

License: MIT License

C++ 97.43% C 1.37% CMake 1.21%

rk3588-yolo-demo's Introduction

Yolov8/v10 Demo for RK3588

The project is a multi-threaded inference demo of Yolov8 running on the RK3588 platform, which has been adapted for reading video files and camera feeds. The demo uses the Yolov8n model for file inference, with a maximum inference frame rate of up to 100 frames per second.

If you want to test yolov8n with ros2 for yourself kit, click the link

Model

Download Model File

you can find the model file in the 'src/yolov8/model', and some large files: Link: https://pan.baidu.com/s/1zfSVzR1G7mb-EQvs6A6ZYw?pwd=gmcs Password: gmcs
Google Drive: https://drive.google.com/drive/folders/1FYluJpdaL-680pipgIQ1zsqqRvNbruEp?usp=sharing

Model pt --> onnx

For Yolov8

go to my blog --> blog.kaylordut.com

For Yolov10

go to my another repository --> yolov10
download pt model and export:

# End-to-End ONNX
yolo export model=yolov10n/s/m/b/l/x.pt format=onnx opset=13 simplify

Model onnx --> rknn

go to my blog --> blog.kaylordut.com

TIPS: (Yolov10)

  • rknn-toolkit2(release:1.6.0) does not support some operators about attention, so it runs attention steps with CPU, leading to increased inference time.
  • rknn-toolkit2(beta:2.0.0b12) has the attention operators for 3588, so I build a docker image, you can pull it from kaylor/rknn_onnx2rknn:beta

Inference Time

Please refer to the spreadsheet '8vs10.xlsx' for details.

V8l-2.0.0 V8l-1.6.0 V10l-2.0.0 V10l-1.6.0 V8n-2.0.0 V8n-1.6.0 V10n-2.0.0 V10n-1.6.0
133.07572815534 133.834951456311 122.992233009709 204.471844660194 17.8990291262136 18.3300970873786 21.3009708737864 49.9883495145631

Demo Video and Guideline

https://space.bilibili.com/327258623?spm_id_from=333.999.0.0
QQ group: 957577822

Prepare

Build the Cross-Compilation Environment

Set up a cross-compilation environment based on the following link.

Install Runtime Libraries in Your RK3588 Target Board

cat << 'EOF' | sudo tee /etc/apt/sources.list.d/kaylordut.list 
deb [signed-by=/etc/apt/keyrings/kaylor-keyring.gpg] http://apt.kaylordut.cn/kaylordut/ kaylordut main
EOF
sudo mkdir /etc/apt/keyrings -pv
sudo wget -O /etc/apt/keyrings/kaylor-keyring.gpg http://apt.kaylordut.cn/kaylor-keyring.gpg
sudo apt update
sudo apt install kaylordut-dev libbytetrack

If your OS is not Ubuntu22.04, and find kaylordut-dev and libbytetrack sources in my github.

Build the Project for Your RK3588

  • Compile
git clone https://github.com/kaylorchen/rk3588-yolo-demo.git 
cd rk3588-yolo-demo/src/yolov8
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/toolchain-aarch64.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
make 

/path/to/toolchain-aarch64.cmake is .cmake file absolute path

  • Run
Usage: ./videofile_demo [--model_path|-m model_path] [--input_filename|-i input_filename] [--threads|-t thread_count] [--framerate|-f framerate] [--label_path|-l label_path]  

Usage: ./camera_demo [--model_path|-m model_path] [--camera_index|-i index] [--width|-w width] [--height|-h height][--threads|-t thread_count] [--fps|-f framerate] [--label_path|-l label_path]

Usage: ./imagefile_demo [--model_path|-m model_path] [--input_filename|-i input_filename] [--label_path|-l label_path]

you can run the above command in your rk3588

rk3588-yolo-demo's People

Contributors

kaylorchen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.