Giter VIP home page Giter VIP logo

ncnn_android_yolov8's Introduction

YOLOv8 安卓手机部署

本项目将YOLOv8s通过QT和NCNN部署到小米手机上运行

1.模型转换的Trick

  • 修改ltralytics\nn\modules.py

这一部分主要涉及两个方面的修改一个c2f bloack中将split改为slice(该过程不是必要的),另一个是去掉detect的头(加上detect的头可以转出来,但是ncnn转出的模型维度不正确,detect的head将在ncnn中通过自定义layer实现)

  • 转onnx

请参考: https://github.com/DataXujing/YOLOv8

  • 使用ONNX2NCNN生成ncnn支持的模型
onnx2ncnn yolov8s.onnx yolov8s.param yolov8s.bin
  • ncnnoptimize生成FP16模式的模型
ncnnoptimize.exe yolov8s.param yolov8s.bin yolov8s_opt.param yolov8s_opt.bin 65536

2.基于QT的NCNN安卓程序编译

关于QT安卓开发的相关配置和QT和NCNN开发安卓程序的其他应用请参考笔者的其他几个项目,内有详细的介绍

该部分代码除了模型文件已经全部在该项目中!

3.小米手机上的Demo

小米手机Demo1 小米手机Demo2

4.download apk

ncnn_android_yolov8's People

Contributors

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