Git Product home page Git Product logo

rknn-multi-threaded's Introduction

简介

  • 使用多线程异步操作rknn模型, 提高rk3588/rk3588s的NPU使用率, 进而提高推理帧数(rk3568之类修改后应该也能使用, 但是作者本人并没有rk3568开发板......)
  • 此分支使用模型yolov5s_relu_tk2_RK3588_i8.rknn, 将yolov5s模型的激活函数silu修改为为relu,在损失一点精度的情况下获得较大性能提升,详情见于rknn_model_zoo
  • 此项目的c++实现

更新说明

使用说明

演示

  • 将仓库拉取至本地, 并将Releases中的演示视频放于项目根目录下, 运行main.py查看演示示例
  • 切换至root用户运行performance.sh可以进行定频操作(约等于开启性能模式)
  • 运行rkcat.sh可以查看当前温度与NPU占用

部署应用

  • 修改main.py下的modelPath为你自己的模型所在路径
  • 修改main.py下的cap为你想要运行的视频/摄像头
  • 修改main.py下的TPEs为你想要的线程数, 具体可参考下表
  • 修改func.py为你自己需要的推理函数, 具体可查看myFunc函数

多线程模型帧率测试

模型\线程数 1 2 3 4 5 6
yolov5s 27.4491 49.0747 65.3673 63.3204 71.8407 72.0590

补充

  • 多线程下CPU, NPU占用较高, 核心温度相应增高, 请做好散热。推荐开1, 2, 3线程, 实测小铜片散热下运行三分钟温度约为56°, 64°, 69°

Acknowledgements

rknn-multi-threaded's People

Contributors

leafqycc 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.