Giter Club home page Giter Club logo

ncnn-android-yolov5-lite's Introduction

ncnn-android-yolov5-lite


因为我需要推理两个不同的yolov5模型

原版的加载推理是同一个

所以在原版的基础上做了些修改

改了后处理部分和一些参数传递

分离了原版jni的部分,写成了cpp来调用推理

因此只需简单修改参数就可以推理多个yolov5模型

使用方法和nihui版的yolov5一样

把ncnn库放进去然后修改cmake即可使用

该版本是推理两个yolov5-lite模型的

CSDN博客:https://blog.csdn.net/Maoziii/article/details/135146324?spm=1001.2014.3001.5502

运行前还需要:

1、准备自己的yolov5模型并转化为ncnn

2、修改target_size,修改模型路径等

3、修改.param文件中permute层的名字与推理时ex获取的out层名字一样

4、修改自己模型.param文件中reshape层,改为动态获取

参考: nihui安卓部署yolov5: https://github.com/nihui/ncnn-android-yolov5

yolov5-lite作者ppogg的仓库: https://github.com/ppogg/YOLOv5-Lite


The YOLOv5 object detection

this is a sample ncnn android project, it depends on ncnn library only

https://github.com/Tencent/ncnn

how to build and run

step1

https://github.com/Tencent/ncnn/releases

download ncnn-android-vulkan.zip or build ncnn for android yourself

step2

extract ncnn-android-vulkan.zip into app/src/main/jni or change the ncnn_DIR path to yours in app/src/main/jni/CMakeLists.txt

step3

open this project with Android Studio, build it and enjoy!

ncnn-android-yolov5-lite's People

Stargazers

 avatar

Watchers

 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.