Code Monkey home page Code Monkey logo

yolov5_ncnn's Introduction

🚀 编码不易,点个star!

移动端NCNN部署,项目支持YOLOv5s、YOLOv4-tiny、MobileNetV2-YOLOv3-nano、Simple-Pose与Yolact模型,摄像头实时捕获视频流进行检测。

iOS:

  • Xcode 11.5
  • macOS 10.15.4
  • iPhone 6s 13.5.1

Android:

  • android studio 4.0
  • win10 1909
  • meizu 16x 8.1.0

部分代码参考自:sunnyden 的开源项目。 安卓已经增加权限申请,但如果还是闪退请手动确认下相关权限是否允许。

iOS

YOLOv5s:     ViewController.mm->USE_YOLOV5 = YES;
YOLOv4-tiny: ViewController.mm->USE_YOLOV5 = NO;
YOLOv3-nano: Due to time constraints, you need to modify it yourself.
                 1. Copy 2 files from Android library: .param and .bin
                 2. Just modify the loading name of yolov4-tiny.

Android

Select the model to be tested directly on the interface.

模型

  • YOLOv5s 输入尺寸减小,解码过程使用了大量的 for 循环与 NMS 表现出来会比较慢。
  • YOLOv4-tiny 使用默认尺寸,解码过程没有大量的 for 与 NMS 所以速度会快些。
  • YOLOv3-nano 与 v4-tiny 一样。
  • Simple-Pose 暂时只写了安卓版本,iOS目前还没有增加。内部原理是先检测人再用人的区域再次进行姿态检测,即2步过程。
  • Yolact 暂时只写了安卓版本,iOS目前还没有增加。

Note:

  • 由于手机性能、图像尺寸等因素导致FPS在不同手机上相差比较大。该项目主要测试NCNN框架的使用,具体模型的转换可以去NCNN官方查看转换教程。
  • 增加 Simple-Pose 模型时增加了opencv,由于库太大只保留 arm64-v8a/armeabi-v7a 有需要的自己去官方下载。
  • ncnn暂时使用vulkan版本,在加载前需要打开加速,本项目中没有打开。如果要用ncnn版本需要修改CMakeLists.txt配置。

已知部分ncnn大佬网名:.... nihui qiuqiu

🎨 截图

yolov5_ncnn's People

Contributors

cmdbug avatar

Stargazers

 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.