This is a sample ncnn android project, it depends on ncnn library and opencv
https://github.com/Tencent/ncnn
https://github.com/nihui/opencv-mobile
## how to build and run
### step1
https://github.com/Tencent/ncnn/releases
* Download ncnn-YYYYMMDD-android-vulkan.zip or build ncnn for android yourself
* Extract ncnn-YYYYMMDD-android-vulkan.zip into **app/src/main/jni** and change the **ncnn_DIR** path to yours in **app/src/main/jni/CMakeLists.txt**
### step2
https://github.com/nihui/opencv-mobile
* Download opencv-mobile-XYZ-android.zip
* Extract opencv-mobile-XYZ-android.zip into **app/src/main/jni** and change the **OpenCV_DIR** path to yours in **app/src/main/jni/CMakeLists.txt**
### step3
* Open this project with Android Studio, build it and enjoy!
## some notes
* Android ndk camera is used for best efficiency
* Crash may happen on very old devices for lacking HAL3 camera interface
* All models are manually modified to accept dynamic input shape
* Most small models run slower on GPU than on CPU, this is common
* FPS may be lower in dark environment because of longer camera exposure time
## screenshot
![](Screenshot.png)
## reference
https://github.com/nihui/ncnn-android-yolov5
https://github.com/xiang-wuu/ncnn-android-yolov7
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
基于ncnn部署yolov5手势检测支持18种手势安卓源码+模型+运行步骤说明.zip (28个子文件)
code
gradle
wrapper
gradle-wrapper.jar 53KB
gradle-wrapper.properties 236B
result.jpg 93KB
app
src
main
jni
CMakeLists.txt 459B
ndkcamera.cpp 24KB
yolo.h 916B
yolo.cpp 19KB
ndkcamera.h 2KB
yoloncnn.cpp 6KB
assets
yolov7-tiny.param 12KB
yolov7-tiny.bin 11.88MB
best.bin 27.03MB
best.param 30KB
java
com
tencent
ncnnyolov7
NcnnYolov7.java 1KB
MainActivity.java 5KB
res
values
strings.xml 331B
layout
main.xml 1KB
AndroidManifest.xml 843B
build.gradle 507B
LICENSE 35KB
gradlew.bat 2KB
build.gradle 441B
settings.gradle 16B
local.properties 421B
gradlew 5KB
Screenshot.png 531KB
.gitignore 132B
README.md 1KB
共 28 条
- 1
资源评论
熬夜写代码的平头哥
- 粉丝: 3835
- 资源: 7354
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功